diff options
author | Christian König <christian.koenig@amd.com> | 2014-06-04 15:29:57 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-06-10 04:06:51 +0200 |
commit | 7f90fc965023d72589a4e5fc02ac812e3a6ac809 (patch) | |
tree | 187365b8157da56cd1928ff5d9e5b263f4e73d73 /drivers/gpu/drm/radeon/rs400.c | |
parent | drm/radeon: stop poisoning the GART TLB (diff) | |
download | linux-7f90fc965023d72589a4e5fc02ac812e3a6ac809.tar.xz linux-7f90fc965023d72589a4e5fc02ac812e3a6ac809.zip |
drm/radeon: remove range check from *_gart_set_page
We never check the return value anyway and if the
index isn't valid would crash way before calling
the functions.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs400.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rs400.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 130d5cc50d43..a0f96decece3 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c @@ -212,21 +212,16 @@ void rs400_gart_fini(struct radeon_device *rdev) #define RS400_PTE_WRITEABLE (1 << 2) #define RS400_PTE_READABLE (1 << 3) -int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) +void rs400_gart_set_page(struct radeon_device *rdev, unsigned i, uint64_t addr) { uint32_t entry; u32 *gtt = rdev->gart.ptr; - if (i < 0 || i > rdev->gart.num_gpu_pages) { - return -EINVAL; - } - entry = (lower_32_bits(addr) & PAGE_MASK) | ((upper_32_bits(addr) & 0xff) << 4) | RS400_PTE_WRITEABLE | RS400_PTE_READABLE; entry = cpu_to_le32(entry); gtt[i] = entry; - return 0; } int rs400_mc_wait_for_idle(struct radeon_device *rdev) |