mbox series

[v3,0/7] drm/bridge_connector: perform HPD enablement automatically

Message ID 20221102180705.459294-1-dmitry.baryshkov@linaro.org (mailing list archive)
Headers show
Series drm/bridge_connector: perform HPD enablement automatically | expand

Message

Dmitry Baryshkov Nov. 2, 2022, 6:06 p.m. UTC
From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
DRM driver do a proper work of calling
drm_bridge_connector_en/disable_hpd() in right places. Rather than
teaching each and every driver how to properly handle
drm_bridge_connector's HPD, make that automatic.

Add two additional drm_connector helper funcs: enable_hpd() and
disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
is the time where the drm_bridge_connector's functions are called by the
drivers too).

Changes since v2:
 - Fixed a typo in the commit message of the second patch.

Changes since v1:
 - Rebased on top of v6.1-rc1
 - Removed the drm_bridge_connector_enable_hpd() from
   drm_bridge_connector_init()
 - Removed extra underscore prefix from
   drm_bridge_connector_en/disable_hpd() helpers

Dmitry Baryshkov (7):
  drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
  drm/probe-helper: enable and disable HPD on connectors
  drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
  drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
  drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
  drm/omap: stop using drm_bridge_connector_en/disable_hpd()
  drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()

 drivers/gpu/drm/drm_bridge_connector.c   | 27 +++-------------
 drivers/gpu/drm/drm_probe_helper.c       | 40 ++++++++++++++++++-----
 drivers/gpu/drm/imx/dcss/dcss-dev.c      |  4 ---
 drivers/gpu/drm/imx/dcss/dcss-kms.c      |  2 --
 drivers/gpu/drm/msm/hdmi/hdmi.c          |  2 --
 drivers/gpu/drm/omapdrm/omap_drv.c       | 41 ------------------------
 include/drm/drm_bridge_connector.h       |  2 --
 include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++
 8 files changed, 59 insertions(+), 81 deletions(-)

Comments

Dmitry Baryshkov Dec. 28, 2022, 9:58 p.m. UTC | #1
On 02/11/2022 20:06, Dmitry Baryshkov wrote:
>  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
> DRM driver do a proper work of calling
> drm_bridge_connector_en/disable_hpd() in right places. Rather than
> teaching each and every driver how to properly handle
> drm_bridge_connector's HPD, make that automatic.
> 
> Add two additional drm_connector helper funcs: enable_hpd() and
> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
> is the time where the drm_bridge_connector's functions are called by the
> drivers too).

Since we are at the beginning of the development window, gracious ping 
for this patchset.

It would be nice to finally handle the bridge_connector's hpd properly. 
Calling drm_bridge_connector_enable_hpd() from 
drm_bridge_connector_init() is not a proper way to do this. It results 
in calling bridge->funcs->hpd_enable() before the rest of the pipeline 
was set up properly.

> 
> Changes since v2:
>   - Fixed a typo in the commit message of the second patch.
> 
> Changes since v1:
>   - Rebased on top of v6.1-rc1
>   - Removed the drm_bridge_connector_enable_hpd() from
>     drm_bridge_connector_init()
>   - Removed extra underscore prefix from
>     drm_bridge_connector_en/disable_hpd() helpers
> 
> Dmitry Baryshkov (7):
>    drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
>    drm/probe-helper: enable and disable HPD on connectors
>    drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
>    drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
>    drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
>    drm/omap: stop using drm_bridge_connector_en/disable_hpd()
>    drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()
> 
>   drivers/gpu/drm/drm_bridge_connector.c   | 27 +++-------------
>   drivers/gpu/drm/drm_probe_helper.c       | 40 ++++++++++++++++++-----
>   drivers/gpu/drm/imx/dcss/dcss-dev.c      |  4 ---
>   drivers/gpu/drm/imx/dcss/dcss-kms.c      |  2 --
>   drivers/gpu/drm/msm/hdmi/hdmi.c          |  2 --
>   drivers/gpu/drm/omapdrm/omap_drv.c       | 41 ------------------------
>   include/drm/drm_bridge_connector.h       |  2 --
>   include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++
>   8 files changed, 59 insertions(+), 81 deletions(-)
>
Tomi Valkeinen Jan. 4, 2023, 7:29 a.m. UTC | #2
On 28/12/2022 23:58, Dmitry Baryshkov wrote:
> On 02/11/2022 20:06, Dmitry Baryshkov wrote:
>>  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
>> DRM driver do a proper work of calling
>> drm_bridge_connector_en/disable_hpd() in right places. Rather than
>> teaching each and every driver how to properly handle
>> drm_bridge_connector's HPD, make that automatic.
>>
>> Add two additional drm_connector helper funcs: enable_hpd() and
>> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
>> is the time where the drm_bridge_connector's functions are called by the
>> drivers too).
> 
> Since we are at the beginning of the development window, gracious ping 
> for this patchset.
> 
> It would be nice to finally handle the bridge_connector's hpd properly. 
> Calling drm_bridge_connector_enable_hpd() from 
> drm_bridge_connector_init() is not a proper way to do this. It results 
> in calling bridge->funcs->hpd_enable() before the rest of the pipeline 
> was set up properly.

For the series:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

I've been using this series in my local branch for quite a while to fix 
the HPD issues. Works for me.

I still think the "fix" aspect should be highlighted more here, as the 
current upstream triggers a WARN for "Hot plug detection already 
enabled" (at least) on OMAP.

  Tomi
Neil Armstrong Jan. 4, 2023, 9:05 a.m. UTC | #3
On 04/01/2023 08:29, Tomi Valkeinen wrote:
> On 28/12/2022 23:58, Dmitry Baryshkov wrote:
>> On 02/11/2022 20:06, Dmitry Baryshkov wrote:
>>>  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
>>> DRM driver do a proper work of calling
>>> drm_bridge_connector_en/disable_hpd() in right places. Rather than
>>> teaching each and every driver how to properly handle
>>> drm_bridge_connector's HPD, make that automatic.
>>>
>>> Add two additional drm_connector helper funcs: enable_hpd() and
>>> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
>>> is the time where the drm_bridge_connector's functions are called by the
>>> drivers too).
>>
>> Since we are at the beginning of the development window, gracious ping for this patchset.
>>
>> It would be nice to finally handle the bridge_connector's hpd properly. Calling drm_bridge_connector_enable_hpd() from drm_bridge_connector_init() is not a proper way to do this. It results in calling bridge->funcs->hpd_enable() before the rest of the pipeline was set up properly.
> 
> For the series:
> 
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> 
> I've been using this series in my local branch for quite a while to fix the HPD issues. Works for me.
> 
> I still think the "fix" aspect should be highlighted more here, as the current upstream triggers a WARN for "Hot plug detection already enabled" (at least) on OMAP.

LGTM then !

Tomi, Dmitry, I can push the whole serie via drm-misc-next or -fixes then, as you wish.

Neil

