drm/atomic: Handling the case when setting old crtc for plane
authorjsg <jsg@openbsd.org>
Mon, 20 Aug 2018 02:04:31 +0000 (02:04 +0000)
committerjsg <jsg@openbsd.org>
Mon, 20 Aug 2018 02:04:31 +0000 (02:04 +0000)
From Satendra Singh Thakur
f1a64c117f1363f17cfc7e5bd410ec6222031501 in linux 4.4.y/4.4.146
fc2a69f3903dfd97cd47f593e642b47918c949df in mainline linux

sys/dev/pci/drm/drm_atomic.c

index 3241672..6cb13fc 100644 (file)
@@ -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);