From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933795AbeAIH3p (ORCPT + 1 other); Tue, 9 Jan 2018 02:29:45 -0500 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:52631 "EHLO lb2-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756583AbeAIH3m (ORCPT ); Tue, 9 Jan 2018 02:29:42 -0500 Subject: Re: [PATCH v2] v4l: doc: Clarify v4l2_mbus_fmt height definition To: Kieran Bingham , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, niklas.soderlund@ragnatech.se, sakari.ailus@iki.fi, Kieran Bingham , Mauro Carvalho Chehab , Jonathan Corbet , Archit Taneja , Neil Armstrong , open list References: <1515434106-18747-1-git-send-email-kieran.bingham@ideasonboard.com> From: Hans Verkuil Message-ID: <33ac89f1-c7c3-041c-c772-a90d8a40a0db@xs4all.nl> Date: Tue, 9 Jan 2018 08:29:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1515434106-18747-1-git-send-email-kieran.bingham@ideasonboard.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfLHGt7lXOGTTSJyyusHYW03jbKTee8Vl62ImDaZq0+A7GUMuxr9/GbJcbfEIqtNtoXvQ87f6ewuaFCF7JqqpBRhkL+a1SdQYjJMbQQEdihkr2AWCLS3o Z9mxFfWYkK/QPBGXLorpHulxtbk8lhbl8ywN9yn1f/w5EbyZCNwMe+/9JphvNMpf8LEyP2szGOi9oG8wtcKNGkhB8PDxA7O/SQ6tCG2VfEP1p4rHs50OXsLn XkF2/CNMPopMupbJhNHzswjwfHEfnuKuTwUMnoTuBsGq9AmNRf8R7UT7khYGDiL+dlOdG/Q4ALwCayIh4wvbHscCgQUn1ePciac+M7udU074IkPzoozgzt/X U8mjDETQCaKptxm40pFKTcGmZLagLQtaCoMqubMCbNhINRRJ473OAxuVnFhFYcz8mLD/gyGjjr3QiP8lLgkh9FeyXd43VPPyg32TXvsTfj1Af5A6utxdd42E 2e4XZEPyJBwLcwhu7FrxG3OX6m/vptzMQWrBelVyE1Yrotyc6XQiXttWlGoiBGsItJ1cxoNYj/ybHiGe13VC8US1/6QGCHnzIk9LyOh/sjPO6b/2Zx3K+Czd z9kr0oKSGWT9WZmmhfHXofj/Qw+fAkm88++egcNIgP7FQmaq9CUcNu40N/6+0Q6hemU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/08/2018 06:55 PM, Kieran Bingham wrote: > 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 Reviewed-by: Hans Verkuil Regards, Hans > --- > 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) >