diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 51932c72334e..31b31a35c8fe 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
| @@ -555,12 +555,16 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) | |||
| 555 | nv_connector->edid = NULL; | 555 | nv_connector->edid = NULL; |
| 556 | } | 556 | } |
| 557 | 557 | ||
| 558 | /* Outputs are only polled while runtime active, so acquiring a | 558 | /* Outputs are only polled while runtime active, so resuming the |
| 559 | * runtime PM ref here is unnecessary (and would deadlock upon | 559 | * device here is unnecessary (and would deadlock upon runtime suspend |
| 560 | * runtime suspend because it waits for polling to finish). | 560 | * because it waits for polling to finish). We do however, want to |
| 561 | * prevent the autosuspend timer from elapsing during this operation | ||
| 562 | * if possible. | ||
| 561 | */ | 563 | */ |
| 562 | if (!drm_kms_helper_is_poll_worker()) { | 564 | if (drm_kms_helper_is_poll_worker()) { |
| 563 | ret = pm_runtime_get_sync(connector->dev->dev); | 565 | pm_runtime_get_noresume(dev->dev); |
| 566 | } else { | ||
| 567 | ret = pm_runtime_get_sync(dev->dev); | ||
| 564 | if (ret < 0 && ret != -EACCES) | 568 | if (ret < 0 && ret != -EACCES) |
| 565 | return conn_status; | 569 | return conn_status; |
| 566 | } | 570 | } |
| @@ -638,10 +642,8 @@ detect_analog: | |||
| 638 | 642 | ||
| 639 | out: | 643 | out: |
| 640 | 644 | ||
| 641 | if (!drm_kms_helper_is_poll_worker()) { | 645 | pm_runtime_mark_last_busy(dev->dev); |
| 642 | pm_runtime_mark_last_busy(connector->dev->dev); | 646 | pm_runtime_put_autosuspend(dev->dev); |
| 643 | pm_runtime_put_autosuspend(connector->dev->dev); | ||
| 644 | } | ||
| 645 | 647 | ||
| 646 | return conn_status; | 648 | return conn_status; |
| 647 | } | 649 | } |
