From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH] drm: Don't generate invalid AVI infoframes for CEA modes Date: Mon, 5 Aug 2013 15:13:07 +0100 Message-ID: <20130805141307.GA31470@strange.config> References: <1375709807-11326-1-git-send-email-damien.lespiau@intel.com> <20130805135406.GU5004@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 82E81E7077 for ; Mon, 5 Aug 2013 07:13:20 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130805135406.GU5004@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Thierry Reding , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Aug 05, 2013 at 04:54:06PM +0300, Ville Syrj=E4l=E4 wrote: > On Mon, Aug 05, 2013 at 02:36:47PM +0100, Damien Lespiau wrote: > > >From CEA-861: > > = > > Data Byte 1, bit A0 indicates whether Active Format Data is present in > > Data Byte 2 bits R3 through R0. A source device shall set A0=3D1 when > > any of the AFD bits are set. > > = > > ie. if we want to set active_aspect, we need to set the > > active_info_valid bit to 1 as well. > > = > > Cc: Thierry Reding > > Signed-off-by: Damien Lespiau > = > Reviewed-by: Ville Syrj=E4l=E4 > = > But why don't we just kill active_info_valid and instead just > check active_aspect in hdmi_avi_infoframe_pack()? Right, so I thought about that, I'd love to have an API that doesn't allow its user to do something wrong. My reflections so far: 1/ I did not want to depend on a fix that was outside of the drm/ directory for people that pull that directory between different kernels, they will end up missing the patch in video/hdmi.c. On the other hand, we could just tell people to sync drivers/video/hdmi.c and include/linux/hdmi.h along with drm/. 2/ I was thinking that killing the _valid bits in the hdmi_avi_infoframe struct would not allow an _unpack() function that can check if the infoframe was valid. Probably thinking too much though... -- = Damien