All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Imre Deak <imre.deak@intel.com>
Cc: Prashant Malani <pmalani@chromium.org>,
	Doug Anderson <dianders@chromium.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Kuogee Hsieh <khsieh@codeaurora.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Vara Reddy <varar@codeaurora.org>,
	freedreno <freedreno@lists.freedesktop.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@chromium.org>
Subject: Re: [RFC] drm/msm/dp: Allow attaching a drm_panel
Date: Tue, 7 Dec 2021 17:56:41 +0100	[thread overview]
Message-ID: <1932c73c-e372-788b-fcbd-13cad52d96da@redhat.com> (raw)
In-Reply-To: <Ya9S3cFo0rOUotqY@kuha.fi.intel.com>

Hi all,

On 12/7/21 13:26, Heikki Krogerus wrote:
> +Hans and Imre
> 
> On Mon, Dec 06, 2021 at 02:31:40PM -0800, Bjorn Andersson wrote:
>> On Thu 07 Oct 03:17 PDT 2021, Heikki Krogerus wrote:
>>> On Wed, Oct 06, 2021 at 01:26:35PM -0700, Prashant Malani wrote:
>>>> (CC+ Heikki)
>> [..]
>>>> On Wed, Oct 6, 2021 at 8:19 AM Doug Anderson <dianders@chromium.org> wrote:
>> [..]
>>>         void drm_connector_oob_hotplug_event(struct fwnode_handle *connector_fwnode);
>>>
>>> If your USB Type-C controller/port driver does not yet register the DP
>>> alt mode, the it's responsible of handling HPD separately by calling
>>> drm_connector_oob_hotplug_event() on its own.
>>>
>>
>> Finally found my way back to this topic and it doesn't look like I can
>> reuse the existing altmode code with the firmware interface provided by
>> Qualcomm, so  I just hacked something up that invokes
>> drm_connector_oob_hotplug_event().
>>
>> But I'm not able to make sense of what the expected usage is. Reading
>> altmode/displayport.c, it seems that I should only invoke
>> drm_connector_oob_hotplug_event() as HPD state toggles.
>>
>> I made a trial implementation of this, where my firmware interface
>> driver calls drm_connector_oob_hotplug_event() every time HPD state
>> changes and then in my oob_hotplug_event callback I flip the DP
>> controller between on and off.
>>
>> Unfortunately when I then connect my HDMI dongle, I get HPD state HIGH,
>> call the oob_hotplug_event, the DP driver powers up and concludes that
>> there's nothing connected to the dongle and goes to idle. I then connect
>> the HDMI cable to the dongle, the firmware sends me another message with
>> HPD irq and state HIGH, which I ignore because it's not a change in
>> state.
>>
>> In the end I hacked up drm_connector_oob_hotplug_event() to allow me to
>> pass the HPD state and this solves my problem. I can now distinguish
>> between connect, disconnect and attention.
>>
>> Can you please help shed some light on what I might be missing?

The plan always was to pass some extra information, like the number
of available DP lanes (which can make training faster) along as
parameter to the drm_connector_oob_hotplug_event().

The merged version ended up not doing this because there were no
consumers, but passing additional info like HPD state definitely
is ok.

Regards,

Hans


i


WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Imre Deak <imre.deak@intel.com>
Cc: freedreno <freedreno@lists.freedesktop.org>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Doug Anderson <dianders@chromium.org>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Kuogee Hsieh <khsieh@codeaurora.org>,
	Prashant Malani <pmalani@chromium.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Vara Reddy <varar@codeaurora.org>,
	Stephen Boyd <swboyd@chromium.org>, Sean Paul <sean@poorly.run>
Subject: Re: [RFC] drm/msm/dp: Allow attaching a drm_panel
Date: Tue, 7 Dec 2021 17:56:41 +0100	[thread overview]
Message-ID: <1932c73c-e372-788b-fcbd-13cad52d96da@redhat.com> (raw)
In-Reply-To: <Ya9S3cFo0rOUotqY@kuha.fi.intel.com>

Hi all,

