From 6d3b747b63c5649d01bd18a9316b5754f26c37b3 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 20 Aug 2018 02:04:31 +0000 Subject: [PATCH] drm/atomic: Handling the case when setting old crtc for plane From Satendra Singh Thakur f1a64c117f1363f17cfc7e5bd410ec6222031501 in linux 4.4.y/4.4.146 fc2a69f3903dfd97cd47f593e642b47918c949df in mainline linux --- sys/dev/pci/drm/drm_atomic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/drm_atomic.c b/sys/dev/pci/drm/drm_atomic.c index 3241672ece0..6cb13fc6f52 100644 --- a/sys/dev/pci/drm/drm_atomic.c +++ b/sys/dev/pci/drm/drm_atomic.c @@ -960,7 +960,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.20.1