]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/armada: remove temporary crtc state
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 30 Jul 2018 10:52:34 +0000 (11:52 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 30 Jul 2018 10:52:34 +0000 (11:52 +0100)
Now that we have the CRTC using the atomic modeset transitional helper,
there is no need to build a temporary crtc state anymore - we can use
the CRTC atomic state directly.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/armada/armada_crtc.c

index 5bb097b75b441ec2a3bc1f320b0aa4d5b22e0ac4..0566739118187b95ee217ec5692b1de90c4314a2 100644 (file)
@@ -1099,13 +1099,13 @@ int armada_drm_plane_atomic_check(struct drm_plane *plane,
 {
        if (state->fb && !WARN_ON(!state->crtc)) {
                struct drm_crtc *crtc = state->crtc;
-               struct drm_crtc_state crtc_state = {
-                       .crtc = crtc,
-                       .enable = crtc->enabled,
-                       .mode = crtc->mode,
-               };
+               struct drm_crtc_state *crtc_state;
 
-               return drm_atomic_helper_check_plane_state(state, &crtc_state,
+               if (state->state)
+                       crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc);
+               else
+                       crtc_state = crtc->state;
+               return drm_atomic_helper_check_plane_state(state, crtc_state,
                                                           0, INT_MAX,
                                                           true, false);
        } else {