Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754408AbeAHRk3 (ORCPT + 1 other); Mon, 8 Jan 2018 12:40:29 -0500 Received: from o1.7nn.fshared.sendgrid.net ([167.89.55.65]:63835 "EHLO o1.7nn.fshared.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753884AbeAHRk0 (ORCPT ); Mon, 8 Jan 2018 12:40:26 -0500 From: Kieran Bingham To: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Hans Verkuil , niklas.soderlund@ragnatech.se, Kieran Bingham , Kieran Bingham , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] media: i2c: adv748x: fix HDMI field heights Date: Mon, 08 Jan 2018 17:39:30 +0000 (UTC) Message-Id: <1515433167-15912-1-git-send-email-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.7.4 X-SG-EID: UsLXQ589HNP4HLBydmD9pgHURQozLYm9XliudupI8YsVZV99C22BGrGAGQP6FfB2J+iKT2K2axKzl6 tTYa6mQxbFiV1Jk5TSSLFATWpgeLCfuE0BJEOW75cLDp62JavPyQlAvLHo/gf+gZ5CC78wpNKX/f2E bzWFl4ws49sm1RhitqMsjeNJuLHTyVcqMZ9QmeXTB0NnRoS8jxeAZs2FrEsbRIzCjouWXulHg2X56C GeQTTv7EieqaoFDVuhplEf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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) + fmt->height /= 2; } static void adv748x_fill_optional_dv_timings(struct v4l2_dv_timings *timings) -- 2.7.4