[Intel-gfx] [PATCH 06/14] drm: kill unnecessary calls to connector->detect

Daniel Vetter daniel.vetter at ffwll.ch
Thu May 24 21:26:41 CEST 2012


Only call that function if something has actually changed (i.e. in the
output polling or hdp handling functions) or when userspace asks for
the information and DRM_CONNECTOR_POLL_FORCE is set.

Let's see how many bugs this uncovers.

v2: Run ->detect if the current connector status is 'unknown' -
otherwise we won't ever detect the boot-up/resume state correctly.

Signed-Off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/drm_crtc_helper.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 8ea1c1e..db93e4d 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -107,7 +107,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 			connector->status = connector_status_disconnected;
 		if (connector->funcs->force)
 			connector->funcs->force(connector);
-	} else {
+	} else if (connector->polled & DRM_CONNECTOR_POLL_FORCE ||
+		   connector->status == connector_status_unknown) {
 		connector->status = connector->funcs->detect(connector, true);
 		drm_kms_helper_poll_enable(dev);
 	}
-- 
1.7.7.6




More information about the Intel-gfx mailing list