[PATCH v6 1/9] media: mc-entity: Store parsed V4L2 fwnode endpoint in media_pad

Frank.Li at oss.nxp.com Frank.Li at oss.nxp.com
Wed Jun 24 13:37:48 PDT 2026


From: Frank Li <Frank.Li at nxp.com>

Each media pad is associated with a firmware node endpoint. Capture the
parsed V4L2 fwnode endpoint information in struct media_pad so it can be
reused by consumers.

This avoids reparsing firmware node endpoint data every time the endpoint
configuration is needed, reduces duplicate code, and provides a common
place to store endpoint properties associated with a pad.

Signed-off-by: Frank Li <Frank.Li at nxp.com>
---
Assume 1 to 1 map between dt's endpoint to medie pad.
Change in v6
- new patch
---
 include/media/media-entity.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index d9b72cd87d524..4a3785cd9f370 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -20,6 +20,8 @@
 #include <linux/minmax.h>
 #include <linux/types.h>
 
+#include <media/v4l2-fwnode.h>
+
 /* Enums used internally at the media controller to represent graphs */
 
 /**
@@ -230,6 +232,7 @@ enum media_pad_signal_type {
  * @flags:	Pad flags, as defined in
  *		:ref:`include/uapi/linux/media.h <media_header>`
  *		(seek for ``MEDIA_PAD_FL_*``)
+ * @vep:	associated fwnode endpoint information
  * @pipe:	Pipeline this pad belongs to. Use media_entity_pipeline() to
  *		access this field.
  */
@@ -240,7 +243,7 @@ struct media_pad {
 	u16 num_links;
 	enum media_pad_signal_type sig_type;
 	unsigned long flags;
-
+	struct v4l2_fwnode_endpoint vep;
 	/*
 	 * The fields below are private, and should only be accessed via
 	 * appropriate functions.

-- 
2.43.0




More information about the linux-arm-kernel mailing list