From patchwork Mon Jan 8 18:14:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10150265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2480060210 for ; Mon, 8 Jan 2018 18:14:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 382F928389 for ; Mon, 8 Jan 2018 18:14:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CC1C2889C; Mon, 8 Jan 2018 18:14:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, URIBL_GREY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E065728389 for ; Mon, 8 Jan 2018 18:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755035AbeAHSOG (ORCPT ); Mon, 8 Jan 2018 13:14:06 -0500 Received: from o1678950229.outbound-mail.sendgrid.net ([167.89.50.229]:14385 "EHLO o1678950229.outbound-mail.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754896AbeAHSOF (ORCPT ); Mon, 8 Jan 2018 13:14:05 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:cc:subject:mime-version:content-type:content-transfer-encoding; s=smtpapi; bh=bTwLVv7/f8NTnJcNbEflCZwzxGE=; b=RaZpiM4WBylQ7w0wsu TbPcA2eI/TMeu8PQk6pW5K3Rz9hKQgl+4OCuXGDrW2qKvJP6L9G0cXwVRkPYLg3s wnfpDGw0XJ/omwljIDR3goacfqUD5tFY3qvsAr+vatoshph2wEDtjtwNy6Ni37Fi Uv/vbxKtZjsyGfvr+Da2GA+ZM= Received: by filter0022p3iad2.sendgrid.net with SMTP id filter0022p3iad2-22704-5A53B4EC-29 2018-01-08 18:14:04.582011744 +0000 UTC Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by ismtpd0002p1lon1.sendgrid.net (SG) with ESMTP id wev5wX2YSXqcIUIR-vltbg Mon, 08 Jan 2018 18:14:04.490 +0000 (UTC) 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 v2] media: i2c: adv748x: fix HDMI field heights Date: Mon, 08 Jan 2018 18:14:04 +0000 (UTC) Message-Id: <1515435242-22956-1-git-send-email-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 content-transfer-encoding: quoted-printable X-SG-EID: Tfq0zQjjJFmIKL8hyrOr6KT7wyjsEm7XZZskPfLyBPKtx0zhTJMxrwLiqFipej9LFc9h3766wFbMCu SrWzV4fzDZgWpT/z+bVwYdCxPCuNp6W9/+4Lt6LMWODiAZIg6ii+mRRsdv/ybEPpXUdTiSPZxNt79l CqcsqNDRJTppBQRhrtWSsdq5Y2LXgPfRue1aHakNV99TTi+l7JG4MtmMH2lpXJzCrmhwokPYnQS9Qy NgowJlMtl+3GMWf0nCp1Ym Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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") Reviewed-by: Niklas Söderlund Signed-off-by: Kieran Bingham Reviewed-by: Hans Verkuil --- v2: - switch conditional to check the fmt->field, removing the need for the comment. drivers/media/i2c/adv748x/adv748x-hdmi.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c index 4da4253553fc..10d229a4f088 100644 --- a/drivers/media/i2c/adv748x/adv748x-hdmi.c +++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c @@ -105,6 +105,9 @@ static void adv748x_hdmi_fill_format(struct adv748x_hdmi *hdmi, fmt->width = hdmi->timings.bt.width; fmt->height = hdmi->timings.bt.height; + + if (fmt->field == V4L2_FIELD_ALTERNATE) + fmt->height /= 2; } static void adv748x_fill_optional_dv_timings(struct v4l2_dv_timings *timings)