[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210520064508.3121211-1-pihsun@chromium.org>
Date: Thu, 20 May 2021 14:44:52 +0800
From: Pi-Hsun Shih <pihsun@...omium.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Pi-Hsun Shih <pihsun@...omium.org>,
Tzung-Bi Shih <tzungbi@...gle.com>,
Andrzej Hajda <a.hajda@...sung.com>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, Xin Ji <xji@...logixsemi.com>,
Hsin-Yi Wang <hsinyi@...omium.org>,
dri-devel@...ts.freedesktop.org (open list:DRM DRIVERS),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] 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@...omium.org>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 29493cc2d300..7519b7a0f29d 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -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);
@@ -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
base-commit: 7a42b92b6d30c3f09629c7d5ada9e3de2aba01af
--
2.31.1.751.gd2f1c929bd-goog
Powered by blists - more mailing lists