From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] video/hdmi: Allow "empty" HDMI infoframes
Date: Tue, 4 Jul 2017 13:12:46 +0300 [thread overview]
Message-ID: <20170704101246.GI12629@intel.com> (raw)
In-Reply-To: <a9c7edaa-76ad-1a08-17a6-7a5c860177d5@samsung.com>
On Tue, Jul 04, 2017 at 11:41:27AM +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>
> >
> > HDMI 2.0 Appendix F suggest that we should keep sending the infoframe
> > when switching from 3D to 2D mode, even if the infoframe isn't strictly
> > necessary (ie. not needed to transmit the VIC or stereo information).
> > This is a workaround against some sinks that fail to realize that they
> > should switch from 3D to 2D mode when the source stop transmitting
> > the infoframe.
> >
> > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/video/hdmi.c | 18 +++++++++---------
> > 1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
> > index 1cf907ecded4..af0c8dad29eb 100644
> > --- a/drivers/video/hdmi.c
> > +++ b/drivers/video/hdmi.c
> > @@ -341,10 +341,6 @@ ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
> > u8 *ptr = buffer;
> > size_t length;
> >
> > - /* empty info frame */
> > - if (frame->vic == 0 && frame->s3d_struct == HDMI_3D_STRUCTURE_INVALID)
> > - return -EINVAL;
> > -
> > /* only one of those can be supplied */
> > if (frame->vic != 0 && frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID)
> > return -EINVAL;
> > @@ -352,8 +348,10 @@ ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
> > /* for side by side (half) we also need to provide 3D_Ext_Data */
> > if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF)
> > frame->length = 6;
> > - else
> > + else if (frame->vic != 0 || frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID)
> > frame->length = 5;
> > + else
> > + frame->length = 4;
> >
> > length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
> >
> > @@ -372,14 +370,16 @@ ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
> > ptr[5] = 0x0c;
> > ptr[6] = 0x00;
> >
> > - if (frame->vic) {
> > - ptr[7] = 0x1 << 5; /* video format */
> > - ptr[8] = frame->vic;
> > - } else {
> > + if (frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) {
> > ptr[7] = 0x2 << 5; /* video format */
> > ptr[8] = (frame->s3d_struct & 0xf) << 4;
> > if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF)
> > ptr[9] = (frame->s3d_ext_data & 0xf) << 4;
> > + } else if (frame->vic) {
> > + ptr[7] = 0x1 << 5; /* video format */
> > + ptr[8] = frame->vic;
> > + } else {
> > + ptr[7] = 0x0 << 5; /* video format */
>
> Changed order of conditionals (vic,s3d versus s3d,vic) could result in
> different output, but only in case of incorrect VSIFs, so probably harmless.
Such an infoframe would have been rejected earlier, so can't happen.
I did the reordering because I wanted the order to be the same
here as it's where the length is determined. easier to cross check that
way.
>
> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Thanks.
>
> --
> Regards
> Andrzej
>
> > }
> >
> > hdmi_infoframe_set_checksum(buffer, length);
>
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-07-04 10:12 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
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ä [this message]
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=20170704101246.GI12629@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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).