aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index f6829ba58e86..738a4294d820 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -122,7 +122,6 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
122 int count = 0; 122 int count = 0;
123 int mode_flags = 0; 123 int mode_flags = 0;
124 bool verbose_prune = true; 124 bool verbose_prune = true;
125 enum drm_connector_status old_status;
126 125
127 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, 126 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id,
128 drm_get_connector_name(connector)); 127 drm_get_connector_name(connector));
@@ -138,32 +137,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
138 if (connector->funcs->force) 137 if (connector->funcs->force)
139 connector->funcs->force(connector); 138 connector->funcs->force(connector);
140 } else { 139 } else {
141 old_status = connector->status;
142
143 connector->status = connector->funcs->detect(connector, true); 140 connector->status = connector->funcs->detect(connector, true);
144
145 /*
146 * Normally either the driver's hpd code or the poll loop should
147 * pick up any changes and fire the hotplug event. But if
148 * userspace sneaks in a probe, we might miss a change. Hence
149 * check here, and if anything changed start the hotplug code.
150 */
151 if (old_status != connector->status) {
152 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n",
153 connector->base.id,
154 drm_get_connector_name(connector),
155 old_status, connector->status);
156
157 /*
158 * The hotplug event code might call into the fb
159 * helpers, and so expects that we do not hold any
160 * locks. Fire up the poll struct instead, it will
161 * disable itself again.
162 */
163 dev->mode_config.delayed_event = true;
164 schedule_delayed_work(&dev->mode_config.output_poll_work,
165 0);
166 }
167 } 141 }
168 142
169 /* Re-enable polling in case the global poll config changed. */ 143 /* Re-enable polling in case the global poll config changed. */
@@ -1011,11 +985,7 @@ static void output_poll_execute(struct work_struct *work)
1011 struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_work); 985 struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_work);
1012 struct drm_connector *connector; 986 struct drm_connector *connector;
1013 enum drm_connector_status old_status; 987 enum drm_connector_status old_status;
1014 bool repoll = false, changed; 988 bool repoll = false, changed = false;
1015
1016 /* Pick up any changes detected by the probe functions. */
1017 changed = dev->mode_config.delayed_event;
1018 dev->mode_config.delayed_event = false;
1019 989
1020 if (!drm_kms_helper_poll) 990 if (!drm_kms_helper_poll)
1021 return; 991 return;