Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/bridge: anx7625: Synchronously run runtime suspend.

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: 60487584a79a ("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

authored by

Pi-Hsun Shih and committed by
Robert Foss
3203e497 07775fc1

+2 -2
+2 -2
drivers/gpu/drm/bridge/analogix/anx7625.c
··· 1255 1255 1256 1256 pm_runtime_get_sync(dev); 1257 1257 edid_num = sp_tx_edid_read(ctx, p_edid->edid_raw_data); 1258 - pm_runtime_put(dev); 1258 + pm_runtime_put_sync(dev); 1259 1259 1260 1260 if (edid_num < 1) { 1261 1261 DRM_DEV_ERROR(dev, "Fail to read EDID: %d\n", edid_num); ··· 1573 1573 1574 1574 anx7625_dp_stop(ctx); 1575 1575 1576 - pm_runtime_put(dev); 1576 + pm_runtime_put_sync(dev); 1577 1577 } 1578 1578 1579 1579 static enum drm_connector_status