[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya+aEr+XWTjdcTt9@ripper>
Date: Tue, 7 Dec 2021 09:29:54 -0800
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Imre Deak <imre.deak@...el.com>,
Prashant Malani <pmalani@...omium.org>,
Doug Anderson <dianders@...omium.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Abhinav Kumar <abhinavk@...eaurora.org>,
Stephen Boyd <swboyd@...omium.org>,
Kuogee Hsieh <khsieh@...eaurora.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Vara Reddy <varar@...eaurora.org>,
freedreno <freedreno@...ts.freedesktop.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Benson Leung <bleung@...omium.org>
Subject: Re: [RFC] drm/msm/dp: Allow attaching a drm_panel
On Tue 07 Dec 08:56 PST 2021, Hans de Goede wrote:
> 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@...omium.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.
>
Thanks, that clarifies things.
I think it makes sense to pass #lanes, as that would rule out the
possibility of attempting to run 4 lanes per dpcd information over a
2-lane mux configuration as well.
I will write up some patches.
Regards,
Bjorn
Powered by blists - more mailing lists