diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1802-drm-amd-display-Use-a-reasonable-timeout-for-framebu.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1802-drm-amd-display-Use-a-reasonable-timeout-for-framebu.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1802-drm-amd-display-Use-a-reasonable-timeout-for-framebu.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1802-drm-amd-display-Use-a-reasonable-timeout-for-framebu.patch new file mode 100644 index 00000000..edecfc75 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1802-drm-amd-display-Use-a-reasonable-timeout-for-framebu.patch @@ -0,0 +1,54 @@ +From 364b49a70a98e6fa9dfa5260b15c90b4a675b419 Mon Sep 17 00:00:00 2001 +From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Date: Mon, 15 Apr 2019 10:57:14 -0400 +Subject: [PATCH 1802/2940] drm/amd/display: Use a reasonable timeout for + framebuffer fence waits + +Patch '5edb0c9b Fix deadlock with display during hanged ring recovery' +was accidentaly removed during one of DALs code merges. + +Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 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 688882d73ea7..ac3ac629d4cb 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -5328,11 +5328,16 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, + + abo = gem_to_amdgpu_bo(fb->obj[0]); + +- /* Wait for all fences on this FB */ ++ /* ++ * Wait for all fences on this FB. Do limited wait to avoid ++ * deadlock during GPU reset when this fence will not signal ++ * but we hold reservation lock for the BO. ++ */ + r = reservation_object_wait_timeout_rcu(abo->tbo.resv, true, + false, +- MAX_SCHEDULE_TIMEOUT); +- WARN_ON(r < 0); ++ msecs_to_jiffies(5000)); ++ if (unlikely(r <= 0)) ++ DRM_ERROR("Waiting for fences timed out or interrupted!"); + + /* + * TODO This might fail and hence better not used, wait +@@ -5341,10 +5346,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, + * blocking commit to as per framework helpers + */ + r = amdgpu_bo_reserve(abo, true); +- if (unlikely(r != 0)) { ++ if (unlikely(r != 0)) + DRM_ERROR("failed to reserve buffer before flip\n"); +- WARN_ON(1); +- } + + amdgpu_bo_get_tiling_flags(abo, &tiling_flags); + +-- +2.17.1 + |