drm/kms: add crtc disable function
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 11 Jun 2010 21:04:35 +0000 (17:04 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 7 Jul 2010 08:38:32 +0000 (18:38 +1000)
More explicit than dpms. Same as the encoder disable function.

Need this to explicity disconnect plls from crtcs for reuse when you
plls:crtcs ratio isn't 1:1.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc_helper.c
include/drm/drm_crtc_helper.h

index 9b2a54117c91c0a306c41c7eb437b641bbd58b31..fa1323ff56b3ada755acebf0a92500f090814229 100644 (file)
@@ -241,7 +241,10 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
                struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
                crtc->enabled = drm_helper_crtc_in_use(crtc);
                if (!crtc->enabled) {
-                       crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
+                       if (crtc_funcs->disable)
+                               (*crtc_funcs->disable)(crtc);
+                       else
+                               (*crtc_funcs->dpms)(crtc, DRM_MODE_DPMS_OFF);
                        crtc->fb = NULL;
                }
        }
index 1121f7799c6ff527838ec50052d51bc10b10e2e7..7e3c9766acbabc6dc8fb7086c3880f82000e4564 100644 (file)
@@ -63,6 +63,9 @@ struct drm_crtc_helper_funcs {
 
        /* reload the current crtc LUT */
        void (*load_lut)(struct drm_crtc *crtc);
+
+       /* disable crtc when not in use - more explicit than dpms off */
+       void (*disable)(struct drm_crtc *crtc);
 };
 
 struct drm_encoder_helper_funcs {