[PATCH] drm: call connector->dpms(OFF) when disabling

Rob Clark rob.clark at linaro.org
Fri Sep 28 00:27:18 PDT 2012


From: Rob Clark <rob at ti.com>

When disabling unused connectors, be sure to call connector->dpms(OFF),
so if there is actually some IP to turn off (such as external bridge
chips, etc), these actually do get turned off.

Signed-off-by: Rob Clark <rob at ti.com>
Tested-by: Roger Quadros <rogerq at ti.com>

---
 drivers/gpu/drm/drm_crtc_helper.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 3252e70..000cda4 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -244,16 +244,16 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
 	struct drm_crtc *crtc;
 
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-		if (!connector->encoder)
-			continue;
 		if (connector->status == connector_status_disconnected)
 			connector->encoder = NULL;
+		if (!connector->encoder)
+			connector->funcs->dpms(connector, DRM_MODE_DPMS_OFF);
 	}
 
 	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
 		if (!drm_helper_encoder_in_use(encoder)) {
 			drm_encoder_disable(encoder);
-			/* disconnector encoder from any connector */
+			/* disconnect encoder from any connector */
 			encoder->crtc = NULL;
 		}
 	}
-- 
1.7.9.5



More information about the dri-devel mailing list