Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp467652pxb; Thu, 14 Jan 2021 10:08:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJydTODfRqxSQbmUccyC2Cp3WgM2YMpYnYvdSH4UbCWmemeyjgDjr85ZjbEBQ21N3Of8y61k X-Received: by 2002:a17:906:94cf:: with SMTP id d15mr5923055ejy.271.1610647686274; Thu, 14 Jan 2021 10:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610647686; cv=none; d=google.com; s=arc-20160816; b=c9jR/hfd6/9glG6WwddUk1np963s8eZ5kTh9iLFgpk/ziI6QOUZ+aZIQmGaY2yB+T+ b5racgViLPDCPGZ5PgwvvW/pzyuhObLDcYz3VqLXMrTXG7lJuxaxGKnABkIAGgWGepEl xhVDJ1RNafJx9slKWj/V5Yi2It05e6P/F+dmecrpvvLCnwa/xdz7PAJLVz9a8Ky2ZzpN D8D3evvomyEIemGJvhDQYhsq+MAPKMBiLo+zUJ2E6Wd54b8seOR4f5P/DsGL4CHOtqq5 DKQD2Zj7LKl9k1dNHdVaSm+B9gY7VsakLVmtCXEUAzrwldsOY/YnR+YrdVNrNjMzB4j4 YQ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SoUjoOipjPv3/9tQCnMWIlpfdFUpCQAMYvdOAC2EESA=; b=ry4MnpVYrk6TrcyxQ+LuJJ7cXxJ69voFv5YDXBvFmTCRA/EsUXzJi57rZ9Xx8rAtsh Zqtgt9sXG9kb83zNGYIkqoOjp33yr4b069OQdQBVEcDP7uN4aHOzdbGZNfMUaJTEDFN2 /B+5zJy+lGM0BOPsYg3qv0CDYaDgRSLGga/MwbnKLJm5M6i4tgLAS/vLBtvo8SCyj2Y+ oJppHm61zTNW7ICLQA4G0EOxUxo+F/z5Xa0LlO+tmGlvWIhrwF+ZE/fD8Lc8h4xQKXgk TeymSjiP8Axap5texrxuCoWGWIDM5UUsDNaOFAavit4CH6N4LogHorfUXrs3XH8j1w9M WwCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si2932842edq.311.2021.01.14.10.07.41; Thu, 14 Jan 2021 10:08:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729467AbhANSFz (ORCPT + 99 others); Thu, 14 Jan 2021 13:05:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729450AbhANSFv (ORCPT ); Thu, 14 Jan 2021 13:05:51 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABAEFC061795; Thu, 14 Jan 2021 10:05:09 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id AE9681F45C6D From: Helen Koike To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, mchehab@kernel.org, hans.verkuil@cisco.com, kernel@collabora.com, linux-kernel@vger.kernel.org, tfiga@chromium.org Subject: [PATCH 2/3] media: videodev2.h: clarify v4l2_pix_format_mplane.sizeimage docs when to set to zero Date: Thu, 14 Jan 2021 15:01:48 -0300 Message-Id: <20210114180149.1755892-3-helen.koike@collabora.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210114180149.1755892-1-helen.koike@collabora.com> References: <20210114180149.1755892-1-helen.koike@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sizeimage field should be set to zero for unused planes, even when v4l2_pix_format_mplane.num_planes is smaller then the index of planes. Signed-off-by: Helen Koike --- I caught this with v4l2-compliance, which throws an error if we dirty planes, even if invalid, so I would like to make it clear in the docs. --- include/uapi/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 79dbde3bcf8d..d9b7c9177605 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2227,6 +2227,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv { * struct v4l2_plane_pix_format - additional, per-plane format definition * @sizeimage: maximum size in bytes required for data, for which * this plane will be used + * Drivers should be set it zero for unused planes. * @bytesperline: distance in bytes between the leftmost pixels in two * adjacent lines */ -- 2.29.2