drm/armada: use drm_plane_force_disable() to disable the overlay plane
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 29 Jun 2015 16:52:42 +0000 (17:52 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 15 Sep 2015 15:26:50 +0000 (16:26 +0100)
Use drm_plane_force_disable() to disable the overlay plane on a mode_set
rather than coding this ourselves.

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

index 418594b19d1d5c6962d94d3b22689141604f7bee..bbf5ff785cd29f06d95b2f3e431ec1b62ca46578 100644 (file)
@@ -348,17 +348,11 @@ static void armada_drm_crtc_prepare(struct drm_crtc *crtc)
        /*
         * If we have an overlay plane associated with this CRTC, disable
         * it before the modeset to avoid its coordinates being outside
-        * the new mode parameters.  DRM doesn't provide help with this.
+        * the new mode parameters.
         */
        plane = dcrtc->plane;
-       if (plane) {
-               struct drm_framebuffer *fb = plane->fb;
-
-               plane->funcs->disable_plane(plane);
-               plane->fb = NULL;
-               plane->crtc = NULL;
-               drm_framebuffer_unreference(fb);
-       }
+       if (plane)
+               drm_plane_force_disable(plane);
 }
 
 /* The mode_config.mutex will be held for this call */