From 33fa9fe3ddae48c552bce1ab33db0f2f49eb81ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 22 Jul 2014 17:42:20 +0200 Subject: drm/radeon: fix R600_PTE_GART handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That didn't worked correctly any more and opened up a security problem. Signed-off-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/cik_sdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/drm/radeon/cik_sdma.c') diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c index 4b2ab769cd99..d629cea865f2 100644 --- a/drivers/gpu/drm/radeon/cik_sdma.c +++ b/drivers/gpu/drm/radeon/cik_sdma.c @@ -771,8 +771,7 @@ void cik_sdma_vm_set_page(struct radeon_device *rdev, trace_radeon_vm_set_page(pe, addr, count, incr, flags); - /* XXX: How to distinguish between GART and other system memory pages? */ - if (flags & R600_PTE_SYSTEM) { + if ((flags & R600_PTE_GART_MASK) == R600_PTE_GART_MASK) { uint64_t src = rdev->gart.table_addr + (addr >> 12) * 8; while (count) { unsigned bytes = count * 8; -- cgit v1.2.3