diff mbox series

[v2,1/2] drm/bridge: anx7625: Drop EDID cache on bridge power off

Message ID 20240926092931.3870342-2-treapking@chromium.org (mailing list archive)
State New, archived
Headers show
Series Drop EDID cache for it6505/anx7625 when the bridge is powered off | expand

Commit Message

Pin-yen Lin Sept. 26, 2024, 9:29 a.m. UTC
The bridge might miss the display change events when it's powered off.
This happens when a user changes the external monitor when the system
is suspended and the embedded controller doesn't not wake AP up.

It's also observed that one DP-to-HDMI bridge doesn't work correctly
when there is no EDID read after it is powered on.

Drop the cache to force an EDID read after system resume to fix this.

Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

---

Changes in v2:
- Only drop the EDID cache for anx7625 when it's not in eDP mode
- Collect review tag

 drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Doug Anderson Sept. 26, 2024, 5:15 p.m. UTC | #1
Hi,

On Thu, Sep 26, 2024 at 2:29 AM Pin-yen Lin <treapking@chromium.org> wrote:
>
> The bridge might miss the display change events when it's powered off.
> This happens when a user changes the external monitor when the system
> is suspended and the embedded controller doesn't not wake AP up.
>
> It's also observed that one DP-to-HDMI bridge doesn't work correctly
> when there is no EDID read after it is powered on.
>
> Drop the cache to force an EDID read after system resume to fix this.
>
> Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

I don't think it needs a re-spin, but for future reference you're
always supposed to move your own Signed-off-by to the bottom whenever
you "touch" a patch. Thus yours should be below Dmitry's tag.

In any case,

Reviewed-by: Douglas Anderson <dianders@chromium.org>

If these haven't been applied and there's no other feedback at the end
of next week I'll plan to apply both this and the next patch to
drm-misc-fixes.


-Doug
Doug Anderson Oct. 3, 2024, 8:28 p.m. UTC | #2
Hi,

On Thu, Sep 26, 2024 at 10:15 AM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Thu, Sep 26, 2024 at 2:29 AM Pin-yen Lin <treapking@chromium.org> wrote:
> >
> > The bridge might miss the display change events when it's powered off.
> > This happens when a user changes the external monitor when the system
> > is suspended and the embedded controller doesn't not wake AP up.
> >
> > It's also observed that one DP-to-HDMI bridge doesn't work correctly
> > when there is no EDID read after it is powered on.
> >
> > Drop the cache to force an EDID read after system resume to fix this.
> >
> > Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
> > Signed-off-by: Pin-yen Lin <treapking@chromium.org>
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> I don't think it needs a re-spin, but for future reference you're
> always supposed to move your own Signed-off-by to the bottom whenever
> you "touch" a patch. Thus yours should be below Dmitry's tag.
>
> In any case,
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
>
> If these haven't been applied and there's no other feedback at the end
> of next week I'll plan to apply both this and the next patch to
> drm-misc-fixes.

Dang. My brain wasn't working quite right and I pushed these to
drm-misc-next instead of drm-misc-fixes. I'll assume that this is OK
because the problem fixed isn't exactly new and the patch will still
make it to mainline before too long. If this causes anyone problems
let me know and I can also land it on drm-misc-fixes.

[1/2] drm/bridge: anx7625: Drop EDID cache on bridge power off
      commit: 00ae002116a14c2e6a342c4c9ae080cdbb9b4b21

-Doug
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 88e4aa5830f3..5c6bd7be25c0 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -2561,6 +2561,8 @@  static int __maybe_unused anx7625_runtime_pm_suspend(struct device *dev)
 	mutex_lock(&ctx->lock);
 
 	anx7625_stop_dp_work(ctx);
+	if (!ctx->pdata.panel_bridge)
+		anx7625_remove_edid(ctx);
 	anx7625_power_standby(ctx);
 
 	mutex_unlock(&ctx->lock);