lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 04 Mar 2022 18:33:59 +0000
From:   Paul Cercueil <paul@...pouillou.net>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     Neil Armstrong <narmstrong@...libre.com>,
        Paul Boddie <paul@...die.org.uk>,
        Andrzej Hajda <andrzej.hajda@...el.com>,
        Maxime Ripard <maxime@...no.tech>,
        Jonas Karlman <jonas@...boo.se>,
        David Airlie <airlied@...ux.ie>,
        Robert Foss <robert.foss@...aro.org>,
        linux-mips <linux-mips@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Discussions about the Letux Kernel 
        <letux-kernel@...nphoenux.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>
Subject: Re: [Letux-kernel] [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce
 dw_hdmi_enable_poll()



Le ven., mars 4 2022 at 19:15:13 +0100, H. Nikolaus Schaller 
<hns@...delico.com> a écrit :
> Hi Paul,
> 
>>  Am 04.03.2022 um 19:04 schrieb Paul Cercueil <paul@...pouillou.net>:
>> 
>> 
>> 
>>  Le ven., mars 4 2022 at 18:51:14 +0100, H. Nikolaus Schaller 
>> <hns@...delico.com> a écrit :
>>>  Hi Paul, Neil,
>>>>  Am 04.03.2022 um 17:47 schrieb Paul Cercueil 
>>>> <paul@...pouillou.net>:
>>>>  From what I understood in Nikolaus' last message, HDMI hotplug is 
>>>> actually correctly detected, so there's no need for polling. What 
>>>> is missing is the call to drm_kms_helper_hotplug_event 
>>>> *somewhere*, so that the information is correctly relayed to 
>>>> userspace.
>>>  Exactly.
>>>  As Maxime pointed out it should already be called by 
>>> drm_helper_hpd_irq_event() in dw_hdmi_irq() but isn't
>>>  because mode_config.poll_enabled isn't enabled.
>>>  So we can either
>>>  a) enable mode_config.poll_enabled so that it is called by 
>>> drm_helper_hpd_irq_event() or
>>>  b) make drm_kms_helper_hotplug_event() being called explicitly in 
>>> dw_hdmi_irq().
>>>    We could guard that by mode_config.poll_enabled to avoid 
>>> drm_kms_helper_hotplug_event()
>>>    being called twice (but I think the "changed" mechanism will 
>>> take care of).
>>>>  I think this issue can be fixed by calling 
>>>> drm_bridge_connector_enable_hpd() on the connector in 
>>>> ingenic-drm-drv.c.
>>>  I don't see yet how this would solve it, but it may work.
>> 
>>  dw_hdmi_irq() calls drm_bridge_hpd_notify(), which would call 
>> bridge->hpd_cb() if it was non-NULL.
> 
> Ok, this is a case c).
> 
> I vaguely remember having tried to analyse what bridge->hpd_cb is but 
> stopped since it is NULL...
> 
>> 
>>  Calling drm_bridge_connector_enable_hpd() will set the 
>> bridge->hpd_cb() callback to point to drm_bridge_connector_hpd_cb(), 
>> which itself will call drm_kms_helper_hotplug_event(). Therefore, 
>> all that is missing is one call to drm_bridge_connector_enable_hpd().
> 
> Ah, ok, I see.
> 
>>>  Anyways, this all is a missing feature (sometimes called "bug") of 
>>> the *dw-hdmi driver* and IMHO
>>>  neither of the connector nor the ingenic-drm-drv.
> 
> Well, a little more analysis shows that 
> drm_bridge_connector_enable_hpd is called
> in the *-drv.c for some other plaforms:
> 
> https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/imx/dcss/dcss-dev.c#L292
> https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/imx/dcss/dcss-kms.c#L145
> https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/omapdrm/omap_drv.c#L393
> https://elixir.bootlin.com/linux/v5.17-rc6/source/drivers/gpu/drm/msm/hdmi/hdmi.c#L317
> 
>>>  So I think it should not be solved outside dw-hdmi.
> 
> Hm. Can we call drm_bridge_connector_enable_hpd() from inside dw-hdmi?
> 
> Or would this be the solution if merged? (I currently can't try code).
> 
> https://lore.kernel.org/lkml/a7d0b013-6114-07b3-0a7b-0d17db8a3982@cogentembedded.com/T/

Looks correct to me. It has been reviewed by two people so I believe it 
will be merged very soon.

Cheers,
-Paul


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