> 
>   Tomi
>
Dmitry Baryshkov Jan. 5, 2023, 12:31 p.m. UTC | #4
On 04/01/2023 11:05, Neil Armstrong wrote:
> On 04/01/2023 08:29, Tomi Valkeinen wrote:
>> On 28/12/2022 23:58, Dmitry Baryshkov wrote:
>>> On 02/11/2022 20:06, Dmitry Baryshkov wrote:
>>>>  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
>>>> DRM driver do a proper work of calling
>>>> drm_bridge_connector_en/disable_hpd() in right places. Rather than
>>>> teaching each and every driver how to properly handle
>>>> drm_bridge_connector's HPD, make that automatic.
>>>>
>>>> Add two additional drm_connector helper funcs: enable_hpd() and
>>>> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
>>>> is the time where the drm_bridge_connector's functions are called by 
>>>> the
>>>> drivers too).
>>>
>>> Since we are at the beginning of the development window, gracious 
>>> ping for this patchset.
>>>
>>> It would be nice to finally handle the bridge_connector's hpd 
>>> properly. Calling drm_bridge_connector_enable_hpd() from 
>>> drm_bridge_connector_init() is not a proper way to do this. It 
>>> results in calling bridge->funcs->hpd_enable() before the rest of the 
>>> pipeline was set up properly.
>>
>> For the series:
>>
>> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>>
>> I've been using this series in my local branch for quite a while to 
>> fix the HPD issues. Works for me.

Thanks!

>>
>> I still think the "fix" aspect should be highlighted more here, as the 
>> current upstream triggers a WARN for "Hot plug detection already 
>> enabled" (at least) on OMAP.
> 
> LGTM then !
> 
> Tomi, Dmitry, I can push the whole serie via drm-misc-next or -fixes 
> then, as you wish.


I'm fine either way. We have been living with the warning for some time, 
so I don't think there is any urgency to get rid of it immediately.
Tomi Valkeinen Jan. 5, 2023, 12:33 p.m. UTC | #5
On 05/01/2023 14:31, Dmitry Baryshkov wrote:
> On 04/01/2023 11:05, Neil Armstrong wrote:
>> On 04/01/2023 08:29, Tomi Valkeinen wrote:
>>> On 28/12/2022 23:58, Dmitry Baryshkov wrote:
>>>> On 02/11/2022 20:06, Dmitry Baryshkov wrote:
>>>>>  From all the drivers using drm_bridge_connector only iMX/dcss and 
>>>>> OMAP
>>>>> DRM driver do a proper work of calling
>>>>> drm_bridge_connector_en/disable_hpd() in right places. Rather than
>>>>> teaching each and every driver how to properly handle
>>>>> drm_bridge_connector's HPD, make that automatic.
>>>>>
>>>>> Add two additional drm_connector helper funcs: enable_hpd() and
>>>>> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
>>>>> is the time where the drm_bridge_connector's functions are called 
>>>>> by the
>>>>> drivers too).
>>>>
>>>> Since we are at the beginning of the development window, gracious 
>>>> ping for this patchset.
>>>>
>>>> It would be nice to finally handle the bridge_connector's hpd 
>>>> properly. Calling drm_bridge_connector_enable_hpd() from 
>>>> drm_bridge_connector_init() is not a proper way to do this. It 
>>>> results in calling bridge->funcs->hpd_enable() before the rest of 
>>>> the pipeline was set up properly.
>>>
>>> For the series:
>>>
>>> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>>>
>>> I've been using this series in my local branch for quite a while to 
>>> fix the HPD issues. Works for me.
> 
> Thanks!
> 
>>>
>>> I still think the "fix" aspect should be highlighted more here, as 
>>> the current upstream triggers a WARN for "Hot plug detection already 
>>> enabled" (at least) on OMAP.
>>
>> LGTM then !
>>
>> Tomi, Dmitry, I can push the whole serie via drm-misc-next or -fixes 
>> then, as you wish.
> 
> 
> I'm fine either way. We have been living with the warning for some time, 
> so I don't think there is any urgency to get rid of it immediately.

Yes, drm-misc-next is fine for me too.

  Tomi
Neil Armstrong Jan. 5, 2023, 2:12 p.m. UTC | #6
Hi,

On Wed, 02 Nov 2022 21:06:58 +0300, Dmitry Baryshkov wrote:
> From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
> DRM driver do a proper work of calling
> drm_bridge_connector_en/disable_hpd() in right places. Rather than
> teaching each and every driver how to properly handle
> drm_bridge_connector's HPD, make that automatic.
> 
> Add two additional drm_connector helper funcs: enable_hpd() and
> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
> is the time where the drm_bridge_connector's functions are called by the
> drivers too).
> 
> [...]

Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)

[1/7] drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=78b991ccfa64a438e2d8c2997d22d55621ab277d
[2/7] drm/probe-helper: enable and disable HPD on connectors
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c8268795c9a9cc7be50f78d4502fad83a2a4f8df
[3/7] drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=92d755d8f13b6791c72d4e980c09f054d8175c94
[4/7] drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=60c376e4549b6844af94cf319960ef48080230a8
[5/7] drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=9e954403bc9cc024cf052e9429c0e6db86ffe0f7
[6/7] drm/omap: stop using drm_bridge_connector_en/disable_hpd()
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c4f5538fa65dd093b71859c4792afd4e13fae5f1
[7/7] drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=4c00ac500d0edd1a6730c4e8293834a694c1b304
Laurentiu Palcu Jan. 9, 2023, 4:21 p.m. UTC | #7
Hi Dmitry,

It looks like there are some issues with this patchset... :/ I just
fetched the drm-tip and, with these patches included, the "Hot plug
detection already enabled" warning is back for i.MX DCSS.

After a short investigation, it seems that we end up calling
drm_bridge_hpd_enable() from both drm_kms_helper_poll_init() and
drm_fbdev_generic_setup(), hence the warning.

There are drivers using the drm_bridge_connector API that also call
drm_kms_helper_poll_init() followed by drm_fbdev_generic_setup(). So,
they might experience the same behavior, unless I'm missing something...
:/

Also, even if drm_fbdev_generic_setup() is not called in the driver
initialization, the warning will still appear the first time the
GETCONNECTOR ioctl is called, because that'll call
drm_helper_probe_single_connector_modes() helper which will eventually
call drm_bridge_hpd_enable().

Any idea?

Cheers,
Laurentiu

