dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.6 001/129] drm/ttm: flush the fence on the bo after we individualize the reservation object
@ 2020-04-15 11:32 Sasha Levin
  2020-04-15 11:33 ` [PATCH AUTOSEL 5.6 063/129] drm/amd/display: Don't try hdcp1.4 when content_type is set to type1 Sasha Levin
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Sasha Levin @ 2020-04-15 11:32 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sasha Levin, xinhui pan, dri-devel, linaro-mm-sig,
	Christian König, linux-media

From: xinhui pan <xinhui.pan@amd.com>

[ Upstream commit 1bbcf69e42fe7fd49b6f4339c970729d0e343753 ]

As we move the ttm_bo_individualize_resv() upwards, we need flush the
copied fence too. Otherwise the driver keeps waiting for fence.

run&Kill kfdtest, then perf top.

  25.53%  [ttm]                     [k] ttm_bo_delayed_delete
  24.29%  [kernel]                  [k] dma_resv_test_signaled_rcu
  19.72%  [kernel]                  [k] ww_mutex_lock

Fix: 378e2d5b("drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more")
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/series/72339/
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 5df596fb0280c..fe420ca454e0a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -498,8 +498,10 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
 
 		dma_resv_unlock(bo->base.resv);
 	}
-	if (bo->base.resv != &bo->base._resv)
+	if (bo->base.resv != &bo->base._resv) {
+		ttm_bo_flush_all_fences(bo);
 		dma_resv_unlock(&bo->base._resv);
+	}
 
 error:
 	kref_get(&bo->list_kref);
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-22  0:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-15 11:32 [PATCH AUTOSEL 5.6 001/129] drm/ttm: flush the fence on the bo after we individualize the reservation object Sasha Levin
2020-04-15 11:33 ` [PATCH AUTOSEL 5.6 063/129] drm/amd/display: Don't try hdcp1.4 when content_type is set to type1 Sasha Levin
2020-04-15 11:33 ` [PATCH AUTOSEL 5.6 077/129] drm/nouveau/svm: check for SVM initialized before migrating Sasha Levin
2020-04-15 11:33 ` [PATCH AUTOSEL 5.6 078/129] drm/nouveau/svm: fix vma range check for migration Sasha Levin
2020-04-15 11:33 ` [PATCH AUTOSEL 5.6 084/129] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges Sasha Levin
2020-04-15 16:11   ` Karol Herbst
2020-04-22  0:55     ` Sasha Levin
2020-04-15 11:34 ` [PATCH AUTOSEL 5.6 091/129] drm/amdkfd: kfree the wrong pointer Sasha Levin
2020-04-15 11:34 ` [PATCH AUTOSEL 5.6 106/129] drm/vc4: Fix HDMI mode validation Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox