From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
intel-gfx@lists.freedesktop.org,
Seung-Woo Kim <sw0312.kim@samsung.com>,
dri-devel@lists.freedesktop.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Ben Skeggs <bskeggs@redhat.com>,
Vincent Abriou <vincent.abriou@st.com>
Subject: Re: [PATCH 2/2] drm/hdmi: Allow HDMI infoframe without VIC or S3D
Date: Wed, 05 Jul 2017 11:46:14 +0300 [thread overview]
Message-ID: <15784262.u1tvHdLXuT@avalon> (raw)
In-Reply-To: <20170704124402.GK12629@intel.com>
Hi Ville,
On Tuesday 04 Jul 2017 15:44:02 Ville Syrjälä wrote:
> On Tue, Jul 04, 2017 at 01:56:07PM +0200, Andrzej Hajda wrote:
> > On 03.07.2017 21:19, ville.syrjala@linux.intel.com wrote:
> >> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>
> >> Appedix F of HDMI 2.0 says that some HDMI sink may fail to switch from
> >> 3D to 2D mode in a timely fashion if the source simply stops sending the
> >> HDMI infoframe. The suggested workaround is to keep sending the
> >> infoframe even when strictly not necessary (ie. no VIC and no S3D).
> >> HDMI 1.4 does allow for this behaviour, stating that sending the
> >> infoframe is optional in this case.
> >
> > My impression from the specs is that it should be done only after
> > switching from 3d to 2d mode.
> > In such case we just need to remember previous mode, if it was 3d, empty
> > VSIF infoframe should be still generated for 2seconds.
> > No need to do guesses from EDID.
> > Am I right, or just missing something?
>
> This code has no idea about any 3D->2D transitions, trying to make it
> do that would just result in a lot of complexity. Much easier to just
> always send the infoframe.
>
> >> The infoframe was first specified in HDMI 1.4, so in theory sinks
> >> predating that may not appreciate us sending an uknown infoframe
> >> their way. To avoid regressions let's try to determine if the sink
> >> supports the infoframe or not. Unfortunately there's no direct way
> >> to do that, so instead we'll just check if we managed to parse any
> >> HDMI 1.4 4k or stereo modes from the EDID, and if so we assume the
> >> sink will accept the infoframe. Also if the EDID contains the HDMI
> >> 2.0 HDMI Forum VSDB we can assume the sink is prepared to receive
> >> the infoframe.
> >> Cc: Archit Taneja <architt@codeaurora.org>
> >> Cc: Andrzej Hajda <a.hajda@samsung.com>
> >> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> >> Cc: Inki Dae <inki.dae@samsung.com>
> >> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> >> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> >> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> >> Cc: CK Hu <ck.hu@mediatek.com>
> >> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> >> Cc: Ben Skeggs <bskeggs@redhat.com>
> >> Cc: Mark Yao <mark.yao@rock-chips.com>
> >> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> >> Cc: Vincent Abriou <vincent.abriou@st.com>
> >> Cc: Shawn Guo <shawnguo@kernel.org>
> >> Cc: Shashank Sharma <shashank.sharma@intel.com>
> >> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> ---
> >>
> >> drivers/gpu/drm/bridge/sil-sii8620.c | 3 ++-
> >> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +++-
> >> drivers/gpu/drm/drm_edid.c | 32 ++++++++++++++++++------
> >> drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
> >> drivers/gpu/drm/i915/intel_hdmi.c | 14 ++++++++------
> >> drivers/gpu/drm/mediatek/mtk_hdmi.c | 3 ++-
> >> drivers/gpu/drm/nouveau/nv50_display.c | 3 ++-
> >> drivers/gpu/drm/rockchip/inno_hdmi.c | 1 +
> >> drivers/gpu/drm/sti/sti_hdmi.c | 4 +++-
> >> drivers/gpu/drm/zte/zx_hdmi.c | 1 +
> >> include/drm/drm_connector.h | 5 +++++
> >> include/drm/drm_edid.h | 1 +
> >> 12 files changed, 55 insertions(+), 18 deletions(-)
[snip]
> > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > index 2e55599816aa..c061dd5d25c0 100644
> > > --- a/drivers/gpu/drm/drm_edid.c
> > > +++ b/drivers/gpu/drm/drm_edid.c
[snip]
> >> @@ -4452,6 +4458,7 @@ s3d_structure_from_display_mode(const struct
> >> drm_display_mode *mode)> >
> >> * drm_hdmi_vendor_infoframe_from_display_mode() - fill an HDMI
> >> infoframe with
> >> * data from a DRM display mode
> >> * @frame: HDMI vendor infoframe
> >> + * @connector: the connector
> >> * @mode: DRM display mode
> >> *
> >> * Note that there's is a need to send HDMI vendor infoframes only when
> >> using a
> >> @@ -4462,8 +4469,15 @@ s3d_structure_from_display_mode(const struct
> >> drm_display_mode *mode)
> >> */
> >>
> >> int
> >> drm_hdmi_vendor_infoframe_from_display_mode(struct
> >> hdmi_vendor_infoframe *frame,
> >> + struct drm_connector *connector,
> >> const struct drm_display_mode
> >> *mode)
> >> {
> >> + /*
> >> + * FIXME: sil-sii8620 doesn't have a connector around when
> >> + * we need one, so we have to be prepared for a NULL connector.
> >> + */
> >> + bool has_hdmi_infoframe = connector ?
> >> + &connector->display_info.has_hdmi_infoframe : NULL;
> >
> > I wonder if requiring connector is a good idea, I can imagine that this
> > function can be necessary in pure drm_encoder or non-terminal drm_bridge.
>
> No decent way around it, unless we want to risk sending the infoframe to
> pre HDMI 1.4 sinks. Sounds like you have some kind of layering problem
> if you can't get at the connector when you call this.
I think you have a layering violation if you assume that there's a connector
after the HDMI encoder :-) What if the encoder's output is connected to, let's
say, an HDMI to DSI bridge ? There's no connector in that case.
> > > int err;
> > > u32 s3d_flags;
> > > u8 vic;
[snip]
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-07-05 8:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170703192016epcas2p14dd4f6f04bff3325a4ba8bec715876e2@epcas2p1.samsung.com>
2017-07-03 19:19 ` [PATCH 1/2] video/hdmi: Allow "empty" HDMI infoframes ville.syrjala
2017-07-03 19:19 ` [PATCH 2/2] drm/hdmi: Allow HDMI infoframe without VIC or S3D ville.syrjala
2017-07-04 10:16 ` Ville Syrjälä
2017-07-04 11:56 ` Andrzej Hajda
2017-07-04 12:44 ` Ville Syrjälä
2017-07-04 13:58 ` Andrzej Hajda
2017-07-04 14:25 ` Ville Syrjälä
2017-07-04 15:09 ` Andrzej Hajda
2017-07-04 15:20 ` Ville Syrjälä
2017-07-05 8:46 ` Laurent Pinchart [this message]
2017-07-05 11:48 ` Ville Syrjälä
2017-07-03 19:39 ` ✓ Fi.CI.BAT: success for series starting with [1/2] video/hdmi: Allow "empty" HDMI infoframes Patchwork
2017-07-04 9:41 ` [PATCH 1/2] " Andrzej Hajda
2017-07-04 10:12 ` Ville Syrjälä
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=15784262.u1tvHdLXuT@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kyungmin.park@samsung.com \
--cc=shawnguo@kernel.org \
--cc=sw0312.kim@samsung.com \
--cc=ville.syrjala@linux.intel.com \
--cc=vincent.abriou@st.com \
/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).