On Wed, Nov 02, 2022 at 09:06:58PM +0300, Dmitry Baryshkov wrote:
> From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
> DRM driver do a proper work of calling
> drm_bridge_connector_en/disable_hpd() in right places. Rather than
> teaching each and every driver how to properly handle
> drm_bridge_connector's HPD, make that automatic.
> 
> Add two additional drm_connector helper funcs: enable_hpd() and
> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
> is the time where the drm_bridge_connector's functions are called by the
> drivers too).
> 
> Changes since v2:
>  - Fixed a typo in the commit message of the second patch.
> 
> Changes since v1:
>  - Rebased on top of v6.1-rc1
>  - Removed the drm_bridge_connector_enable_hpd() from
>    drm_bridge_connector_init()
>  - Removed extra underscore prefix from
>    drm_bridge_connector_en/disable_hpd() helpers
> 
> Dmitry Baryshkov (7):
>   drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
>   drm/probe-helper: enable and disable HPD on connectors
>   drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
>   drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
>   drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
>   drm/omap: stop using drm_bridge_connector_en/disable_hpd()
>   drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()
> 
>  drivers/gpu/drm/drm_bridge_connector.c   | 27 +++-------------
>  drivers/gpu/drm/drm_probe_helper.c       | 40 ++++++++++++++++++-----
>  drivers/gpu/drm/imx/dcss/dcss-dev.c      |  4 ---
>  drivers/gpu/drm/imx/dcss/dcss-kms.c      |  2 --
>  drivers/gpu/drm/msm/hdmi/hdmi.c          |  2 --
>  drivers/gpu/drm/omapdrm/omap_drv.c       | 41 ------------------------
>  include/drm/drm_bridge_connector.h       |  2 --
>  include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++
>  8 files changed, 59 insertions(+), 81 deletions(-)
> 
> -- 
> 2.35.1
>
Dmitry Baryshkov Jan. 9, 2023, 8:26 p.m. UTC | #8
Hi,

On 09/01/2023 18:21, Laurentiu Palcu wrote:
> Hi Dmitry,
> 
> It looks like there are some issues with this patchset... :/ I just
> fetched the drm-tip and, with these patches included, the "Hot plug
> detection already enabled" warning is back for i.MX DCSS.

Could you please provide a backtrace?

> 
> After a short investigation, it seems that we end up calling
> drm_bridge_hpd_enable() from both drm_kms_helper_poll_init() and
> drm_fbdev_generic_setup(), hence the warning.
> 
> There are drivers using the drm_bridge_connector API that also call
> drm_kms_helper_poll_init() followed by drm_fbdev_generic_setup(). So,
> they might experience the same behavior, unless I'm missing something...
> :/
> 
> Also, even if drm_fbdev_generic_setup() is not called in the driver
> initialization, the warning will still appear the first time the
> GETCONNECTOR ioctl is called, because that'll call
> drm_helper_probe_single_connector_modes() helper which will eventually
> call drm_bridge_hpd_enable().
> 
> Any idea?
> 
> Cheers,
> Laurentiu
> 
> On Wed, Nov 02, 2022 at 09:06:58PM +0300, Dmitry Baryshkov wrote:
>>  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
>> DRM driver do a proper work of calling
>> drm_bridge_connector_en/disable_hpd() in right places. Rather than
>> teaching each and every driver how to properly handle
>> drm_bridge_connector's HPD, make that automatic.
>>
>> Add two additional drm_connector helper funcs: enable_hpd() and
>> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
>> is the time where the drm_bridge_connector's functions are called by the
>> drivers too).
>>
>> Changes since v2:
>>   - Fixed a typo in the commit message of the second patch.
>>
>> Changes since v1:
>>   - Rebased on top of v6.1-rc1
>>   - Removed the drm_bridge_connector_enable_hpd() from
>>     drm_bridge_connector_init()
>>   - Removed extra underscore prefix from
>>     drm_bridge_connector_en/disable_hpd() helpers
>>
>> Dmitry Baryshkov (7):
>>    drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
>>    drm/probe-helper: enable and disable HPD on connectors
>>    drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
>>    drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
>>    drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
>>    drm/omap: stop using drm_bridge_connector_en/disable_hpd()
>>    drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()
>>
>>   drivers/gpu/drm/drm_bridge_connector.c   | 27 +++-------------
>>   drivers/gpu/drm/drm_probe_helper.c       | 40 ++++++++++++++++++-----
>>   drivers/gpu/drm/imx/dcss/dcss-dev.c      |  4 ---
>>   drivers/gpu/drm/imx/dcss/dcss-kms.c      |  2 --
>>   drivers/gpu/drm/msm/hdmi/hdmi.c          |  2 --
>>   drivers/gpu/drm/omapdrm/omap_drv.c       | 41 ------------------------
>>   include/drm/drm_bridge_connector.h       |  2 --
>>   include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++
>>   8 files changed, 59 insertions(+), 81 deletions(-)
>>
>> -- 
>> 2.35.1
>>
Laurentiu Palcu Jan. 10, 2023, 6:57 a.m. UTC | #9
Hi,

On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
> Hi,
> 
> On 09/01/2023 18:21, Laurentiu Palcu wrote:
> > Hi Dmitry,
> > 
> > It looks like there are some issues with this patchset... :/ I just
> > fetched the drm-tip and, with these patches included, the "Hot plug
> > detection already enabled" warning is back for i.MX DCSS.
> 
> Could you please provide a backtrace?

Sure, see below:

