OpenCloudOS-Kernel/include/drm/display
Douglas Anderson 9429b12dfc drm/dp: Don't attempt AUX transfers when eDP panels are not powered
[ Upstream commit 8df1ddb5bf11ab820ad991e164dab82c0960add9 ]

If an eDP panel is not powered on then any attempts to talk to it over
the DP AUX channel will timeout. Unfortunately these attempts may be
quite slow. Userspace can initiate these attempts either via a
/dev/drm_dp_auxN device or via the created i2c device.

Making the DP AUX drivers timeout faster is a difficult proposition.
In theory we could just poll the panel's HPD line in the AUX transfer
function and immediately return an error there. However, this is
easier said than done. For one thing, there's no hard requirement to
hook the HPD line up for eDP panels and it's OK to just delay a fixed
amount. For another thing, the HPD line may not be fast to probe. On
parade-ps8640 we need to wait for the bridge chip's firmware to boot
before we can get the HPD line and this is a slow process.

The fact that the transfers are taking so long to timeout is causing
real problems. The open source fwupd daemon sometimes scans DP busses
looking for devices whose firmware need updating. If it happens to
scan while a panel is turned off this scan can take a long time. The
fwupd daemon could try to be smarter and only scan when eDP panels are
turned on, but we can also improve the behavior in the kernel.

Let's let eDP panels drivers specify that a panel is turned off and
then modify the common AUX transfer code not to attempt a transfer in
this case.

Tested-by: Steev Klimaszewski <steev@kali.org>
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
Tested-by: Eizan Miyamoto <eizan@chromium.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240202141109.1.I24277520ac754ea538c9b14578edc94e1df11b48@changeid
Stable-dep-of: 5e842d55bad7 ("drm/panel: atna33xc20: Fix unbalanced regulator in the case HPD doesn't assert")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:11:57 +02:00
..
drm_dp.h drm/display/dp: Fix the DP DSC Receiver cap size 2023-08-22 10:52:11 +03:00
drm_dp_aux_bus.h drm/dp: Add callbacks to make using DP AUX bus properly easier 2022-06-02 15:14:16 -07:00
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm/dp: Don't attempt AUX transfers when eDP panels are not powered 2024-06-12 11:11:57 +02:00
drm_dp_mst_helper.h drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
drm_dsc.h
drm_dsc_helper.h drm/display/dsc: Add drm_dsc_get_bpp_int helper 2023-06-15 12:58:56 +03:00
drm_hdcp.h
drm_hdcp_helper.h
drm_hdmi_helper.h
drm_scdc.h
drm_scdc_helper.h drm/scdc-helper: Pimp SCDC debugs 2023-04-06 01:30:12 +03:00