From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Maxime Ripard <mripard@kernel.org>
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>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>, "Phong LE" <ple@baylibre.com>,
"Inki Dae" <inki.dae@samsung.com>,
"Seung-Woo Kim" <sw0312.kim@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Russell King" <linux@armlinux.org.uk>,
"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Alain Volmat" <alain.volmat@foss.st.com>,
"Raphael Gallais-Pou" <rgallaispou@gmail.com>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Maíra Canal" <mcanal@igalia.com>,
"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v5 9/9] drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_update_edid()
Date: Tue, 03 Dec 2024 16:32:44 +0200 [thread overview]
Message-ID: <877c8g4z1v.fsf@intel.com> (raw)
In-Reply-To: <ae24x2bo736jpzi77l34hybejawwe4rp47v2idedga344ye6zr@bxsxz34dwrd2>
On Tue, 03 Dec 2024, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:
> On Mon, Dec 02, 2024 at 02:27:49PM +0100, Maxime Ripard wrote:
>> Hi,
>>
>> On Sun, Dec 01, 2024 at 02:44:13AM +0200, Dmitry Baryshkov wrote:
>> > Use the helper function to update the connector's information. This
>> > makes sure that HDMI-related events are handled in a generic way.
>> > Currently it is limited to the HDMI state reporting to the sound system.
>> >
>> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> > ---
>> > drivers/gpu/drm/vc4/vc4_hdmi.c | 9 +++++++--
>> > 1 file changed, 7 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
>> > index d0a9aff7ad43016647493263c00d593296a1e3ad..d83f587ab69f4b8f7d5c37a00777f11da8301bc1 100644
>> > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
>> > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
>> > @@ -401,13 +401,16 @@ static void vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi,
>> > */
>> >
>> > if (status == connector_status_disconnected) {
>> > + drm_atomic_helper_connector_hdmi_update_edid(connector, NULL);
>> > cec_phys_addr_invalidate(vc4_hdmi->cec_adap);
>> > return;
>> > }
>> >
>> > drm_edid = drm_edid_read_ddc(connector, vc4_hdmi->ddc);
>> >
>> > - drm_edid_connector_update(connector, drm_edid);
>> > + // TODO: use drm_atomic_helper_connector_hdmi_update() once it gains
>> > + // CEC support
>> > + drm_atomic_helper_connector_hdmi_update_edid(connector, drm_edid);
>>
>> So, it's not just about EDID, and I think we shouldn't really focus on
>> that either.
>>
>> As that patch points out, even if we only consider EDID's, we have
>> different path depending on the connector status. It shouldn't be up to
>> the drivers to get this right.
>>
>> What I had in mind was something like a
>> drm_atomic_helper_connector_hdmi_hotplug function that would obviously
>> deal with EDID only here, but would expand to CEC, scrambling, etc.
>> later on.
>
> I thought about it, after our discussion, but in the end I had to
> implement the EDID-specific function, using edid == NULL as
> "disconnected" event. The issue is pretty simple: there is no standard
> way to get EDID from the connector. The devices can call
> drm_edid_read(), drm_edid_read_ddc(connector->ddc) or (especially
> embedded bridges) use drm_edid_read_custom().
Lack of EDID may be a good approximation of disconnected for displays
that should have one, but just a reminder that having an EDID should not
be the only approximation for connected.
This is relevant for the debugfs/firmware EDID case. You'll want to be
able to have that, without it implying connected.
BR,
Jani.
>
> Of course we can go with the functional way and add the
> .read_edid(drm_connector) callback to the HDMI funcs. Then the
> drm_atomic_helper_connector_hdmi_hotplug() function can read EDID on its
> own.
>
> Also the function that you proposed perfectly fits the HPD notification
> callbacks, but which function should be called from the .get_modes()?
> The _hdmi_hotplug() doesn't fit there. Do we still end up with both
> drm_atomic_helper_connector_hdmi_hotplug() and
> drm_atomic_helper_connector_hdmi_update_edid()?
>
>>
>> And would cover both the connected/disconnected cases.
>>
>> Maxime
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-12-03 14:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 0:44 [PATCH v5 0/9] drm: add DRM HDMI Codec framework Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 1/9] ASoC: hdmi-codec: pass data to get_dai_id too Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 2/9] ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata Dmitry Baryshkov
2024-12-02 12:06 ` Maxime Ripard
2024-12-02 12:59 ` Mark Brown
2024-12-02 13:29 ` Maxime Ripard
2024-12-02 13:39 ` Mark Brown
2024-12-02 14:59 ` Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 3/9] drm/connector: implement generic HDMI codec helpers Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 4/9] drm/bridge: connector: add support for HDMI codec framework Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 5/9] drm/bridge: lt9611: switch to using the DRM " Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 6/9] drm/display/hdmi: implement connector update functions Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 7/9] drm/bridge_connector: hook drm_atomic_helper_connector_hdmi_update_edid() Dmitry Baryshkov
2024-12-03 14:25 ` Jani Nikula
2024-12-04 3:18 ` Dmitry Baryshkov
2024-12-04 7:42 ` Jani Nikula
2024-12-04 23:17 ` Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 8/9] drm/vc4: hdmi: switch to using generic HDMI Codec infrastructure Dmitry Baryshkov
2024-12-02 13:20 ` Maxime Ripard
2024-12-03 12:19 ` Dmitry Baryshkov
2024-12-06 14:11 ` Maxime Ripard
2024-12-01 0:44 ` [PATCH v5 9/9] drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_update_edid() Dmitry Baryshkov
2024-12-02 13:27 ` Maxime Ripard
2024-12-03 12:27 ` Dmitry Baryshkov
2024-12-03 14:32 ` Jani Nikula [this message]
2024-12-06 14:23 ` mripard
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=877c8g4z1v.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=alain.volmat@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=chunkuang.hu@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=inki.dae@samsung.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel-list@raspberrypi.com \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=ple@baylibre.com \
--cc=rfoss@kernel.org \
--cc=rgallaispou@gmail.com \
--cc=simona@ffwll.ch \
--cc=sw0312.kim@samsung.com \
--cc=tiwai@suse.com \
--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).