Skip to content

Commit

Permalink
drm/bridge: anx7625: Synchronously run runtime suspend.
Browse files Browse the repository at this point in the history
Originally when using pm_runtime_put, there's a chance that the runtime
suspend hook will be run after the following anx7625_bridge_mode_set
call, resulting in the display_timing_valid field to be cleared, and the
following power on fail.

Change all pm_runtime_put to pm_runtime_put_sync, so all power off
operations are guaranteed to be done after the call returns.

Fixes: 6048758 ("drm/bridge: anx7625: refactor power control to use runtime PM framework")
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Tzung-Bi Shih <tzungbi@google.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210520064508.3121211-1-pihsun@chromium.org
  • Loading branch information
peter50216 authored and robertfoss committed May 20, 2021
1 parent 07775fc commit 3203e49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/bridge/analogix/anx7625.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ static struct edid *anx7625_get_edid(struct anx7625_data *ctx)

pm_runtime_get_sync(dev);
edid_num = sp_tx_edid_read(ctx, p_edid->edid_raw_data);
pm_runtime_put(dev);
pm_runtime_put_sync(dev);

if (edid_num < 1) {
DRM_DEV_ERROR(dev, "Fail to read EDID: %d\n", edid_num);
Expand Down Expand Up @@ -1573,7 +1573,7 @@ static void anx7625_bridge_disable(struct drm_bridge *bridge)

anx7625_dp_stop(ctx);

pm_runtime_put(dev);
pm_runtime_put_sync(dev);
}

static enum drm_connector_status
Expand Down

0 comments on commit 3203e49

Please sign in to comment.