OpenCloudOS-Kernel/drivers/gpu/drm/vc4
Maxime Ripard daf4e7d7b9
drm/vc4: hdmi: Actually check for the connector status in hotplug
The drm_helper_hpd_irq_event() documentation states that this function
is "useful for drivers which can't or don't track hotplug interrupts for
each connector." and that "Drivers which support hotplug interrupts for
each connector individually and which have a more fine-grained detect
logic should bypass this code and directly call
drm_kms_helper_hotplug_event()". This is thus what we ended-up doing.

However, what this actually means, and is further explained in the
drm_kms_helper_hotplug_event() documentation, is that
drm_kms_helper_hotplug_event() should be called by drivers that can
track the connection status change, and if it has changed we should call
that function.

This underlying expectation we failed to provide is that the caller of
drm_kms_helper_hotplug_event() should call drm_helper_probe_detect() to
probe the new status of the connector.

Since we didn't do it, it meant that even though we were sending the
notification to user-space and the DRM clients that something changed we
never probed or updated our internal connector status ourselves.

This went mostly unnoticed since the detect callback usually doesn't
have any side-effect. Also, if we were using the DRM fbdev emulation
(which is a DRM client), or any user-space application that can deal
with hotplug events, chances are they would react to the hotplug event
by probing the connector status eventually.

However, now that we have to enable the scrambler in detect() if it was
enabled it has a side effect, and an application such as Kodi or
modetest doesn't deal with hotplug events. This resulted with a black
screen when Kodi or modetest was running when a screen was disconnected
and then reconnected, or switched off and on.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210914101724.266570-3-maxime@cerno.tech
2021-09-28 12:29:13 +02:00
..
Kconfig drm/vc4: hdmi: Register HDMI codec 2021-06-23 14:32:28 +02:00
Makefile drm/vc4: hdmi: Add PHY init and disable function 2020-09-07 18:06:04 +02:00
vc4_bo.c drm/vc4: Initialize vc4_drm_driver with CMA helper defaults 2021-01-15 10:39:05 +01:00
vc4_crtc.c drm/vc4: crtc: Lookup the encoder from the register at boot 2021-05-24 14:42:07 +02:00
vc4_debugfs.c drm/vc4/vc4_debugfs: Demote non-conformant kernel-doc headers 2020-11-18 11:51:58 +01:00
vc4_dpi.c drm/vc4: dpi: Switch to devm_drm_of_get_bridge 2021-09-14 10:39:30 +02:00
vc4_drv.c drm/vc4: Make use of the helper function devm_platform_ioremap_resource() 2021-09-01 11:43:25 +02:00
vc4_drv.h drm/vc4: Convert to Linux IRQ interfaces 2021-08-10 20:13:53 +02:00
vc4_dsi.c drm/vc4: dsi: Switch to devm_drm_of_get_bridge 2021-09-14 10:40:24 +02:00
vc4_fence.c
vc4_gem.c drm/vc4: remove unneeded variable: "ret" 2021-02-09 17:16:57 +01:00
vc4_hdmi.c drm/vc4: hdmi: Actually check for the connector status in hotplug 2021-09-28 12:29:13 +02:00
vc4_hdmi.h drm/vc4: hdmi: Remove redundant variables 2021-07-29 10:41:16 +02:00
vc4_hdmi_phy.c drm/vc4: hdmi: Use the connector state pixel rate for the PHY 2020-12-16 10:11:48 +01:00
vc4_hdmi_regs.h drm/vc4: hdmi: Enable the scrambler 2021-05-24 14:43:36 +02:00
vc4_hvs.c drm pull for 5.12-rc1 2021-02-21 14:44:44 -08:00
vc4_irq.c drm/vc4: Convert to Linux IRQ interfaces 2021-08-10 20:13:53 +02:00
vc4_kms.c drm-misc-next for v5.15: 2021-07-21 11:58:28 +10:00
vc4_packet.h
vc4_perfmon.c drm/vc4: replace idr_init() by idr_init_base() 2020-11-06 11:48:43 +01:00
vc4_plane.c Merge drm/drm-fixes into drm-next 2021-04-13 23:15:09 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: hdmi: Set HDMI_MAI_FMT 2021-06-23 14:32:27 +02:00
vc4_render_cl.c
vc4_trace.h
vc4_trace_points.c
vc4_txp.c drm/vc4: txp: Properly set the possible_crtcs mask 2021-05-24 14:41:28 +02:00
vc4_v3d.c drm/vc4: Convert to Linux IRQ interfaces 2021-08-10 20:13:53 +02:00
vc4_validate.c
vc4_validate_shaders.c
vc4_vec.c drm/vc4: Separate VEC compatible variants 2021-05-24 13:52:33 +02:00