------------[ cut here ]------------
Hot plug detection already enabled
WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_bridge.c:1257 drm_bridge_hpd_enable+0x94/0x9c [drm]
Modules linked in: videobuf2_memops snd_soc_simple_card snd_soc_simple_card_utils fsl_imx8_ddr_perf videobuf2_common snd_soc_imx_spdif adv7511 etnaviv imx8m_ddrc imx_dcss mc cec nwl_dsi gov
CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.2.0-rc2-15208-g25b283acd578 #6
Hardware name: NXP i.MX8MQ EVK (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : drm_bridge_hpd_enable+0x94/0x9c [drm]
lr : drm_bridge_hpd_enable+0x94/0x9c [drm]
sp : ffff800009ef3740
x29: ffff800009ef3740 x28: ffff000009331f00 x27: 0000000000001000
x26: 0000000000000020 x25: ffff800001148ed8 x24: ffff00000a8fe000
x23: 00000000fffffffd x22: ffff000005086348 x21: ffff800001133ee0
x20: ffff00000550d800 x19: ffff000005086288 x18: 0000000000000006
x17: 0000000000000000 x16: ffff8000096ef008 x15: 97ffff2891004260
x14: 2a1403e194000000 x13: 97ffff2891004260 x12: 2a1403e194000000
x11: 7100385f29400801 x10: 0000000000000aa0 x9 : ffff800008112744
x8 : ffff000000250b00 x7 : 0000000000000003 x6 : 0000000000000011
x5 : 0000000000000000 x4 : ffff0000bd986a48 x3 : 0000000000000001
x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000250000
Call trace:
 drm_bridge_hpd_enable+0x94/0x9c [drm]
 drm_bridge_connector_enable_hpd+0x2c/0x3c [drm_kms_helper]
 drm_kms_helper_poll_enable+0x94/0x10c [drm_kms_helper]
 drm_helper_probe_single_connector_modes+0x1a8/0x510 [drm_kms_helper]
 drm_client_modeset_probe+0x204/0x1190 [drm]
 __drm_fb_helper_initial_config_and_unlock+0x5c/0x4a4 [drm_kms_helper]
 drm_fb_helper_initial_config+0x54/0x6c [drm_kms_helper]
 drm_fbdev_client_hotplug+0xd0/0x140 [drm_kms_helper]
 drm_fbdev_generic_setup+0x90/0x154 [drm_kms_helper]
 dcss_kms_attach+0x1c8/0x254 [imx_dcss]
 dcss_drv_platform_probe+0x90/0xfc [imx_dcss]
 platform_probe+0x70/0xcc
 really_probe+0xc4/0x2e0
 __driver_probe_device+0x80/0xf0
 driver_probe_device+0xe0/0x164
 __device_attach_driver+0xc0/0x13c
 bus_for_each_drv+0x84/0xe0
 __device_attach+0xa4/0x1a0
 device_initial_probe+0x1c/0x30
 bus_probe_device+0xa4/0xb0
 deferred_probe_work_func+0x90/0xd0
 process_one_work+0x200/0x474
 worker_thread+0x74/0x43c
 kthread+0xfc/0x110
 ret_from_fork+0x10/0x20
---[ end trace 0000000000000000 ]---

Cheers,
Laurentiu

> 
> > 
> > After a short investigation, it seems that we end up calling
> > drm_bridge_hpd_enable() from both drm_kms_helper_poll_init() and
> > drm_fbdev_generic_setup(), hence the warning.
> > 
> > There are drivers using the drm_bridge_connector API that also call
> > drm_kms_helper_poll_init() followed by drm_fbdev_generic_setup(). So,
> > they might experience the same behavior, unless I'm missing something...
> > :/
> > 
> > Also, even if drm_fbdev_generic_setup() is not called in the driver
> > initialization, the warning will still appear the first time the
> > GETCONNECTOR ioctl is called, because that'll call
> > drm_helper_probe_single_connector_modes() helper which will eventually
> > call drm_bridge_hpd_enable().
> > 
> > Any idea?
> > 
> > Cheers,
> > Laurentiu
> > 
> > On Wed, Nov 02, 2022 at 09:06:58PM +0300, Dmitry Baryshkov wrote:
> > >  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
> > > DRM driver do a proper work of calling
> > > drm_bridge_connector_en/disable_hpd() in right places. Rather than
> > > teaching each and every driver how to properly handle
> > > drm_bridge_connector's HPD, make that automatic.
> > > 
> > > Add two additional drm_connector helper funcs: enable_hpd() and
> > > disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
> > > is the time where the drm_bridge_connector's functions are called by the
> > > drivers too).
> > > 
> > > Changes since v2:
> > >   - Fixed a typo in the commit message of the second patch.
> > > 
> > > Changes since v1:
> > >   - Rebased on top of v6.1-rc1
> > >   - Removed the drm_bridge_connector_enable_hpd() from
> > >     drm_bridge_connector_init()
> > >   - Removed extra underscore prefix from
> > >     drm_bridge_connector_en/disable_hpd() helpers
> > > 
> > > Dmitry Baryshkov (7):
> > >    drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
> > >    drm/probe-helper: enable and disable HPD on connectors
> > >    drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
> > >    drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
> > >    drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
> > >    drm/omap: stop using drm_bridge_connector_en/disable_hpd()
> > >    drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()
> > > 
> > >   drivers/gpu/drm/drm_bridge_connector.c   | 27 +++-------------
> > >   drivers/gpu/drm/drm_probe_helper.c       | 40 ++++++++++++++++++-----
> > >   drivers/gpu/drm/imx/dcss/dcss-dev.c      |  4 ---
> > >   drivers/gpu/drm/imx/dcss/dcss-kms.c      |  2 --
> > >   drivers/gpu/drm/msm/hdmi/hdmi.c          |  2 --
> > >   drivers/gpu/drm/omapdrm/omap_drv.c       | 41 ------------------------
> > >   include/drm/drm_bridge_connector.h       |  2 --
> > >   include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++
> > >   8 files changed, 59 insertions(+), 81 deletions(-)
> > > 
> > > -- 
> > > 2.35.1
> > > 
> 
> -- 
> With best wishes
> Dmitry
>
Geert Uytterhoeven Jan. 10, 2023, 10:20 a.m. UTC | #10
On Tue, Jan 10, 2023 at 8:07 AM Laurentiu Palcu
<laurentiu.palcu@oss.nxp.com> wrote:
> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
> > On 09/01/2023 18:21, Laurentiu Palcu wrote:
> > > It looks like there are some issues with this patchset... :/ I just
> > > fetched the drm-tip and, with these patches included, the "Hot plug
> > > detection already enabled" warning is back for i.MX DCSS.
> >
> > Could you please provide a backtrace?
>
> Sure, see below:
>
> ------------[ cut here ]------------
> Hot plug detection already enabled
> WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_bridge.c:1257 drm_bridge_hpd_enable+0x94/0x9c [drm]
> Modules linked in: videobuf2_memops snd_soc_simple_card snd_soc_simple_card_utils fsl_imx8_ddr_perf videobuf2_common snd_soc_imx_spdif adv7511 etnaviv imx8m_ddrc imx_dcss mc cec nwl_dsi gov
> CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.2.0-rc2-15208-g25b283acd578 #6
> Hardware name: NXP i.MX8MQ EVK (DT)
> Workqueue: events_unbound deferred_probe_work_func
> pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : drm_bridge_hpd_enable+0x94/0x9c [drm]
> lr : drm_bridge_hpd_enable+0x94/0x9c [drm]
> sp : ffff800009ef3740
> x29: ffff800009ef3740 x28: ffff000009331f00 x27: 0000000000001000
> x26: 0000000000000020 x25: ffff800001148ed8 x24: ffff00000a8fe000
> x23: 00000000fffffffd x22: ffff000005086348 x21: ffff800001133ee0
> x20: ffff00000550d800 x19: ffff000005086288 x18: 0000000000000006
> x17: 0000000000000000 x16: ffff8000096ef008 x15: 97ffff2891004260
> x14: 2a1403e194000000 x13: 97ffff2891004260 x12: 2a1403e194000000
> x11: 7100385f29400801 x10: 0000000000000aa0 x9 : ffff800008112744
> x8 : ffff000000250b00 x7 : 0000000000000003 x6 : 0000000000000011
> x5 : 0000000000000000 x4 : ffff0000bd986a48 x3 : 0000000000000001
> x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000250000
> Call trace:
>  drm_bridge_hpd_enable+0x94/0x9c [drm]
>  drm_bridge_connector_enable_hpd+0x2c/0x3c [drm_kms_helper]
>  drm_kms_helper_poll_enable+0x94/0x10c [drm_kms_helper]
>  drm_helper_probe_single_connector_modes+0x1a8/0x510 [drm_kms_helper]
>  drm_client_modeset_probe+0x204/0x1190 [drm]
>  __drm_fb_helper_initial_config_and_unlock+0x5c/0x4a4 [drm_kms_helper]
>  drm_fb_helper_initial_config+0x54/0x6c [drm_kms_helper]
>  drm_fbdev_client_hotplug+0xd0/0x140 [drm_kms_helper]
>  drm_fbdev_generic_setup+0x90/0x154 [drm_kms_helper]
>  dcss_kms_attach+0x1c8/0x254 [imx_dcss]
>  dcss_drv_platform_probe+0x90/0xfc [imx_dcss]
>  platform_probe+0x70/0xcc
>  really_probe+0xc4/0x2e0
>  __driver_probe_device+0x80/0xf0
>  driver_probe_device+0xe0/0x164
>  __device_attach_driver+0xc0/0x13c
>  bus_for_each_drv+0x84/0xe0
>  __device_attach+0xa4/0x1a0
>  device_initial_probe+0x1c/0x30
>  bus_probe_device+0xa4/0xb0
>  deferred_probe_work_func+0x90/0xd0
>  process_one_work+0x200/0x474
>  worker_thread+0x74/0x43c
>  kthread+0xfc/0x110
>  ret_from_fork+0x10/0x20
> ---[ end trace 0000000000000000 ]---

