From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 06/12] video/hdmi: Derive the bar data valid bit from the bar data fields Date: Wed, 14 Aug 2013 13:41:29 +0300 Message-ID: <20130814104129.GO7159@intel.com> References: <1376435848-14584-1-git-send-email-damien.lespiau@intel.com> <1376435848-14584-7-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1376435848-14584-7-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Aug 14, 2013 at 12:17:22AM +0100, Damien Lespiau wrote: > Just like: > = > Author: Damien Lespiau > Date: Mon Aug 12 11:53:24 2013 +0100 > = > video/hdmi: Don't let the user of this API create invalid infoframes > = > But this time for the horizontal/vertical bar data present bits. > = > Signed-off-by: Damien Lespiau > --- > drivers/video/hdmi.c | 5 +++-- > include/linux/hdmi.h | 2 -- > 2 files changed, 3 insertions(+), 4 deletions(-) > = > diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c > index e36da36..ac84215 100644 > --- a/drivers/video/hdmi.c > +++ b/drivers/video/hdmi.c > @@ -101,10 +101,11 @@ ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_inf= oframe *frame, void *buffer, > if (frame->active_aspect & 0xf) > ptr[0] |=3D BIT(4); > = > - if (frame->horizontal_bar_valid) > + /* Bit 3 and 2 indicate if we transmit horizontal/vertical bar data */ > + if (frame->top_bar || frame->bottom_bar) > ptr[0] |=3D BIT(3); > = > - if (frame->vertical_bar_valid) > + if (frame->left_bar || frame->right_bar) > ptr[0] |=3D BIT(2); Technically top=3D0,bottom=3D0 or left=3D0,right=3D0 is a valid bar setup, but it would indicate that the entire picture is made up of the bottom/right bar. I guess no one would really want to use such a setup, and even if they do, they could just use some N!=3D0 for both bars to achieve the same effect. So we don't seem to lose anything by doing this. Reviewed-by: Ville Syrj=E4l=E4 > = > ptr[1] =3D ((frame->colorimetry & 0x3) << 6) | > diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h > index 931474c6..b98340b 100644 > --- a/include/linux/hdmi.h > +++ b/include/linux/hdmi.h > @@ -109,8 +109,6 @@ struct hdmi_avi_infoframe { > unsigned char version; > unsigned char length; > enum hdmi_colorspace colorspace; > - bool horizontal_bar_valid; > - bool vertical_bar_valid; > enum hdmi_scan_mode scan_mode; > enum hdmi_colorimetry colorimetry; > enum hdmi_picture_aspect picture_aspect; > -- = > 1.8.3.1 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC