DRM Master ignoring hotplug event during display switching (QT)

Maxime Ripard maxime at cerno.tech
Wed Mar 30 08:52:54 UTC 2022


On Tue, Mar 29, 2022 at 11:38:32PM +0530, Jagan Teki wrote:
> Hi all,
> 
> I have implemented runtime display switching in the MIPI switch design
> where LVDS and HDMI bridges are selected with the help of runtime
> GPIO.
> 
> Initial discussion on the same can be found here,
> https://www.spinics.net/lists/dri-devel/msg318524.html
> 
> The implementation has been done by creating each connector at
> runtime. The default boot will create the LVDS connector and based on
> the HDMI plug-in the ISR.
> 
> 1. forcing the LVDS to disconnect
> 2. call drm_kms_helper_hotplug_event
> 3. detach the bridge chain
> 4. attach the new bridge chain (HDMI)
> 5. call drm_kms_helper_hotplug_event
> 
> do the reverse when we unplug the HDMI cable.
> 
> So, the bridge chains are attached and detached based on GPIO
> Interrupt which is indeed identified based on the physical HDMIA
> connector.
> 
> Pipeline for LVDS,
> mxfsb => nwl-dsi => display-switch => sn65dsi83=> panel-bridge
> 
> Pipeline for HDMI,
> mxfsb => nwl-dsi => display-switch => adv7511 => display-connector
> 
> With this, implementation and I can able switch the displays with
> default DRM (without specific DRM applications) where the LVDS is ON
> by default and when HDMI plug-in the LVDS OFF/HDMI ON, and when HDMI
> unplug the HDMI OFF/LVDS ON.
> 
> However, with QT5 I can see the DRM Master ignoring hotplug event by
> returning 0 on drm_master_internal_acquire in
> drm_fb_helper_hotplug_event. With this the hotplug returned early so
> it cannot able to disconnect and connect the new switching connector.
> 
> Any help?

I'm not sure why you started another discussion with pretty much the
same content, but you can't rely on userspace handling the hotplug
event. You'll have to deal with the case where it just doesn't.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220330/15f15554/attachment.sig>


More information about the dri-devel mailing list