From patchwork Mon Jan 8 17:55:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10150217 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 2FA17601A1 for ; Mon, 8 Jan 2018 17:58:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4081528633 for ; Mon, 8 Jan 2018 17:58:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 356832868B; Mon, 8 Jan 2018 17:58:00 +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 B7EEB28633 for ; Mon, 8 Jan 2018 17:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754623AbeAHR56 (ORCPT ); Mon, 8 Jan 2018 12:57:58 -0500 Received: from o1682455182.outbound-mail.sendgrid.net ([168.245.5.182]:30942 "EHLO o1682455182.outbound-mail.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753960AbeAHR56 (ORCPT ); Mon, 8 Jan 2018 12:57:58 -0500 X-Greylist: delayed 11333 seconds by postgrey-1.27 at vger.kernel.org; Mon, 08 Jan 2018 12:57:57 EST DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:cc:subject; s=smtpapi; bh=PZeXj6DKyDbv6D9H70JtTtC3zlY=; b=ZYIc6HLrjrHCJ71Ba8WBP79uM92Oq8+mAXEVFsAXBXS27+ZalQEYiGF/dRdkYd Lnlb15fCNRYDWZiETFKwd6ZA2dU1rqbdvMD6Z8Qend68T0T/2F0YEyxS3bU8zQ+i nH6AD8tSSKSqwFsWWqk96JU0iETZvZQF2XX44myqzii80= Received: by filter0011p3las1.sendgrid.net with SMTP id filter0011p3las1-19878-5A53B08B-1B 2018-01-08 17:55:23.5086109 +0000 UTC Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by ismtpd0005p1lon1.sendgrid.net (SG) with ESMTP id emslbo5sTPWLmZ1aPI90EA Mon, 08 Jan 2018 17:55:23.086 +0000 (UTC) From: Kieran Bingham To: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, niklas.soderlund@ragnatech.se, sakari.ailus@iki.fi, Hans Verkuil , Kieran Bingham , Kieran Bingham , Mauro Carvalho Chehab , Jonathan Corbet , Archit Taneja , Neil Armstrong , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition Date: Mon, 08 Jan 2018 17:55:23 +0000 (UTC) Message-Id: <1515434106-18747-1-git-send-email-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.7.4 X-SG-EID: Tfq0zQjjJFmIKL8hyrOr6KT7wyjsEm7XZZskPfLyBPJs9RIZec8Hhk4soTh6NKfFrBZYQjcYm7JOJQ B65N7K/+du/JObRl/VXpuB/JgprFz5X+4sYk8Lwr6diK6jzYZEHuw/ce2e1sseJDeyLKZSBbaeE44V iDXIYYZ9qmowilcLnDo0CXI1ARDgSHzH2+2zXNuYFAAyB5+WFnQIkHCY+QMM6j0JnR6r27H67219hY fpfb2m5ykS0xdJfBKD6Fwa 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 v4l2_mbus_fmt width and height corresponds directly with the v4l2_pix_format definitions, yet the differences in documentation make it ambiguous what to do in the event of field heights. Clarify this using the same text as is provided for the v4l2_pix_format which is explicit on the matter, and by matching the terminology of 'image height' rather than the misleading 'frame height'. Signed-off-by: Kieran Bingham Acked-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- v2: - Duplicated explicit text from v4l2_pix_format rather than referencing it. Documentation/media/uapi/v4l/subdev-formats.rst | 8 ++++++-- include/uapi/linux/v4l2-mediabus.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst index b1eea44550e1..9fcabe7f9367 100644 --- a/Documentation/media/uapi/v4l/subdev-formats.rst +++ b/Documentation/media/uapi/v4l/subdev-formats.rst @@ -16,10 +16,14 @@ Media Bus Formats * - __u32 - ``width`` - - Image width, in pixels. + - Image width in pixels. * - __u32 - ``height`` - - Image height, in pixels. + - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``, + ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height + refers to the number of lines in the field, otherwise it refers to + the number of lines in the frame (which is twice the field height + for interlaced formats). * - __u32 - ``code`` - Format code, from enum diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index 6e20de63ec59..123a231001a8 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h @@ -18,8 +18,8 @@ /** * struct v4l2_mbus_framefmt - frame format on the media bus - * @width: frame width - * @height: frame height + * @width: image width + * @height: image height * @code: data format code (from enum v4l2_mbus_pixelcode) * @field: used interlacing type (from enum v4l2_field) * @colorspace: colorspace of the data (from enum v4l2_colorspace)