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

Pin-yen Lin posted 2 patches 2 months ago
[PATCH v2 1/2] drm/bridge: anx7625: Drop EDID cache on bridge power off
Posted by Pin-yen Lin 2 months ago
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(+)

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);
-- 
2.46.0.792.g87dc391469-goog
Re: [PATCH v2 1/2] drm/bridge: anx7625: Drop EDID cache on bridge power off
Posted by Doug Anderson 2 months ago
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
Re: [PATCH v2 1/2] drm/bridge: anx7625: Drop EDID cache on bridge power off
Posted by Doug Anderson 1 month, 3 weeks ago
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