]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/radeon: fix HDP flushing
authorGrigori Goronzy <greg@chown.ath.cx>
Thu, 2 Jul 2015 23:54:11 +0000 (01:54 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2015 16:41:40 +0000 (12:41 -0400)
This was regressed by commit 39e7f6f8, although I don't know of any
actual issues caused by it.

The storage domain is read without TTM locking now, but the lock
never helped to prevent any races.

Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_gem.c

index 7199e19eb8bab5678afa1c348f97461459137190..013ec7106e555a2862c4d8b7194e25eaaabc7572 100644 (file)
@@ -476,6 +476,7 @@ int radeon_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
                r = ret;
 
        /* Flush HDP cache via MMIO if necessary */
+       cur_placement = ACCESS_ONCE(robj->tbo.mem.mem_type);
        if (rdev->asic->mmio_hdp_flush &&
            radeon_mem_type_to_domain(cur_placement) == RADEON_GEM_DOMAIN_VRAM)
                robj->rdev->asic->mmio_hdp_flush(rdev);