On 12/7/21 13:26, Heikki Krogerus wrote:
> +Hans and Imre
> 
> On Mon, Dec 06, 2021 at 02:31:40PM -0800, Bjorn Andersson wrote:
>> On Thu 07 Oct 03:17 PDT 2021, Heikki Krogerus wrote:
>>> On Wed, Oct 06, 2021 at 01:26:35PM -0700, Prashant Malani wrote:
>>>> (CC+ Heikki)
>> [..]
>>>> On Wed, Oct 6, 2021 at 8:19 AM Doug Anderson <dianders@chromium.org> wrote:
>> [..]
>>>         void drm_connector_oob_hotplug_event(struct fwnode_handle *connector_fwnode);
>>>
>>> If your USB Type-C controller/port driver does not yet register the DP
>>> alt mode, the it's responsible of handling HPD separately by calling
>>> drm_connector_oob_hotplug_event() on its own.
>>>
>>
>> Finally found my way back to this topic and it doesn't look like I can
>> reuse the existing altmode code with the firmware interface provided by
>> Qualcomm, so  I just hacked something up that invokes
>> drm_connector_oob_hotplug_event().
>>
>> But I'm not able to make sense of what the expected usage is. Reading
>> altmode/displayport.c, it seems that I should only invoke
>> drm_connector_oob_hotplug_event() as HPD state toggles.
>>
>> I made a trial implementation of this, where my firmware interface
>> driver calls drm_connector_oob_hotplug_event() every time HPD state
>> changes and then in my oob_hotplug_event callback I flip the DP
>> controller between on and off.
>>
>> Unfortunately when I then connect my HDMI dongle, I get HPD state HIGH,
>> call the oob_hotplug_event, the DP driver powers up and concludes that
>> there's nothing connected to the dongle and goes to idle. I then connect
>> the HDMI cable to the dongle, the firmware sends me another message with
>> HPD irq and state HIGH, which I ignore because it's not a change in
>> state.
>>
>> In the end I hacked up drm_connector_oob_hotplug_event() to allow me to
>> pass the HPD state and this solves my problem. I can now distinguish
>> between connect, disconnect and attention.
>>
>> Can you please help shed some light on what I might be missing?

The plan always was to pass some extra information, like the number
of available DP lanes (which can make training faster) along as
parameter to the drm_connector_oob_hotplug_event().

The merged version ended up not doing this because there were no
consumers, but passing additional info like HPD state definitely
is ok.

Regards,

Hans


i


  reply	other threads:[~2021-12-07 16:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 23:13 [RFC] drm/msm/dp: Allow attaching a drm_panel Bjorn Andersson
2021-07-26 23:13 ` Bjorn Andersson
2021-07-29  9:59 ` Dmitry Baryshkov
2021-07-29  9:59   ` Dmitry Baryshkov
2021-08-25 23:28   ` Bjorn Andersson
2021-08-26  1:31 ` Stephen Boyd
2021-08-26  1:31   ` Stephen Boyd
2021-08-26 20:36   ` Doug Anderson
2021-08-26 20:36     ` Doug Anderson
2021-08-26 20:29 ` Doug Anderson
2021-08-26 20:29   ` Doug Anderson
2021-08-27 20:52 ` Doug Anderson
2021-08-27 20:52   ` Doug Anderson
2021-08-28 14:40   ` Bjorn Andersson
2021-08-30 16:01     ` Doug Anderson
2021-08-30 16:01       ` Doug Anderson
2021-10-01 21:02   ` Bjorn Andersson
2021-10-05  0:36     ` Doug Anderson
2021-10-05  1:11       ` Bjorn Andersson
2021-10-05  1:50         ` Stephen Boyd
2021-10-05  2:11           ` Bjorn Andersson
2021-10-05 15:39         ` Doug Anderson
2021-10-05 17:34           ` Bjorn Andersson
2021-10-05 23:09             ` Doug Anderson
2021-10-06  2:29               ` Bjorn Andersson
2021-10-06 15:12                 ` Doug Anderson
2021-10-06 20:26                   ` Prashant Malani
2021-10-07 10:17                     ` Heikki Krogerus
2021-10-07 16:15                       ` Bjorn Andersson
2021-10-08 12:38                         ` Heikki Krogerus
2023-05-22 20:51                           ` Bjorn Andersson
2023-05-22 20:51                             ` Bjorn Andersson
2023-05-22 21:53                             ` Bjorn Andersson
2023-05-22 21:53                               ` Bjorn Andersson
2023-05-24  9:50                               ` Heikki Krogerus
2023-05-24  9:50                                 ` Heikki Krogerus
2021-12-06 22:31                       ` Bjorn Andersson
2021-12-06 22:31                         ` Bjorn Andersson
2021-12-07 12:26                         ` Heikki Krogerus
2021-12-07 12:26                           ` Heikki Krogerus
2021-12-07 16:56                           ` Hans de Goede [this message]
2021-12-07 16:56                             ` Hans de Goede
2021-12-07 17:29                             ` Bjorn Andersson
2021-12-07 17:29                               ` Bjorn Andersson
2021-12-07 17:54                           ` Imre Deak
2021-12-07 17:54                             ` Imre Deak

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=1932c73c-e372-788b-fcbd-13cad52d96da@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=bleung@chromium.org \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=enric.balletbo@collabora.com \
    --cc=freedreno@lists.freedesktop.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=khsieh@codeaurora.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmalani@chromium.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    --cc=varar@codeaurora.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.