linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helen Koike <helen.koike@collabora.com>
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	[thread overview]
Message-ID: <20210114180149.1755892-3-helen.koike@collabora.com> (raw)
In-Reply-To: <20210114180149.1755892-1-helen.koike@collabora.com>

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 <helen.koike@collabora.com>

---

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


  parent reply	other threads:[~2021-01-14 18:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 18:01 [PATCH 0/3] v4l2 framework minor improvements Helen Koike
2021-01-14 18:01 ` [PATCH 1/3] media: v4l2-ioctl: print capabilities in v4l_print_create_buffers() Helen Koike
2021-01-14 18:01 ` Helen Koike [this message]
2021-01-15 13:19   ` [PATCH 2/3] media: videodev2.h: clarify v4l2_pix_format_mplane.sizeimage docs when to set to zero Jacopo Mondi
2021-01-16 23:21   ` Sakari Ailus
2021-01-25  9:31   ` Hans Verkuil
2021-01-25 15:02     ` Helen Koike
2021-01-14 18:01 ` [PATCH 3/3] media: videobuf2-v4l2: remove redundant error test Helen Koike
2021-01-16 23:22   ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210114180149.1755892-3-helen.koike@collabora.com \
    --to=helen.koike@collabora.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).