diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1801-drm-amd-display-wait-for-fence-without-holding-reser.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1801-drm-amd-display-wait-for-fence-without-holding-reser.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1801-drm-amd-display-wait-for-fence-without-holding-reser.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1801-drm-amd-display-wait-for-fence-without-holding-reser.patch new file mode 100644 index 00000000..eee223c8 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1801-drm-amd-display-wait-for-fence-without-holding-reser.patch @@ -0,0 +1,58 @@ +From 03cdb477f8dd8cd5965282d7b5026f6430a6354a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com> +Date: Tue, 2 Apr 2019 16:28:13 +0200 +Subject: [PATCH 1801/2940] drm/amd/display: wait for fence without holding + reservation lock +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Don't block others while waiting for the fences to finish, concurrent +submission is perfectly valid in this case and holding the lock can +prevent killed applications from terminating. + +Signed-off-by: Christian König <ckoenig.leichtzumerken@gmail.com> +Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +index 6510f5dccadf..688882d73ea7 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -5326,23 +5326,26 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, + continue; + } + ++ abo = gem_to_amdgpu_bo(fb->obj[0]); ++ ++ /* Wait for all fences on this FB */ ++ r = reservation_object_wait_timeout_rcu(abo->tbo.resv, true, ++ false, ++ MAX_SCHEDULE_TIMEOUT); ++ WARN_ON(r < 0); ++ + /* + * TODO This might fail and hence better not used, wait + * explicitly on fences instead + * and in general should be called for + * blocking commit to as per framework helpers + */ +- abo = gem_to_amdgpu_bo(fb->obj[0]); + r = amdgpu_bo_reserve(abo, true); + if (unlikely(r != 0)) { + DRM_ERROR("failed to reserve buffer before flip\n"); + WARN_ON(1); + } + +- /* Wait for all fences on this FB */ +- WARN_ON(reservation_object_wait_timeout_rcu(abo->tbo.resv, true, false, +- MAX_SCHEDULE_TIMEOUT) < 0); +- + amdgpu_bo_get_tiling_flags(abo, &tiling_flags); + + amdgpu_bo_unreserve(abo); +-- +2.17.1 + |