|
@@ -570,9 +570,15 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
|
|
nv_connector->edid = NULL;
|
|
nv_connector->edid = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
- ret = pm_runtime_get_sync(connector->dev->dev);
|
|
|
|
- if (ret < 0 && ret != -EACCES)
|
|
|
|
- return conn_status;
|
|
|
|
|
|
+ /* Outputs are only polled while runtime active, so acquiring a
|
|
|
|
+ * runtime PM ref here is unnecessary (and would deadlock upon
|
|
|
|
+ * runtime suspend because it waits for polling to finish).
|
|
|
|
+ */
|
|
|
|
+ if (!drm_kms_helper_is_poll_worker()) {
|
|
|
|
+ ret = pm_runtime_get_sync(connector->dev->dev);
|
|
|
|
+ if (ret < 0 && ret != -EACCES)
|
|
|
|
+ return conn_status;
|
|
|
|
+ }
|
|
|
|
|
|
nv_encoder = nouveau_connector_ddc_detect(connector);
|
|
nv_encoder = nouveau_connector_ddc_detect(connector);
|
|
if (nv_encoder && (i2c = nv_encoder->i2c) != NULL) {
|
|
if (nv_encoder && (i2c = nv_encoder->i2c) != NULL) {
|
|
@@ -647,8 +653,10 @@ detect_analog:
|
|
|
|
|
|
out:
|
|
out:
|
|
|
|
|
|
- pm_runtime_mark_last_busy(connector->dev->dev);
|
|
|
|
- pm_runtime_put_autosuspend(connector->dev->dev);
|
|
|
|
|
|
+ if (!drm_kms_helper_is_poll_worker()) {
|
|
|
|
+ pm_runtime_mark_last_busy(connector->dev->dev);
|
|
|
|
+ pm_runtime_put_autosuspend(connector->dev->dev);
|
|
|
|
+ }
|
|
|
|
|
|
return conn_status;
|
|
return conn_status;
|
|
}
|
|
}
|