From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com,
bingbu.cao@intel.com
Subject: Re: [PATCH v8 6/9] media: Documentation: Add a note to set all fields in get_mbus_config op
Date: Fri, 20 Dec 2024 15:29:27 +0200 [thread overview]
Message-ID: <eb0fe9bd-7d1a-4b1a-a127-4e9ce89ede8e@ideasonboard.com> (raw)
In-Reply-To: <20241217215445.901459-7-sakari.ailus@linux.intel.com>
On 17/12/2024 23:54, Sakari Ailus wrote:
> Document that the implementations of the V4L2 sub-device pad operation
> get_mbus_config shall set all fields of the struct to defined values.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> include/media/v4l2-subdev.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
> index 2f2200875b03..abcc879fabb2 100644
> --- a/include/media/v4l2-subdev.h
> +++ b/include/media/v4l2-subdev.h
> @@ -822,7 +822,10 @@ struct v4l2_subdev_state {
> * possible configuration from the remote end, likely calling
> * this operation as close as possible to stream on time. The
> * operation shall fail if the pad index it has been called on
> - * is not valid or in case of unrecoverable failures.
> + * is not valid or in case of unrecoverable failures. The
> + * implementations of the get_mbus_config operation shall set
> + * all the values of struct v4l2_mbus_config to defined
> + * values.
The drivers can't set all fields, as we can add new fields (like you do
in this series). So I assume this means that the drivers should memset()
the struct to 0, and only then set the values it wants?
I think we should have a wrapper for get_mbus_config, which would clear
the struct before calling the op. And the drivers should always use that
wrapper.
Tomi
next prev parent reply other threads:[~2024-12-20 13:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 21:54 [PATCH v8 0/9] Use V4L2 mbus config for conveying link frequency Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 1/9] media: v4l: Support passing media pad argument to v4l2_get_link_freq() Sakari Ailus
2024-12-20 13:09 ` Tomi Valkeinen
2025-01-08 13:14 ` Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 2/9] media: v4l: Support obtaining link frequency via get_mbus_config Sakari Ailus
2024-12-20 12:59 ` Tomi Valkeinen
2025-01-08 13:53 ` Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 3/9] media: Documentation: Update link frequency driver documentation Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 4/9] media: Documentation: tx-rx: Move transmitter control out of CSI-2 part Sakari Ailus
2024-12-20 13:21 ` Tomi Valkeinen
2024-12-17 21:54 ` [PATCH v8 5/9] media: Documentation: Receiver drivers should call v4l2_get_link_freq() Sakari Ailus
2024-12-20 13:22 ` Tomi Valkeinen
2024-12-17 21:54 ` [PATCH v8 6/9] media: Documentation: Add a note to set all fields in get_mbus_config op Sakari Ailus
2024-12-20 13:29 ` Tomi Valkeinen [this message]
2025-01-08 13:42 ` Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 7/9] media: intel/ipu6: Obtain link frequency from the remote subdev pad Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 8/9] media: ivsc: csi: Obtain link frequency from the media pad Sakari Ailus
2024-12-17 21:54 ` [PATCH v8 9/9] media: v4l: Convert the users of v4l2_get_link_freq to call it on a pad Sakari Ailus
2024-12-19 11:03 ` [RESEND PATCH " Sakari Ailus
2024-12-19 12:44 ` Naushir Patuck
2025-01-02 10:49 ` Benjamin Mugnier
2024-12-20 13:19 ` [PATCH " Tomi Valkeinen
2025-01-08 12:50 ` 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=eb0fe9bd-7d1a-4b1a-a127-4e9ce89ede8e@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.com \
--cc=bingbu.cao@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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