Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 14:21:47 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 14:22:10 +0200
commitbf9c74ae1465355ff9615f2a0f7ef1031b26e725 (patch)
treeeaad873e6d104093781c513bfe6721e1a65b012f
parent7fe417c15de5900eeca67972fe5dca275a3aec00 (diff)
drm/atomic: Handling the case when setting old crtc for plane
(bsc#1051510).
-rw-r--r--patches.drivers/drm-atomic-Handling-the-case-when-setting-old-crtc-f45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.drivers/drm-atomic-Handling-the-case-when-setting-old-crtc-f b/patches.drivers/drm-atomic-Handling-the-case-when-setting-old-crtc-f
new file mode 100644
index 0000000000..9df79e024e
--- /dev/null
+++ b/patches.drivers/drm-atomic-Handling-the-case-when-setting-old-crtc-f
@@ -0,0 +1,45 @@
+From fc2a69f3903dfd97cd47f593e642b47918c949df Mon Sep 17 00:00:00 2001
+From: Satendra Singh Thakur <satendra.t@samsung.com>
+Date: Thu, 3 May 2018 11:19:32 +0530
+Subject: [PATCH] drm/atomic: Handling the case when setting old crtc for plane
+Git-commit: fc2a69f3903dfd97cd47f593e642b47918c949df
+Patch-mainline: v4.18-rc1
+References: bsc#1051510
+
+In the func drm_atomic_set_crtc_for_plane, with the current code,
+if crtc of the plane_state and crtc passed as argument to the func
+are same, entire func will executed in vein.
+It will get state of crtc and clear and set the bits in plane_mask.
+All these steps are not required for same old crtc.
+Ideally, we should do nothing in this case, this patch handles the same,
+and causes the program to return without doing anything in such scenario.
+
+Signed-off-by: Satendra Singh Thakur <satendra.t@samsung.com>
+Cc: Madhur Verma <madhur.verma@samsung.com>
+Cc: Hemanshu Srivastava <hemanshu.s@samsung.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Link: https://patchwork.freedesktop.org/patch/msgid/1525326572-25854-1-git-send-email-satendra.t@samsung.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/drm_atomic.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
+index 9bdd67781917..dc850b4b6e21 100644
+--- a/drivers/gpu/drm/drm_atomic.c
++++ b/drivers/gpu/drm/drm_atomic.c
+@@ -1425,7 +1425,9 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
+ {
+ struct drm_plane *plane = plane_state->plane;
+ struct drm_crtc_state *crtc_state;
+-
++ /* Nothing to do for same crtc*/
++ if (plane_state->crtc == crtc)
++ return 0;
+ if (plane_state->crtc) {
+ crtc_state = drm_atomic_get_crtc_state(plane_state->state,
+ plane_state->crtc);
+--
+2.18.0
+
diff --git a/series.conf b/series.conf
index e17f70a486..ab20b47c23 100644
--- a/series.conf
+++ b/series.conf
@@ -14650,6 +14650,7 @@
patches.drivers/drm-i915-dp-Send-DPCD-ON-for-MST-before-phy_up
patches.drivers/drm-i915-psr-Chase-psr.enabled-only-under-the-psr.lo
patches.drivers/drm-exynos-Allow-DRM_EXYNOS-on-s5pv210
+ patches.drivers/drm-atomic-Handling-the-case-when-setting-old-crtc-f
patches.drivers/drm-i915-Don-t-request-a-bug-report-for-unsafe-modul
patches.drivers/drm-amdgpu-Add-APU-support-in-vi_set_uvd_clocks
patches.drivers/drm-amdgpu-Add-APU-support-in-vi_set_vce_clocks