Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754890AbeAHR4i (ORCPT + 1 other); Mon, 8 Jan 2018 12:56:38 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36977 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754833AbeAHR4c (ORCPT ); Mon, 8 Jan 2018 12:56:32 -0500 X-Google-Smtp-Source: ACJfBotiijEdXNMbr48lby8K3uhZP0T/QbMjim+WDtYeOHPDGAHerD/myYbERoAwVgdq6b2RGz6lCw== Date: Mon, 8 Jan 2018 18:56:29 +0100 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: Kieran Bingham Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Hans Verkuil , Kieran Bingham , Mauro Carvalho Chehab , open list Subject: Re: [PATCH] media: i2c: adv748x: fix HDMI field heights Message-ID: <20180108175629.GE23075@bigcity.dyn.berto.se> References: <1515433167-15912-1-git-send-email-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1515433167-15912-1-git-send-email-kieran.bingham@ideasonboard.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Kieran, Thanks for your patch. On 2018-01-08 17:39:30 +0000, Kieran Bingham wrote: > The ADV748x handles interlaced media using V4L2_FIELD_ALTERNATE field > types. The correct specification for the height on the mbus is the > image height, in this instance, the field height. > > The AFE component already correctly adjusts the height on the mbus, but > the HDMI component got left behind. > > Adjust the mbus height to correctly describe the image height of the > fields when processing interlaced video for HDMI pipelines. > > Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") > Signed-off-by: Kieran Bingham > --- > drivers/media/i2c/adv748x/adv748x-hdmi.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c > index 4da4253553fc..0e2f76f3f029 100644 > --- a/drivers/media/i2c/adv748x/adv748x-hdmi.c > +++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c > @@ -105,6 +105,10 @@ static void adv748x_hdmi_fill_format(struct adv748x_hdmi *hdmi, > > fmt->width = hdmi->timings.bt.width; > fmt->height = hdmi->timings.bt.height; > + > + /* Propagate field height on the mbus for FIELD_ALTERNATE fmts */ > + if (hdmi->timings.bt.interlaced) if (V4L2_FIELD_HAS_T_OR_B(fmt->field)) Nit-picking but I would use the field here (which is set just above this in the same function) as it makes it more clear why the format is cut in half. I looked at the documentation for bt.interlaced and I'm not sure if it would be set to true for INTERLACED field formats when the height should not be halved? In this case it do not matter as fmt->field = hdmi->timings.bt.interlaced ? V4L2_FIELD_ALTERNATE : V4L2_FIELD_NONE; So I leave this up to you and feel free to add in either case. Reviewed-by: Niklas S?derlund > + fmt->height /= 2; > } > > static void adv748x_fill_optional_dv_timings(struct v4l2_dv_timings *timings) > -- > 2.7.4 > -- Regards, Niklas S?derlund