All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Tomasz Figa <tfiga@chromium.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Christoph Hellwig <hch@lst.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCHv6 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT flag
Date: Tue, 28 Sep 2021 13:50:44 +0900	[thread overview]
Message-ID: <YVKfJMpdHXrwYYRn@google.com> (raw)
In-Reply-To: <20210909112430.61243-8-senozhatsky@chromium.org>

On (21/09/09 20:24), Sergey Senozhatsky wrote:
[..]
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 9b7032abb2c7..f118fe7a9f58 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -959,7 +959,8 @@ struct v4l2_requestbuffers {
>  	__u32			type;		/* enum v4l2_buf_type */
>  	__u32			memory;		/* enum v4l2_memory */
>  	__u32			capabilities;
> -	__u32			reserved[1];
> +	__u8			flags;
> +	__u8			reserved[3];
>  };

[..]

>  struct v4l2_create_buffers {
> @@ -2515,7 +2519,8 @@ struct v4l2_create_buffers {
>  	__u32			memory;
>  	struct v4l2_format	format;
>  	__u32			capabilities;
> -	__u32			reserved[7];
> +	__u32			flags;
> +	__u32			reserved[6];
>  };

These UAPI changes break strace compilation (older versions). Up until
Feb 2021 strace had compile time asserts that check-ed sizeof() ->reserved
fields.

  static_assert failed due to requirement
   '(sizeof (((struct v4l2_create_buffers *)0)->reserved)) >= (sizeof (((struct_v4l2_create_buffers *)0)->reserved))'
   "Unexpected struct v4l2_create_buffers.reserved size, please update the decoder"

It seems that strace has dropped those assertions

https://github.com/strace/strace/commit/e5554291d14b852f61385ba5ba59412d133ac99d#diff-d534423e8a79b6957ef4deb7f8bbd3276bf18ede6a82553e8823ee4f840b6e06


But we, probably, need to use unions in UAPI. Any thoughts?

  reply	other threads:[~2021-09-28  4:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 11:24 [PATCHv6 0/8] videobuf2: support new noncontiguous DMA API Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 1/8] videobuf2: rework vb2_mem_ops API Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 2/8] videobuf2: inverse buffer cache_hints flags Sergey Senozhatsky
2021-09-28  6:05   ` Chen-Yu Tsai
2021-09-09 11:24 ` [PATCHv6 3/8] videobuf2: split buffer cache_hints initialisation Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 4/8] videobuf2: move cache_hints handling to allocators Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 5/8] videobuf2: add V4L2_MEMORY_FLAG_NON_COHERENT flag Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 6/8] videobuf2: add queue memory coherency parameter Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT flag Sergey Senozhatsky
2021-09-28  4:50   ` Sergey Senozhatsky [this message]
2021-09-09 11:24 ` [PATCHv6 8/8] videobuf2: handle non-contiguous DMA allocations Sergey Senozhatsky
2021-09-10 10:00 ` [PATCHv6 0/8] videobuf2: support new noncontiguous DMA API Tomasz Figa

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=YVKfJMpdHXrwYYRn@google.com \
    --to=senozhatsky@chromium.org \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=hch@lst.de \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.