diff mbox

[2/3] drm/radeon: fix HDP flushing

Message ID 1435830072-21835-2-git-send-email-greg@chown.ath.cx (mailing list archive)
State New, archived
Headers show

Commit Message

Grigori Goronzy July 2, 2015, 9:41 a.m. UTC
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 actual races.

Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/radeon/radeon_gem.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg Kroah-Hartman July 2, 2015, 1:08 p.m. UTC | #1
On Thu, Jul 02, 2015 at 11:41:11AM +0200, Grigori Goronzy wrote:
> 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 actual races.
> 
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/radeon/radeon_gem.c | 1 +
>  1 file changed, 1 insertion(+)

No signed-off-by?
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index 7199e19..013ec71 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -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);