All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Paul Boddie <paul@boddie.org.uk>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Jonas Karlman <jonas@kwiboo.se>, David Airlie <airlied@linux.ie>,
	Robert Foss <robert.foss@linaro.org>,
	linux-mips <linux-mips@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Discussions about the Letux Kernel 
	<letux-kernel@openphoenux.org>
Subject: Re: [Letux-kernel] [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll()
Date: Sat, 5 Mar 2022 08:49:56 +0100	[thread overview]
Message-ID: <C61F337D-7325-43BA-AFF1-A6E7FD602693@goldelico.com> (raw)
In-Reply-To: <02FDA8C2-68FD-4EB8-9846-AF510D16424D@goldelico.com>

Hi Paul,

> Am 04.03.2022 um 19:41 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
> 
> 
>> Am 04.03.2022 um 19:33 schrieb Paul Cercueil <paul@crapouillou.net>:
>> 
>> 
>> 
>> Le ven., mars 4 2022 at 19:15:13 +0100, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>>> Hi Paul,
>>>> Am 04.03.2022 um 19:04 schrieb Paul Cercueil <paul@crapouillou.net>:
>>>> Le ven., mars 4 2022 at 18:51:14 +0100, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>>>>> Hi Paul, Neil,
>>>>>> Am 04.03.2022 um 17:47 schrieb Paul Cercueil <paul@crapouillou.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.
> 
> Great. I will try asap. If it works we can drop all our private ideas...
> 
> And focus on the last missing piece for jz4780 HDMI: the output format negotiation (which still is not working properly - but I have to analyse why).

Yes, it works. And I see you have merged it to drm-misc-next so that I can build on it.

So there is only the bus format negotiation to be understood and finally solved for v17.

Great and thanks,
Nikolaus


WARNING: multiple messages have this Message-ID (diff)
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Paul Boddie <paul@boddie.org.uk>, Jonas Karlman <jonas@kwiboo.se>,
	David Airlie <airlied@linux.ie>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-mips <linux-mips@vger.kernel.org>,
	Robert Foss <robert.foss@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Discussions about the Letux Kernel <letux-kernel@openphoenux.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: Re: [Letux-kernel] [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll()
Date: Sat, 5 Mar 2022 08:49:56 +0100	[thread overview]
Message-ID: <C61F337D-7325-43BA-AFF1-A6E7FD602693@goldelico.com> (raw)
In-Reply-To: <02FDA8C2-68FD-4EB8-9846-AF510D16424D@goldelico.com>

Hi Paul,

> Am 04.03.2022 um 19:41 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
> 
> 
>> Am 04.03.2022 um 19:33 schrieb Paul Cercueil <paul@crapouillou.net>:
>> 
>> 
>> 
>> Le ven., mars 4 2022 at 19:15:13 +0100, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>>> Hi Paul,
>>>> Am 04.03.2022 um 19:04 schrieb Paul Cercueil <paul@crapouillou.net>:
>>>> Le ven., mars 4 2022 at 18:51:14 +0100, H. Nikolaus Schaller <hns@goldelico.com> a écrit :
>>>>> Hi Paul, Neil,
>>>>>> Am 04.03.2022 um 17:47 schrieb Paul Cercueil <paul@crapouillou.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.
> 
> Great. I will try asap. If it works we can drop all our private ideas...
> 
> And focus on the last missing piece for jz4780 HDMI: the output format negotiation (which still is not working properly - but I have to analyse why).

Yes, it works. And I see you have merged it to drm-misc-next so that I can build on it.

So there is only the bus format negotiation to be understood and finally solved for v17.

Great and thanks,
Nikolaus


  reply	other threads:[~2022-03-05  7:50 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-26 17:12 [PATCH v16 0/4] MIPS: JZ4780 and CI20 HDMI H. Nikolaus Schaller
2022-02-26 17:12 ` H. Nikolaus Schaller
2022-02-26 17:12 ` [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() H. Nikolaus Schaller
2022-02-26 17:12   ` H. Nikolaus Schaller
2022-03-03 16:23   ` Neil Armstrong
2022-03-03 16:23     ` Neil Armstrong
2022-03-03 16:30     ` H. Nikolaus Schaller
2022-03-03 16:30       ` H. Nikolaus Schaller
2022-03-03 16:43       ` [Letux-kernel] " H. Nikolaus Schaller
2022-03-03 16:43         ` H. Nikolaus Schaller
2022-03-03 16:51         ` Paul Cercueil
2022-03-03 16:51           ` Paul Cercueil
2022-03-03 17:09           ` H. Nikolaus Schaller
2022-03-03 17:09             ` H. Nikolaus Schaller
2022-03-03 17:20             ` Paul Cercueil
2022-03-03 17:20               ` Paul Cercueil
2022-03-03 17:59               ` H. Nikolaus Schaller
2022-03-03 17:59                 ` H. Nikolaus Schaller
2022-03-04 13:30                 ` Neil Armstrong
2022-03-04 13:30                   ` Neil Armstrong
2022-03-04 16:47                   ` Paul Cercueil
2022-03-04 16:47                     ` Paul Cercueil
2022-03-04 17:51                     ` H. Nikolaus Schaller
2022-03-04 17:51                       ` H. Nikolaus Schaller
2022-03-04 18:04                       ` Paul Cercueil
2022-03-04 18:04                         ` Paul Cercueil
2022-03-04 18:15                         ` H. Nikolaus Schaller
2022-03-04 18:15                           ` H. Nikolaus Schaller
2022-03-04 18:33                           ` Paul Cercueil
2022-03-04 18:33                             ` Paul Cercueil
2022-03-04 18:41                             ` H. Nikolaus Schaller
2022-03-04 18:41                               ` H. Nikolaus Schaller
2022-03-05  7:49                               ` H. Nikolaus Schaller [this message]
2022-03-05  7:49                                 ` H. Nikolaus Schaller
2022-03-03 16:46     ` Paul Cercueil
2022-03-03 16:46       ` Paul Cercueil
2022-03-03 17:05       ` H. Nikolaus Schaller
2022-03-03 17:05         ` H. Nikolaus Schaller
2022-02-26 17:13 ` [PATCH v16 2/4] drm/ingenic: Add dw-hdmi driver specialization for jz4780 H. Nikolaus Schaller
2022-02-26 17:13   ` H. Nikolaus Schaller
2022-02-26 17:13 ` [PATCH v16 3/4] drm/bridge: display-connector: add ddc-en gpio support H. Nikolaus Schaller
2022-02-26 17:13   ` H. Nikolaus Schaller
2022-02-26 17:13 ` [PATCH v16 4/4] drm/bridge: dw-hdmi: fix bus formats negotiation for 8 bit modes H. Nikolaus Schaller
2022-02-26 17:13   ` H. Nikolaus Schaller
2022-03-01  9:18   ` Neil Armstrong
2022-03-01  9:18     ` Neil Armstrong
2022-03-01 20:37     ` H. Nikolaus Schaller
2022-03-01 20:37       ` H. Nikolaus Schaller
2022-03-02 10:25       ` Neil Armstrong
2022-03-02 10:25         ` Neil Armstrong
2022-03-02 11:15         ` H. Nikolaus Schaller
2022-03-02 11:15           ` H. Nikolaus Schaller
2022-03-02 14:34           ` Neil Armstrong
2022-03-02 14:34             ` Neil Armstrong
2022-03-02 22:24             ` H. Nikolaus Schaller
2022-03-02 22:24               ` H. Nikolaus Schaller
2022-03-03  8:35               ` Neil Armstrong
2022-03-03  8:35                 ` Neil Armstrong
2022-03-03 10:40                 ` H. Nikolaus Schaller
2022-03-03 10:40                   ` H. Nikolaus Schaller
2022-03-03 11:42                   ` Neil Armstrong
2022-03-03 11:42                     ` Neil Armstrong
2022-03-03 11:45                     ` H. Nikolaus Schaller
2022-03-03 11:45                       ` H. Nikolaus Schaller
2022-03-03 15:37                       ` H. Nikolaus Schaller
2022-03-03 15:37                         ` H. Nikolaus Schaller
2022-03-03 16:14                         ` Neil Armstrong
2022-03-03 16:14                           ` Neil Armstrong
2022-03-03 15:15                     ` Paul Cercueil
2022-03-03 15:15                       ` Paul Cercueil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C61F337D-7325-43BA-AFF1-A6E7FD602693@goldelico.com \
    --to=hns@goldelico.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=paul@boddie.org.uk \
    --cc=paul@crapouillou.net \
    --cc=robert.foss@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.