aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_probe_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_probe_helper.c')
-rw-r--r--drivers/gpu/drm/drm_probe_helper.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index a18164f2f6d2..94ba39e34299 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -147,6 +147,8 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect
147 list_for_each_entry(mode, &connector->modes, head) 147 list_for_each_entry(mode, &connector->modes, head)
148 mode->status = MODE_UNVERIFIED; 148 mode->status = MODE_UNVERIFIED;
149 149
150 old_status = connector->status;
151
150 if (connector->force) { 152 if (connector->force) {
151 if (connector->force == DRM_FORCE_ON || 153 if (connector->force == DRM_FORCE_ON ||
152 connector->force == DRM_FORCE_ON_DIGITAL) 154 connector->force == DRM_FORCE_ON_DIGITAL)
@@ -156,33 +158,31 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect
156 if (connector->funcs->force) 158 if (connector->funcs->force)
157 connector->funcs->force(connector); 159 connector->funcs->force(connector);
158 } else { 160 } else {
159 old_status = connector->status;
160
161 connector->status = connector->funcs->detect(connector, true); 161 connector->status = connector->funcs->detect(connector, true);
162 }
163
164 /*
165 * Normally either the driver's hpd code or the poll loop should
166 * pick up any changes and fire the hotplug event. But if
167 * userspace sneaks in a probe, we might miss a change. Hence
168 * check here, and if anything changed start the hotplug code.
169 */
170 if (old_status != connector->status) {
171 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n",
172 connector->base.id,
173 connector->name,
174 old_status, connector->status);
162 175
163 /* 176 /*
164 * Normally either the driver's hpd code or the poll loop should 177 * The hotplug event code might call into the fb
165 * pick up any changes and fire the hotplug event. But if 178 * helpers, and so expects that we do not hold any
166 * userspace sneaks in a probe, we might miss a change. Hence 179 * locks. Fire up the poll struct instead, it will
167 * check here, and if anything changed start the hotplug code. 180 * disable itself again.
168 */ 181 */
169 if (old_status != connector->status) { 182 dev->mode_config.delayed_event = true;
170 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n", 183 if (dev->mode_config.poll_enabled)
171 connector->base.id, 184 schedule_delayed_work(&dev->mode_config.output_poll_work,
172 connector->name, 185 0);
173 old_status, connector->status);
174
175 /*
176 * The hotplug event code might call into the fb
177 * helpers, and so expects that we do not hold any
178 * locks. Fire up the poll struct instead, it will
179 * disable itself again.
180 */
181 dev->mode_config.delayed_event = true;
182 if (dev->mode_config.poll_enabled)
183 schedule_delayed_work(&dev->mode_config.output_poll_work,
184 0);
185 }
186 } 186 }
187 187
188 /* Re-enable polling in case the global poll config changed. */ 188 /* Re-enable polling in case the global poll config changed. */