aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2850-drm-amdkcl-4.8-do-not-pin-fb-for-nonblocking-commits.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2850-drm-amdkcl-4.8-do-not-pin-fb-for-nonblocking-commits.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2850-drm-amdkcl-4.8-do-not-pin-fb-for-nonblocking-commits.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2850-drm-amdkcl-4.8-do-not-pin-fb-for-nonblocking-commits.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2850-drm-amdkcl-4.8-do-not-pin-fb-for-nonblocking-commits.patch
new file mode 100644
index 00000000..4eb8e518
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2850-drm-amdkcl-4.8-do-not-pin-fb-for-nonblocking-commits.patch
@@ -0,0 +1,61 @@
+From 74704cfab29b0f24fa747314f6efb05078639782 Mon Sep 17 00:00:00 2001
+From: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
+Date: Tue, 12 Dec 2017 10:55:06 +0800
+Subject: [PATCH 2850/4131] drm/amdkcl: [4.8] do not pin fb for nonblocking
+ commits in atomic commit
+
+Change-Id: Id2948478440dd53caead8b048057b1da2c6d8bdb
+Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 ++++++++++++++++---
+ 1 file changed, 16 insertions(+), 3 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 61a2067..fdcdb00 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -4445,9 +4445,16 @@ static int amdgpu_dm_atomic_commit(struct drm_device *dev,
+ #else
+ int ret = 0;
+
+- ret = drm_atomic_helper_prepare_planes(dev, state);
+- if (ret)
+- return ret;
++ /*
++ * Right now we receive async commit only from pageflip, in which case
++ * we should not pin/unpin the fb here, it should be done in
++ * amdgpu_crtc_flip and from the vblank irq handler.
++ */
++ if (!nonblock) {
++ ret = drm_atomic_helper_prepare_planes(dev, state);
++ if (ret)
++ return ret;
++ }
+
+ drm_atomic_helper_swap_state(dev, state);
+
+@@ -4458,6 +4465,10 @@ static int amdgpu_dm_atomic_commit(struct drm_device *dev,
+
+ amdgpu_dm_atomic_commit_tail(state);
+
++ if (!nonblock) {
++ drm_atomic_helper_cleanup_planes(dev, state);
++ }
++
+ return ret;
+ #endif
+ }
+@@ -4778,7 +4789,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
+ drm_atomic_helper_wait_for_flip_done(dev, state);
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) || defined(OS_NAME_RHEL_7_4)
+ drm_atomic_helper_cleanup_planes(dev, state);
++#endif
+ }
+
+
+--
+2.7.4
+