All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [RFC 1/5] uapi/linux/media.h: add flag field to struct media_device_info
Date: Wed, 18 Mar 2020 22:30:47 +0100	[thread overview]
Message-ID: <20200318213051.3200981-2-niklas.soderlund+renesas@ragnatech.se> (raw)
In-Reply-To: <20200318213051.3200981-1-niklas.soderlund+renesas@ragnatech.se>

Add a flags field to the media_device_info structure by taking one
of the reserved u32 fields. The use-case is to have a way to
(optionally) report to user-space if the media graph is complete or not.

Also define two flags to carry information about if the graph is
complete or not. If neither of the two flags are set the
media device does not support reporting its graph status. The other bits
in the flags field are unused for now, but could be claimed to carry
other type of information in the future.

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

diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 383ac7b7d8f07eca..9b37ed8b41d0d866 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -34,9 +34,16 @@ struct media_device_info {
 	__u32 media_version;
 	__u32 hw_revision;
 	__u32 driver_version;
-	__u32 reserved[31];
+	__u32 flags;
+	__u32 reserved[30];
 };
 
+/*
+ * Graph flags
+ */
+#define MEDIA_INFO_FLAG_INCOMPLETE	(1 << 0)
+#define MEDIA_INFO_FLAG_COMPLETE	(1 << 1)
+
 /*
  * Base number ranges for entity functions
  *
-- 
2.25.1


  reply	other threads:[~2020-03-18 21:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 21:30 [RFC 0/5] media-device: Report if graph is complete or not Niklas Söderlund
2020-03-18 21:30 ` Niklas Söderlund [this message]
2020-03-19  2:37   ` [RFC 1/5] uapi/linux/media.h: add flag field to struct media_device_info Laurent Pinchart
2020-03-19  2:38     ` Laurent Pinchart
2020-06-09 15:16       ` Kieran Bingham
2020-03-18 21:30 ` [RFC 2/5] media-device: Add a graph_complete callback to struct media_device_ops Niklas Söderlund
2020-03-19  2:40   ` Laurent Pinchart
2020-03-18 21:30 ` [RFC 3/5] mc-device.c: If graph completes status is available report it to user-space Niklas Söderlund
2020-06-09 16:12   ` Kieran Bingham
2020-03-18 21:30 ` [RFC 4/5] rcar-vin: Report the completeness of the media graph Niklas Söderlund
2020-03-19  2:41   ` Laurent Pinchart
2020-03-18 21:30 ` [RFC 5/5] rcar-vin: Do not unregister video device when a subdevice is unbound Niklas Söderlund
2020-03-19  2:43   ` Laurent Pinchart

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=20200318213051.3200981-2-niklas.soderlund+renesas@ragnatech.se \
    --to=niklas.soderlund+renesas@ragnatech.se \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.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.