From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Henrik Grimler <henrik@grimler.se>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht, replicant@osuosl.org,
linux-kernel@vger.kernel.org, m.szyprowski@samsung.com
Subject: Re: [PATCH v2 3/3] drm/bridge: sii9234: use extcon cable detection logic to detect MHL
Date: Mon, 18 Aug 2025 03:42:07 +0300 [thread overview]
Message-ID: <r2u2odrkzfezohq44nh4jw6oj23j46gohuzsh6k7jpwnzojxqk@vdus4jj5lv7x> (raw)
In-Reply-To: <20250808095259.GA31443@grimfrac.localdomain>
On Fri, Aug 08, 2025 at 11:52:59AM +0200, Henrik Grimler wrote:
> Hi Dmitry,
>
> On Sun, Jul 27, 2025 at 08:07:37PM +0300, Dmitry Baryshkov wrote:
> > On Thu, Jul 24, 2025 at 08:50:53PM +0200, Henrik Grimler wrote:
> > > To use MHL we currently need the MHL chip to be permanently on, which
> > > consumes unnecessary power. Let's use extcon attached to MUIC to enable
> > > the MHL chip only if it detects an MHL cable.
> >
> > Does HPD GPIO reflect the correct state of the cable?
>
> Yes, the HPD gpio pin changes state from low to high when a mhl cable is
> connected:
>
> $ sudo cat /sys/kernel/debug/gpio|grep gpio-755
> gpio-755 ( |hpd ) in lo IRQ
> $ sudo cat /sys/kernel/debug/gpio|grep gpio-755
> gpio-755 ( |hpd ) in hi IRQ
>
> so that is described correctly.
>
Ack.
>
> and in captured trace I see that on cable connect we get an irq that
> is handled through:
> 1. max77693_muic_irq_handler
> 2. max77693_muic_irq_work
> 3. max77693_muic_adc_handler
> 4. sii9234_extcon_notifier
> 5. sii9234_extcon_work
> 6. sii9234_cable_in
> 7. hdmi_irq_thread
>
> Raw captured trace dat file can be found here:
> https://grimler.se/files/sii9234-mhl-connect-trace.dat
>
> Maybe you were asking for some other type of order of events log
> though, please let me know if I misunderstand.
>
> > Should the sii9234 signal to Exynos HDMI that the link is established?
>
> Maybe.. Sorry, I do not know enough about extcon and drm yet. I assume
> you mean through drm_helper_hpd_irq_event() and
> drm_bridge_hpd_notify(), I will experiment a bit and add it to the
> driver and see if this improves it.
If you are getting the HDMI IRQ event, then I'd suggest checking that
you are actually getting the 'plugged' event, etc. I was worried that
you are hijacking the DRM chain. But if you are getting hotplug events,
then it's fine (and most likely correct).
>
> There is currently (as I wrote to Marek Szyprowski in a response in
> v1) an issue where device screen stops working if cable is connected
> when device screen is off, maybe proper notification would help..
>
> > > Signed-off-by: Henrik Grimler <henrik@grimler.se>
> > > ---
> > > v2: add dependency on extcon. Issue reported by kernel test robot
> > > <lkp@intel.com>
> > > ---
> > > drivers/gpu/drm/bridge/Kconfig | 1 +
> > > drivers/gpu/drm/bridge/sii9234.c | 89 ++++++++++++++++++++++++++++++++++++++--
> > > 2 files changed, 87 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> > > index b9e0ca85226a603a24f90c6879d1499f824060cb..f18a083f6e1c6fe40bde5e65a1548acc61a162ae 100644
> > > --- a/drivers/gpu/drm/bridge/Kconfig
> > > +++ b/drivers/gpu/drm/bridge/Kconfig
> > > @@ -303,6 +303,7 @@ config DRM_SII902X
> > > config DRM_SII9234
> > > tristate "Silicon Image SII9234 HDMI/MHL bridge"
> > > depends on OF
> > > + select EXTCON
> >
> > Either this or 'depends on EXTCON || !EXTCON'
>
> Feels like depends is a better description so will change to it,
> thanks!
>
> Best regards,
> Henrik Grimler
>
> > > help
> > > Say Y here if you want support for the MHL interface.
> > > It is an I2C driver, that detects connection of MHL bridge
> >
> > --
> > With best wishes
> > Dmitry
> >
--
With best wishes
Dmitry
next prev parent reply other threads:[~2025-08-18 0:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 18:50 [PATCH v2 0/3] drm/bridge: sii9234: use extcon to detect cable attachment Henrik Grimler
2025-07-24 18:50 ` [PATCH v2 1/3] drm/bridge: sii9234: fix some typos in comments and messages Henrik Grimler
2025-07-27 16:37 ` Dmitry Baryshkov
2025-07-24 18:50 ` [PATCH v2 2/3] drm/bridge: sii9234: use dev_err_probe where applicable Henrik Grimler
2025-07-27 16:38 ` Dmitry Baryshkov
2025-07-28 18:56 ` Henrik Grimler
2025-07-24 18:50 ` [PATCH v2 3/3] drm/bridge: sii9234: use extcon cable detection logic to detect MHL Henrik Grimler
2025-07-27 17:07 ` Dmitry Baryshkov
2025-08-08 9:52 ` Henrik Grimler
2025-08-18 0:42 ` Dmitry Baryshkov [this message]
2025-08-24 11:11 ` Henrik Grimler
2025-08-14 11:26 ` Marek Szyprowski
2025-08-18 14:26 ` Henrik Grimler
2025-08-22 7:37 ` Marek Szyprowski
2025-08-23 19:22 ` Henrik Grimler
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=r2u2odrkzfezohq44nh4jw6oj23j46gohuzsh6k7jpwnzojxqk@vdus4jj5lv7x \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=henrik@grimler.se \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=replicant@osuosl.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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).