diff mbox series

[2/5] media-device: Add a complete flag to struct media_device

Message ID 20200610230541.1603067-3-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New, archived
Headers show
Series media-device: Report if graph is complete | expand

Commit Message

Niklas Söderlund June 10, 2020, 11:05 p.m. UTC
Add a complete flag to indicate if the media graph is complete or not.
The use-case is for v4l2-async to set the flag when all subdevices are
bound and that the flag be reported to user-space so it can learn when a
graph is completely populated.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 include/media/media-device.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Laurent Pinchart June 11, 2020, 3:13 a.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Thu, Jun 11, 2020 at 01:05:38AM +0200, Niklas Söderlund wrote:
> Add a complete flag to indicate if the media graph is complete or not.
> The use-case is for v4l2-async to set the flag when all subdevices are
> bound and that the flag be reported to user-space so it can learn when a
> graph is completely populated.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  include/media/media-device.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/media/media-device.h b/include/media/media-device.h
> index fa089543072052cf..cd685c3a791c6c04 100644
> --- a/include/media/media-device.h
> +++ b/include/media/media-device.h
> @@ -83,6 +83,7 @@ struct media_device_ops {
>   * @serial:	Device serial number (optional)
>   * @bus_info:	Unique and stable device location identifier
>   * @hw_revision: Hardware device revision
> + * @complete:	Graph completed flag

This requires more documentation too.

>   * @topology_version: Monotonic counter for storing the version of the graph
>   *		topology. Should be incremented each time the topology changes.
>   * @id:		Unique ID used on the last registered graph object
> @@ -151,6 +152,7 @@ struct media_device {
>  	char serial[40];
>  	char bus_info[32];
>  	u32 hw_revision;
> +	bool complete;
>  
>  	u64 topology_version;
>
diff mbox series

Patch

diff --git a/include/media/media-device.h b/include/media/media-device.h
index fa089543072052cf..cd685c3a791c6c04 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -83,6 +83,7 @@  struct media_device_ops {
  * @serial:	Device serial number (optional)
  * @bus_info:	Unique and stable device location identifier
  * @hw_revision: Hardware device revision
+ * @complete:	Graph completed flag
  * @topology_version: Monotonic counter for storing the version of the graph
  *		topology. Should be incremented each time the topology changes.
  * @id:		Unique ID used on the last registered graph object
@@ -151,6 +152,7 @@  struct media_device {
 	char serial[40];
 	char bus_info[32];
 	u32 hw_revision;
+	bool complete;
 
 	u64 topology_version;