summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/rs400.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-06-04 17:29:57 +0400
committerAlex Deucher <alexander.deucher@amd.com>2014-06-10 06:06:51 +0400
commit7f90fc965023d72589a4e5fc02ac812e3a6ac809 (patch)
tree187365b8157da56cd1928ff5d9e5b263f4e73d73 /drivers/gpu/drm/radeon/rs400.c
parent0986c1a55ca64b44ee126a2f719a6e9f28cbe0ed (diff)
downloadlinux-7f90fc965023d72589a4e5fc02ac812e3a6ac809.tar.xz
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.c7
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)