I get a similar trace on R-Car Gen2 (Koelsch with R-Car M2-W) and
Gen3 (Salvator-XS with R-Car H3 ES2.0), and bisected it to commit
92d755d8f13b6791 ("drm/bridge_connector: rely on drm_kms_helper_poll_*
for HPD enablement") in drm-misc/for-linux-next.

As I do not have any displays connected, I do not know what is the
full impact.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Dmitry Baryshkov Jan. 10, 2023, 4:29 p.m. UTC | #11
On 10/01/2023 08:57, Laurentiu Palcu wrote:
> Hi,
> 
> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
>> Hi,
>>
>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
>>> Hi Dmitry,
>>>
>>> It looks like there are some issues with this patchset... :/ I just
>>> fetched the drm-tip and, with these patches included, the "Hot plug
>>> detection already enabled" warning is back for i.MX DCSS.
>>
>> Could you please provide a backtrace?
> 
> Sure, see below:

I wondered, why didn't I see this on msm, my main target nowadays. The 
msm driver is calling msm_kms_helper_poll_init() after initializing 
fbdev, so all previous kms_helper_poll_enable() calls return early.

I think I have the fix ready. Let me test it locally before posting.

> 
> ------------[ cut here ]------------
> Hot plug detection already enabled
> WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_bridge.c:1257 drm_bridge_hpd_enable+0x94/0x9c [drm]
> Modules linked in: videobuf2_memops snd_soc_simple_card snd_soc_simple_card_utils fsl_imx8_ddr_perf videobuf2_common snd_soc_imx_spdif adv7511 etnaviv imx8m_ddrc imx_dcss mc cec nwl_dsi gov
> CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.2.0-rc2-15208-g25b283acd578 #6
> Hardware name: NXP i.MX8MQ EVK (DT)
> Workqueue: events_unbound deferred_probe_work_func
> pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : drm_bridge_hpd_enable+0x94/0x9c [drm]
> lr : drm_bridge_hpd_enable+0x94/0x9c [drm]
> sp : ffff800009ef3740
> x29: ffff800009ef3740 x28: ffff000009331f00 x27: 0000000000001000
> x26: 0000000000000020 x25: ffff800001148ed8 x24: ffff00000a8fe000
> x23: 00000000fffffffd x22: ffff000005086348 x21: ffff800001133ee0
> x20: ffff00000550d800 x19: ffff000005086288 x18: 0000000000000006
> x17: 0000000000000000 x16: ffff8000096ef008 x15: 97ffff2891004260
> x14: 2a1403e194000000 x13: 97ffff2891004260 x12: 2a1403e194000000
> x11: 7100385f29400801 x10: 0000000000000aa0 x9 : ffff800008112744
> x8 : ffff000000250b00 x7 : 0000000000000003 x6 : 0000000000000011
> x5 : 0000000000000000 x4 : ffff0000bd986a48 x3 : 0000000000000001
> x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000250000
> Call trace:
>   drm_bridge_hpd_enable+0x94/0x9c [drm]
>   drm_bridge_connector_enable_hpd+0x2c/0x3c [drm_kms_helper]
>   drm_kms_helper_poll_enable+0x94/0x10c [drm_kms_helper]
>   drm_helper_probe_single_connector_modes+0x1a8/0x510 [drm_kms_helper]
>   drm_client_modeset_probe+0x204/0x1190 [drm]
>   __drm_fb_helper_initial_config_and_unlock+0x5c/0x4a4 [drm_kms_helper]
>   drm_fb_helper_initial_config+0x54/0x6c [drm_kms_helper]
>   drm_fbdev_client_hotplug+0xd0/0x140 [drm_kms_helper]
>   drm_fbdev_generic_setup+0x90/0x154 [drm_kms_helper]
>   dcss_kms_attach+0x1c8/0x254 [imx_dcss]
>   dcss_drv_platform_probe+0x90/0xfc [imx_dcss]
>   platform_probe+0x70/0xcc
>   really_probe+0xc4/0x2e0
>   __driver_probe_device+0x80/0xf0
>   driver_probe_device+0xe0/0x164
>   __device_attach_driver+0xc0/0x13c
>   bus_for_each_drv+0x84/0xe0
>   __device_attach+0xa4/0x1a0
>   device_initial_probe+0x1c/0x30
>   bus_probe_device+0xa4/0xb0
>   deferred_probe_work_func+0x90/0xd0
>   process_one_work+0x200/0x474
>   worker_thread+0x74/0x43c
>   kthread+0xfc/0x110
>   ret_from_fork+0x10/0x20
> ---[ end trace 0000000000000000 ]---
> 
> Cheers,
> Laurentiu
> 
>>
>>>
>>> After a short investigation, it seems that we end up calling
>>> drm_bridge_hpd_enable() from both drm_kms_helper_poll_init() and
>>> drm_fbdev_generic_setup(), hence the warning.
>>>
>>> There are drivers using the drm_bridge_connector API that also call
>>> drm_kms_helper_poll_init() followed by drm_fbdev_generic_setup(). So,
>>> they might experience the same behavior, unless I'm missing something...
>>> :/
>>>
>>> Also, even if drm_fbdev_generic_setup() is not called in the driver
>>> initialization, the warning will still appear the first time the
>>> GETCONNECTOR ioctl is called, because that'll call
>>> drm_helper_probe_single_connector_modes() helper which will eventually
>>> call drm_bridge_hpd_enable().
>>>
>>> Any idea?
>>>
>>> Cheers,
>>> Laurentiu
>>>
>>> On Wed, Nov 02, 2022 at 09:06:58PM +0300, Dmitry Baryshkov wrote:
>>>>   From all the drivers using drm_bridge_connector only iMX/dcss and OMAP
>>>> DRM driver do a proper work of calling
>>>> drm_bridge_connector_en/disable_hpd() in right places. Rather than
>>>> teaching each and every driver how to properly handle
>>>> drm_bridge_connector's HPD, make that automatic.
>>>>
>>>> Add two additional drm_connector helper funcs: enable_hpd() and
>>>> disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this
>>>> is the time where the drm_bridge_connector's functions are called by the
>>>> drivers too).
>>>>
>>>> Changes since v2:
>>>>    - Fixed a typo in the commit message of the second patch.
>>>>
>>>> Changes since v1:
>>>>    - Rebased on top of v6.1-rc1
>>>>    - Removed the drm_bridge_connector_enable_hpd() from
>>>>      drm_bridge_connector_init()
>>>>    - Removed extra underscore prefix from
>>>>      drm_bridge_connector_en/disable_hpd() helpers
>>>>
>>>> Dmitry Baryshkov (7):
>>>>     drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
>>>>     drm/probe-helper: enable and disable HPD on connectors
>>>>     drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement
>>>>     drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()
>>>>     drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()
>>>>     drm/omap: stop using drm_bridge_connector_en/disable_hpd()
>>>>     drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()
>>>>
>>>>    drivers/gpu/drm/drm_bridge_connector.c   | 27 +++-------------
>>>>    drivers/gpu/drm/drm_probe_helper.c       | 40 ++++++++++++++++++-----
>>>>    drivers/gpu/drm/imx/dcss/dcss-dev.c      |  4 ---
>>>>    drivers/gpu/drm/imx/dcss/dcss-kms.c      |  2 --
>>>>    drivers/gpu/drm/msm/hdmi/hdmi.c          |  2 --
>>>>    drivers/gpu/drm/omapdrm/omap_drv.c       | 41 ------------------------
>>>>    include/drm/drm_bridge_connector.h       |  2 --
>>>>    include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++
>>>>    8 files changed, 59 insertions(+), 81 deletions(-)
>>>>
>>>> -- 
>>>> 2.35.1
>>>>
>>
>> -- 
>> With best wishes
>> Dmitry
>>
Geert Uytterhoeven Feb. 7, 2023, 9:40 a.m. UTC | #12
On Tue, Jan 10, 2023 at 11:20 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Tue, Jan 10, 2023 at 8:07 AM Laurentiu Palcu
> <laurentiu.palcu@oss.nxp.com> wrote:
> > On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
> > > On 09/01/2023 18:21, Laurentiu Palcu wrote:
> > > > It looks like there are some issues with this patchset... :/ I just
> > > > fetched the drm-tip and, with these patches included, the "Hot plug
> > > > detection already enabled" warning is back for i.MX DCSS.
> > >
> > > Could you please provide a backtrace?
> >
> > Sure, see below:
> >
> > ------------[ cut here ]------------
> > Hot plug detection already enabled
> > WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_bridge.c:1257 drm_bridge_hpd_enable+0x94/0x9c [drm]
> > Modules linked in: videobuf2_memops snd_soc_simple_card snd_soc_simple_card_utils fsl_imx8_ddr_perf videobuf2_common snd_soc_imx_spdif adv7511 etnaviv imx8m_ddrc imx_dcss mc cec nwl_dsi gov
> > CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.2.0-rc2-15208-g25b283acd578 #6
> > Hardware name: NXP i.MX8MQ EVK (DT)
> > Workqueue: events_unbound deferred_probe_work_func
> > pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> > pc : drm_bridge_hpd_enable+0x94/0x9c [drm]
> > lr : drm_bridge_hpd_enable+0x94/0x9c [drm]
> > sp : ffff800009ef3740
> > x29: ffff800009ef3740 x28: ffff000009331f00 x27: 0000000000001000
> > x26: 0000000000000020 x25: ffff800001148ed8 x24: ffff00000a8fe000
> > x23: 00000000fffffffd x22: ffff000005086348 x21: ffff800001133ee0
> > x20: ffff00000550d800 x19: ffff000005086288 x18: 0000000000000006
> > x17: 0000000000000000 x16: ffff8000096ef008 x15: 97ffff2891004260
> > x14: 2a1403e194000000 x13: 97ffff2891004260 x12: 2a1403e194000000
> > x11: 7100385f29400801 x10: 0000000000000aa0 x9 : ffff800008112744
> > x8 : ffff000000250b00 x7 : 0000000000000003 x6 : 0000000000000011
> > x5 : 0000000000000000 x4 : ffff0000bd986a48 x3 : 0000000000000001
> > x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000250000
> > Call trace:
> >  drm_bridge_hpd_enable+0x94/0x9c [drm]
> >  drm_bridge_connector_enable_hpd+0x2c/0x3c [drm_kms_helper]
> >  drm_kms_helper_poll_enable+0x94/0x10c [drm_kms_helper]
> >  drm_helper_probe_single_connector_modes+0x1a8/0x510 [drm_kms_helper]
> >  drm_client_modeset_probe+0x204/0x1190 [drm]
> >  __drm_fb_helper_initial_config_and_unlock+0x5c/0x4a4 [drm_kms_helper]
> >  drm_fb_helper_initial_config+0x54/0x6c [drm_kms_helper]
> >  drm_fbdev_client_hotplug+0xd0/0x140 [drm_kms_helper]
> >  drm_fbdev_generic_setup+0x90/0x154 [drm_kms_helper]
> >  dcss_kms_attach+0x1c8/0x254 [imx_dcss]
> >  dcss_drv_platform_probe+0x90/0xfc [imx_dcss]
> >  platform_probe+0x70/0xcc
> >  really_probe+0xc4/0x2e0
> >  __driver_probe_device+0x80/0xf0
> >  driver_probe_device+0xe0/0x164
> >  __device_attach_driver+0xc0/0x13c
> >  bus_for_each_drv+0x84/0xe0
> >  __device_attach+0xa4/0x1a0
> >  device_initial_probe+0x1c/0x30
> >  bus_probe_device+0xa4/0xb0
> >  deferred_probe_work_func+0x90/0xd0
> >  process_one_work+0x200/0x474
> >  worker_thread+0x74/0x43c
> >  kthread+0xfc/0x110
> >  ret_from_fork+0x10/0x20
> > ---[ end trace 0000000000000000 ]---
>
> I get a similar trace on R-Car Gen2 (Koelsch with R-Car M2-W) and
> Gen3 (Salvator-XS with R-Car H3 ES2.0), and bisected it to commit
> 92d755d8f13b6791 ("drm/bridge_connector: rely on drm_kms_helper_poll_*
> for HPD enablement") in drm-misc/for-linux-next.
>
> As I do not have any displays connected, I do not know what is the
> full impact.

FTR, the issue is still present.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Geert Uytterhoeven Feb. 7, 2023, 9:40 a.m. UTC | #13
Hi Dmitry,

On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
> On 10/01/2023 08:57, Laurentiu Palcu wrote:
> > On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
> >> On 09/01/2023 18:21, Laurentiu Palcu wrote:
> >>> It looks like there are some issues with this patchset... :/ I just
> >>> fetched the drm-tip and, with these patches included, the "Hot plug
> >>> detection already enabled" warning is back for i.MX DCSS.
> >>
> >> Could you please provide a backtrace?
> >
> > Sure, see below:
>
> I wondered, why didn't I see this on msm, my main target nowadays. The
> msm driver is calling msm_kms_helper_poll_init() after initializing
> fbdev, so all previous kms_helper_poll_enable() calls return early.
>
> I think I have the fix ready. Let me test it locally before posting.

Is this fix available?
Do you have a lore link?
Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Neil Armstrong Feb. 7, 2023, 9:59 a.m. UTC | #14
Hi Geert,

On 07/02/2023 10:40, Geert Uytterhoeven wrote:
> Hi Dmitry,
> 
> On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
>> On 10/01/2023 08:57, Laurentiu Palcu wrote:
>>> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
>>>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
>>>>> It looks like there are some issues with this patchset... :/ I just
>>>>> fetched the drm-tip and, with these patches included, the "Hot plug
>>>>> detection already enabled" warning is back for i.MX DCSS.
>>>>
>>>> Could you please provide a backtrace?
>>>
>>> Sure, see below:
>>
>> I wondered, why didn't I see this on msm, my main target nowadays. The
>> msm driver is calling msm_kms_helper_poll_init() after initializing
>> fbdev, so all previous kms_helper_poll_enable() calls return early.
>>
>> I think I have the fix ready. Let me test it locally before posting.
> 
> Is this fix available?
> Do you have a lore link?

The fix at [1] has been applied on 2023-01-26

[1] https://lore.kernel.org/all/20230124104548.3234554-1-dmitry.baryshkov@linaro.org/

> Thanks!
> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds
Geert Uytterhoeven Feb. 7, 2023, 10:02 a.m. UTC | #15
Hi Neil,

On Tue, Feb 7, 2023 at 10:59 AM Neil Armstrong
<neil.armstrong@linaro.org> wrote:
> On 07/02/2023 10:40, Geert Uytterhoeven wrote:
> > On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
> > <dmitry.baryshkov@linaro.org> wrote:
> >> On 10/01/2023 08:57, Laurentiu Palcu wrote:
> >>> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
> >>>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
> >>>>> It looks like there are some issues with this patchset... :/ I just
> >>>>> fetched the drm-tip and, with these patches included, the "Hot plug
> >>>>> detection already enabled" warning is back for i.MX DCSS.
> >>>>
> >>>> Could you please provide a backtrace?
> >>>
> >>> Sure, see below:
> >>
> >> I wondered, why didn't I see this on msm, my main target nowadays. The
> >> msm driver is calling msm_kms_helper_poll_init() after initializing
> >> fbdev, so all previous kms_helper_poll_enable() calls return early.
> >>
> >> I think I have the fix ready. Let me test it locally before posting.
> >
> > Is this fix available?
> > Do you have a lore link?
>
> The fix at [1] has been applied on 2023-01-26
>
> [1] https://lore.kernel.org/all/20230124104548.3234554-1-dmitry.baryshkov@linaro.org/

Applied where? linux-next does not have it.
Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Neil Armstrong Feb. 7, 2023, 10:18 a.m. UTC | #16
On 07/02/2023 11:02, Geert Uytterhoeven wrote:
> Hi Neil,
> 
> On Tue, Feb 7, 2023 at 10:59 AM Neil Armstrong
> <neil.armstrong@linaro.org> wrote:
>> On 07/02/2023 10:40, Geert Uytterhoeven wrote:
>>> On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
>>> <dmitry.baryshkov@linaro.org> wrote:
>>>> On 10/01/2023 08:57, Laurentiu Palcu wrote:
>>>>> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
>>>>>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
>>>>>>> It looks like there are some issues with this patchset... :/ I just
>>>>>>> fetched the drm-tip and, with these patches included, the "Hot plug
>>>>>>> detection already enabled" warning is back for i.MX DCSS.
>>>>>>
>>>>>> Could you please provide a backtrace?
>>>>>
>>>>> Sure, see below:
>>>>
>>>> I wondered, why didn't I see this on msm, my main target nowadays. The
>>>> msm driver is calling msm_kms_helper_poll_init() after initializing
>>>> fbdev, so all previous kms_helper_poll_enable() calls return early.
>>>>
>>>> I think I have the fix ready. Let me test it locally before posting.
>>>
>>> Is this fix available?
>>> Do you have a lore link?
>>
>> The fix at [1] has been applied on 2023-01-26
>>
>> [1] https://lore.kernel.org/all/20230124104548.3234554-1-dmitry.baryshkov@linaro.org/
> 
> Applied where? linux-next does not have it.

On drm-misc-next, it should have been send to drm-misc, but it seems the last PR
to drm-misc was sent without those:

https://cgit.freedesktop.org/drm/drm-misc/tag/?h=drm-misc-next-2023-01-26

Thomas, Maxime, is it too late to get those into v6.3 ? I did apply them before rc6.

Neil



> Thanks!
> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds
Geert Uytterhoeven Feb. 7, 2023, 10:19 a.m. UTC | #17
Hi Neil,

On Tue, Feb 7, 2023 at 11:02 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Feb 7, 2023 at 10:59 AM Neil Armstrong
> <neil.armstrong@linaro.org> wrote:
> > On 07/02/2023 10:40, Geert Uytterhoeven wrote:
> > > On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
> > > <dmitry.baryshkov@linaro.org> wrote:
> > >> On 10/01/2023 08:57, Laurentiu Palcu wrote:
> > >>> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
> > >>>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
> > >>>>> It looks like there are some issues with this patchset... :/ I just
> > >>>>> fetched the drm-tip and, with these patches included, the "Hot plug
> > >>>>> detection already enabled" warning is back for i.MX DCSS.
> > >>>>
> > >>>> Could you please provide a backtrace?
> > >>>
> > >>> Sure, see below:
> > >>
> > >> I wondered, why didn't I see this on msm, my main target nowadays. The
> > >> msm driver is calling msm_kms_helper_poll_init() after initializing
> > >> fbdev, so all previous kms_helper_poll_enable() calls return early.
> > >>
> > >> I think I have the fix ready. Let me test it locally before posting.
> > >
> > > Is this fix available?
> > > Do you have a lore link?
> >
> > The fix at [1] has been applied on 2023-01-26
> >
> > [1] https://lore.kernel.org/all/20230124104548.3234554-1-dmitry.baryshkov@linaro.org/
>
> Applied where? linux-next does not have it.

commit cbf143b282c64e59
("drm/probe_helper: extract two helper functions") in next-20230127
next-20230130 next-20230131
commit d33a54e3991dfce8
("drm/probe_helper: sort out poll_running vs poll_enabled") in
next-20230127 next-20230130 next-20230131

but not in any later version?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Neil Armstrong Feb. 7, 2023, 1:30 p.m. UTC | #18
On 07/02/2023 11:19, Geert Uytterhoeven wrote:
> Hi Neil,
> 
> On Tue, Feb 7, 2023 at 11:02 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Tue, Feb 7, 2023 at 10:59 AM Neil Armstrong
>> <neil.armstrong@linaro.org> wrote:
>>> On 07/02/2023 10:40, Geert Uytterhoeven wrote:
>>>> On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
>>>> <dmitry.baryshkov@linaro.org> wrote:
>>>>> On 10/01/2023 08:57, Laurentiu Palcu wrote:
>>>>>> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
>>>>>>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
>>>>>>>> It looks like there are some issues with this patchset... :/ I just
>>>>>>>> fetched the drm-tip and, with these patches included, the "Hot plug
>>>>>>>> detection already enabled" warning is back for i.MX DCSS.
>>>>>>>
>>>>>>> Could you please provide a backtrace?
>>>>>>
>>>>>> Sure, see below:
>>>>>
>>>>> I wondered, why didn't I see this on msm, my main target nowadays. The
>>>>> msm driver is calling msm_kms_helper_poll_init() after initializing
>>>>> fbdev, so all previous kms_helper_poll_enable() calls return early.
>>>>>
>>>>> I think I have the fix ready. Let me test it locally before posting.
>>>>
>>>> Is this fix available?
>>>> Do you have a lore link?
>>>
>>> The fix at [1] has been applied on 2023-01-26
>>>
>>> [1] https://lore.kernel.org/all/20230124104548.3234554-1-dmitry.baryshkov@linaro.org/
>>
>> Applied where? linux-next does not have it.
> 
> commit cbf143b282c64e59
> ("drm/probe_helper: extract two helper functions") in next-20230127
> next-20230130 next-20230131
> commit d33a54e3991dfce8
> ("drm/probe_helper: sort out poll_running vs poll_enabled") in
> next-20230127 next-20230130 next-20230131
> 
> but not in any later version?

$ git log --oneline --author=dmitry next-20230207 drivers/gpu/drm/drm_probe_helper.c
c8268795c9a9 drm/probe-helper: enable and disable HPD on connectors
78b991ccfa64 drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()

$ cat Next/SHA1s | grep drm
drm-fixes       4ec5183ec48656cec489c49f989c508b68b518e3
drm-intel-fixes 4c7b9344cadbed477372c75e3c0a8cfd542f5990
drm-misc-fixes  8f20660f053cefd4693e69cfff9cf58f4f7c4929
drm             1c0db6d84f8e0ac8f14178f13250e36ebcf457ee
drm-misc        d20a8f409259f1782f080b434054854020878f23
drm-intel       155c6b16eec2eaaaf6c71abf2d5e71641770d7ba
drm-tegra       b9930311641cf2ed905a84aabe27e8f3868aee4a
drm-msm         dbd7a2a941b8cbf9e5f79a777ed9fe0090eebb61
drm-msm-lumag   1d233b1cb149ec78c20fac58331b27bb460f9558
imx-drm         927d8fd465adbaaad6cce82f840d489d7c378f29

so weren't merged into drm-misc, I'll ping Thomas & Maxime on irc.

Neil

> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds
Neil Armstrong Feb. 7, 2023, 2:57 p.m. UTC | #19
Geert,

On 07/02/2023 14:30, neil.armstrong@linaro.org wrote:
> On 07/02/2023 11:19, Geert Uytterhoeven wrote:
>> Hi Neil,
>>
>> On Tue, Feb 7, 2023 at 11:02 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> On Tue, Feb 7, 2023 at 10:59 AM Neil Armstrong
>>> <neil.armstrong@linaro.org> wrote:
>>>> On 07/02/2023 10:40, Geert Uytterhoeven wrote:
>>>>> On Tue, Jan 10, 2023 at 5:37 PM Dmitry Baryshkov
>>>>> <dmitry.baryshkov@linaro.org> wrote:
>>>>>> On 10/01/2023 08:57, Laurentiu Palcu wrote:
>>>>>>> On Mon, Jan 09, 2023 at 10:26:28PM +0200, Dmitry Baryshkov wrote:
>>>>>>>> On 09/01/2023 18:21, Laurentiu Palcu wrote:
>>>>>>>>> It looks like there are some issues with this patchset... :/ I just
>>>>>>>>> fetched the drm-tip and, with these patches included, the "Hot plug
>>>>>>>>> detection already enabled" warning is back for i.MX DCSS.
>>>>>>>>
>>>>>>>> Could you please provide a backtrace?
>>>>>>>
>>>>>>> Sure, see below:
>>>>>>
>>>>>> I wondered, why didn't I see this on msm, my main target nowadays. The
>>>>>> msm driver is calling msm_kms_helper_poll_init() after initializing
>>>>>> fbdev, so all previous kms_helper_poll_enable() calls return early.
>>>>>>
>>>>>> I think I have the fix ready. Let me test it locally before posting.
>>>>>
>>>>> Is this fix available?
>>>>> Do you have a lore link?
>>>>
>>>> The fix at [1] has been applied on 2023-01-26
>>>>
>>>> [1] https://lore.kernel.org/all/20230124104548.3234554-1-dmitry.baryshkov@linaro.org/
>>>
>>> Applied where? linux-next does not have it.
>>
>> commit cbf143b282c64e59
>> ("drm/probe_helper: extract two helper functions") in next-20230127
>> next-20230130 next-20230131
>> commit d33a54e3991dfce8
>> ("drm/probe_helper: sort out poll_running vs poll_enabled") in
>> next-20230127 next-20230130 next-20230131
>>
>> but not in any later version?
> 
> $ git log --oneline --author=dmitry next-20230207 drivers/gpu/drm/drm_probe_helper.c
> c8268795c9a9 drm/probe-helper: enable and disable HPD on connectors
> 78b991ccfa64 drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()
> 
> $ cat Next/SHA1s | grep drm
> drm-fixes       4ec5183ec48656cec489c49f989c508b68b518e3
> drm-intel-fixes 4c7b9344cadbed477372c75e3c0a8cfd542f5990
> drm-misc-fixes  8f20660f053cefd4693e69cfff9cf58f4f7c4929
> drm             1c0db6d84f8e0ac8f14178f13250e36ebcf457ee
> drm-misc        d20a8f409259f1782f080b434054854020878f23
> drm-intel       155c6b16eec2eaaaf6c71abf2d5e71641770d7ba
> drm-tegra       b9930311641cf2ed905a84aabe27e8f3868aee4a
> drm-msm         dbd7a2a941b8cbf9e5f79a777ed9fe0090eebb61
> drm-msm-lumag   1d233b1cb149ec78c20fac58331b27bb460f9558
> imx-drm         927d8fd465adbaaad6cce82f840d489d7c378f29
> 
> so weren't merged into drm-misc, I'll ping Thomas & Maxime on irc.

Thomas just told me the commits were cherry-picked into drm-misc-next-fixes
and should appear on tomorrow's linux-next tree.

https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-next-fixes&id=91f43949662c9eb4a443203a188e806df8290bc9
https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-next-fixes&id=a4e771729a51168bc36317effaa9962e336d4f5e

Neil

> 
> Neil
> 
>>
>> Gr{oetje,eeting}s,
>>
>>                          Geert
>>
>> -- 
>> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>>
>> In personal conversations with technical people, I call myself a hacker. But
>> when I'm talking to journalists I just say "programmer" or something like that.
>>                                  -- Linus Torvalds
>