From: Michael Rodin <mrodin@de.adit-jv.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Michael Rodin <mrodin@de.adit-jv.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Dave Airlie <airlied@redhat.com>,
Alex Deucher <alexander.deucher@amd.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<michael@rodin.online>, <erosca@de.adit-jv.com>,
<laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] drm: override detected status for connectors which are forced on
Date: Fri, 20 Jan 2023 10:03:48 +0100 [thread overview]
Message-ID: <20230120090348.GA860002@vmlxhi-182> (raw)
In-Reply-To: <20221222174054.tsj4rfzejrl3cc7g@penduick>
Hi Maxime,
thank you for your feedback!
On Thu, Dec 22, 2022 at 06:40:54PM +0100, Maxime Ripard wrote:
> Hi,
>
> On Thu, Dec 15, 2022 at 06:03:59PM +0100, Michael Rodin wrote:
> > The detected status of a connector should be ignored when a connector is
> > forced as hinted in the commit d50ba256b5f1 ("drm/kms: start
> > adding command line interface using fb."). One negative side effect of
> > not ignoring this is observed on the RCar3 SoCs which use the dw-hdmi
> > driver. It continues executing drm_helper_hpd_irq_event even if its
> > connector is forced to ON. As consequence drm_helper_hpd_irq_event calls
> > "detect" so the connector status is updated to "disconnected":
> >
> > [ 420.201527] [drm:drm_helper_hpd_irq_event] [CONNECTOR:76:HDMI-A-1] status updated from connected to disconnected
> >
> > This status is corrected by drm_helper_probe_single_connector_modes shortly
> > after this because this function checks if a connector is forced:
> >
> > [ 420.218703] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:76:HDMI-A-1] status updated from disconnected to connected
> >
> > To avoid similar issues this commit adapts functions which call "detect"
> > so they check additionally if a connector is forced and override the status
> > returned by "detect".
> >
> > Fixes: 816da85a0990 ("drm: handle HPD and polled connectors separately")
> > Signed-off-by: Michael Rodin <mrodin@de.adit-jv.com>
>
> As reported here, this breaks vc4, and probably i915:
> https://lore.kernel.org/dri-devel/20221107123657.24vbgep3jqeklb2s@houat/
>
> Maxime
My understanding from [1,2] was that the way to avoid such regressions is
to make sure that the "detect" callbacks of connector drivers are always
called even if a connector is forced. This is what I have implemented in my
second patch where "detect" is called first and then the return value is
adjusted based on the "force" status. If my understanding was wrong, I
would very much appreciate if you could give me some hints for the
implementation of an acceptable solution. Maybe it would be safer to simply
avoid calling drm_helper_hpd_irq_event in the dw-hdmi driver when the
connector is forced like mentioned by Laurent [3]? Although this would fix
this global problem only for one particular driver.
[1] https://lore.kernel.org/dri-devel/20221107123657.24vbgep3jqeklb2s@houat/
[2] https://lore.kernel.org/dri-devel/20221107122504.tejlb24bjbaxw5t6@houat/
[3] https://lore.kernel.org/dri-devel/YzYrNJbfGcch1UtX@pendragon.ideasonboard.com/
--
Best Regards,
Michael
next prev parent reply other threads:[~2023-01-20 9:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 9:11 [PATCH] drm: do not call detect for connectors which are forced on Michael Rodin
2022-09-29 23:33 ` Laurent Pinchart
2022-11-07 12:25 ` Maxime Ripard
2022-11-07 12:36 ` Maxime Ripard
2022-12-15 17:03 ` [PATCH] drm: override detected status " Michael Rodin
2022-12-22 17:40 ` Maxime Ripard
2023-01-20 9:03 ` Michael Rodin [this message]
2023-01-27 13:57 ` Maxime Ripard
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=20230120090348.GA860002@vmlxhi-182 \
--to=mrodin@de.adit-jv.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=erosca@de.adit-jv.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime@cerno.tech \
--cc=michael@rodin.online \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).