* [PATCH 0/2] Keep MEDIA_PAD_FL_INTERNAL for kernel only, for now
@ 2026-10-07 20:41 Sakari Ailus
2026-10-07 20:41 ` [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, " Sakari Ailus
2026-10-07 20:41 ` [PATCH 2/2] media: maxim-serdes: Disable test pattern generator " Sakari Ailus
0 siblings, 2 replies; 7+ messages in thread
From: Sakari Ailus @ 2026-10-07 20:41 UTC (permalink / raw)
To: linux-media
Cc: hans, laurent.pinchart, Prabhakar, Kate Hsuan, Dave Stevenson,
Tommaso Merciai, Benjamin Mugnier, Sylvain Petinot,
Christophe JAILLET, Julien Massot, Naushir Patuck, Yan, Dongcheng,
Stefan Klug, Mirela Rabulea, André Apitzsch,
Heimir Thor Sverrisson, Kieran Bingham, Mehdi Djait,
Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
Hi all,
These two patches limit the visibility of the INTERNAL pad flag to the
kernel as well as disable creating the pads with INTERNAL pad flag so it
won't be enumerable via the MC IOCTLs.
These patches (or later versions of the set) will be merged for 7.4 before
rc1 and reverted once the rest of the metadata series can be merged.
The patches are compile tested only. Review and testing is welcome.
Sakari Ailus (2):
media: mc: Keep INTERNAL pad flags just for the kernel, for now
media: maxim-serdes: Disable test pattern generator for now
drivers/media/i2c/maxim-serdes/max_des.c | 3 +--
drivers/media/i2c/maxim-serdes/max_ser.c | 3 +--
include/uapi/linux/media.h | 6 ++++++
3 files changed, 8 insertions(+), 4 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, for now
2026-10-07 20:41 [PATCH 0/2] Keep MEDIA_PAD_FL_INTERNAL for kernel only, for now Sakari Ailus
@ 2026-10-07 20:41 ` Sakari Ailus
2026-10-07 21:18 ` Laurent Pinchart
2026-10-08 6:52 ` Hans Verkuil
2026-10-07 20:41 ` [PATCH 2/2] media: maxim-serdes: Disable test pattern generator " Sakari Ailus
1 sibling, 2 replies; 7+ messages in thread
From: Sakari Ailus @ 2026-10-07 20:41 UTC (permalink / raw)
To: linux-media
Cc: hans, laurent.pinchart, Prabhakar, Kate Hsuan, Dave Stevenson,
Tommaso Merciai, Benjamin Mugnier, Sylvain Petinot,
Christophe JAILLET, Julien Massot, Naushir Patuck, Yan, Dongcheng,
Stefan Klug, Mirela Rabulea, André Apitzsch,
Heimir Thor Sverrisson, Kieran Bingham, Mehdi Djait,
Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
Do not expose INTERNAL pads on UAPI as the documentation nor
v4l2-compliance changes to support MEDIA_PAD_FL_INTERNAL pads has not yet
been merged.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
include/uapi/linux/media.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 80cfd12a43fc..63e69a517987 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -208,7 +208,13 @@ struct media_entity_desc {
#define MEDIA_PAD_FL_SINK (1U << 0)
#define MEDIA_PAD_FL_SOURCE (1U << 1)
#define MEDIA_PAD_FL_MUST_CONNECT (1U << 2)
+#if defined(__KERNEL__)
+/*
+ * Forgo INTERNAL pads until proper documentation and v4l2-compliance testing is
+ * merged.
+ */
#define MEDIA_PAD_FL_INTERNAL (1U << 3)
+#endif /* __KERNEL__ */
struct media_pad_desc {
__u32 entity; /* entity ID */
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, for now
2026-10-07 20:41 ` [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, " Sakari Ailus
@ 2026-10-07 21:18 ` Laurent Pinchart
2026-10-08 6:52 ` Hans Verkuil
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2026-10-07 21:18 UTC (permalink / raw)
To: Sakari Ailus
Cc: linux-media, hans, Prabhakar, Kate Hsuan, Dave Stevenson,
Tommaso Merciai, Benjamin Mugnier, Sylvain Petinot,
Christophe JAILLET, Julien Massot, Naushir Patuck, Yan, Dongcheng,
Stefan Klug, Mirela Rabulea, André Apitzsch,
Heimir Thor Sverrisson, Kieran Bingham, Mehdi Djait,
Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
On Wed, Oct 07, 2026 at 11:41:34PM +0300, Sakari Ailus wrote:
> Do not expose INTERNAL pads on UAPI as the documentation nor
s/as the/as neither the/
> v4l2-compliance changes to support MEDIA_PAD_FL_INTERNAL pads has not yet
> been merged.
"have been merged yet"
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> include/uapi/linux/media.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
> index 80cfd12a43fc..63e69a517987 100644
> --- a/include/uapi/linux/media.h
> +++ b/include/uapi/linux/media.h
> @@ -208,7 +208,13 @@ struct media_entity_desc {
> #define MEDIA_PAD_FL_SINK (1U << 0)
> #define MEDIA_PAD_FL_SOURCE (1U << 1)
> #define MEDIA_PAD_FL_MUST_CONNECT (1U << 2)
> +#if defined(__KERNEL__)
> +/*
> + * Forgo INTERNAL pads until proper documentation and v4l2-compliance testing is
s/is$/are/
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + * merged.
> + */
> #define MEDIA_PAD_FL_INTERNAL (1U << 3)
> +#endif /* __KERNEL__ */
>
> struct media_pad_desc {
> __u32 entity; /* entity ID */
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, for now
2026-10-07 20:41 ` [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, " Sakari Ailus
2026-10-07 21:18 ` Laurent Pinchart
@ 2026-10-08 6:52 ` Hans Verkuil
1 sibling, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2026-10-08 6:52 UTC (permalink / raw)
To: Sakari Ailus, linux-media
Cc: laurent.pinchart, Prabhakar, Kate Hsuan, Dave Stevenson,
Tommaso Merciai, Benjamin Mugnier, Sylvain Petinot,
Christophe JAILLET, Julien Massot, Naushir Patuck, Yan, Dongcheng,
Stefan Klug, Mirela Rabulea, André Apitzsch,
Heimir Thor Sverrisson, Kieran Bingham, Mehdi Djait,
Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
On 07/10/2026 22:41, Sakari Ailus wrote:
> Do not expose INTERNAL pads on UAPI as the documentation nor
> v4l2-compliance changes to support MEDIA_PAD_FL_INTERNAL pads has not yet
> been merged.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Regards,
Hans
> ---
> include/uapi/linux/media.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
> index 80cfd12a43fc..63e69a517987 100644
> --- a/include/uapi/linux/media.h
> +++ b/include/uapi/linux/media.h
> @@ -208,7 +208,13 @@ struct media_entity_desc {
> #define MEDIA_PAD_FL_SINK (1U << 0)
> #define MEDIA_PAD_FL_SOURCE (1U << 1)
> #define MEDIA_PAD_FL_MUST_CONNECT (1U << 2)
> +#if defined(__KERNEL__)
> +/*
> + * Forgo INTERNAL pads until proper documentation and v4l2-compliance testing is
> + * merged.
> + */
> #define MEDIA_PAD_FL_INTERNAL (1U << 3)
> +#endif /* __KERNEL__ */
>
> struct media_pad_desc {
> __u32 entity; /* entity ID */
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] media: maxim-serdes: Disable test pattern generator for now
2026-10-07 20:41 [PATCH 0/2] Keep MEDIA_PAD_FL_INTERNAL for kernel only, for now Sakari Ailus
2026-10-07 20:41 ` [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, " Sakari Ailus
@ 2026-10-07 20:41 ` Sakari Ailus
2026-10-08 6:58 ` Hans Verkuil
1 sibling, 1 reply; 7+ messages in thread
From: Sakari Ailus @ 2026-10-07 20:41 UTC (permalink / raw)
To: linux-media
Cc: hans, laurent.pinchart, Prabhakar, Kate Hsuan, Dave Stevenson,
Tommaso Merciai, Benjamin Mugnier, Sylvain Petinot,
Christophe JAILLET, Julien Massot, Naushir Patuck, Yan, Dongcheng,
Stefan Klug, Mirela Rabulea, André Apitzsch,
Heimir Thor Sverrisson, Kieran Bingham, Mehdi Djait,
Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
Disable the test pattern generator that uses the INTERNAL pad flags for
now.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/maxim-serdes/max_des.c | 3 +--
drivers/media/i2c/maxim-serdes/max_ser.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/maxim-serdes/max_des.c b/drivers/media/i2c/maxim-serdes/max_des.c
index 1cbe4c3a3233..cb43edf7a9ae 100644
--- a/drivers/media/i2c/maxim-serdes/max_des.c
+++ b/drivers/media/i2c/maxim-serdes/max_des.c
@@ -137,8 +137,7 @@ static inline unsigned int max_des_phy_to_pad(struct max_des *des,
static inline unsigned int max_des_num_pads(struct max_des *des)
{
- return des->info->num_links + des->info->num_phys +
- (des->ops->set_tpg ? 1 : 0);
+ return des->info->num_links + des->info->num_phys;
}
static struct max_des_phy *max_des_pad_to_phy(struct max_des *des, u32 pad)
diff --git a/drivers/media/i2c/maxim-serdes/max_ser.c b/drivers/media/i2c/maxim-serdes/max_ser.c
index e9bb722ea22f..c8dd5c3d352c 100644
--- a/drivers/media/i2c/maxim-serdes/max_ser.c
+++ b/drivers/media/i2c/maxim-serdes/max_ser.c
@@ -90,8 +90,7 @@ static inline unsigned int max_ser_phy_to_pad(struct max_ser *ser,
static inline unsigned int max_ser_num_pads(struct max_ser *ser)
{
- return ser->ops->num_phys + MAX_SER_NUM_LINKS +
- (ser->ops->set_tpg ? 1 : 0);
+ return ser->ops->num_phys + MAX_SER_NUM_LINKS;
}
static struct max_ser_phy *max_ser_pad_to_phy(struct max_ser *ser, u32 pad)
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] media: maxim-serdes: Disable test pattern generator for now
2026-10-07 20:41 ` [PATCH 2/2] media: maxim-serdes: Disable test pattern generator " Sakari Ailus
@ 2026-10-08 6:58 ` Hans Verkuil
2026-10-08 7:51 ` Sakari Ailus
0 siblings, 1 reply; 7+ messages in thread
From: Hans Verkuil @ 2026-10-08 6:58 UTC (permalink / raw)
To: Sakari Ailus, linux-media
Cc: laurent.pinchart, Prabhakar, Kate Hsuan, Dave Stevenson,
Tommaso Merciai, Benjamin Mugnier, Sylvain Petinot,
Christophe JAILLET, Julien Massot, Naushir Patuck, Yan, Dongcheng,
Stefan Klug, Mirela Rabulea, André Apitzsch,
Heimir Thor Sverrisson, Kieran Bingham, Mehdi Djait,
Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
On 07/10/2026 22:41, Sakari Ailus wrote:
> Disable the test pattern generator that uses the INTERNAL pad flags for
> now.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> drivers/media/i2c/maxim-serdes/max_des.c | 3 +--
> drivers/media/i2c/maxim-serdes/max_ser.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/maxim-serdes/max_des.c b/drivers/media/i2c/maxim-serdes/max_des.c
> index 1cbe4c3a3233..cb43edf7a9ae 100644
> --- a/drivers/media/i2c/maxim-serdes/max_des.c
> +++ b/drivers/media/i2c/maxim-serdes/max_des.c
> @@ -137,8 +137,7 @@ static inline unsigned int max_des_phy_to_pad(struct max_des *des,
>
> static inline unsigned int max_des_num_pads(struct max_des *des)
> {
> - return des->info->num_links + des->info->num_phys +
> - (des->ops->set_tpg ? 1 : 0);
> + return des->info->num_links + des->info->num_phys;
I think you need to add a comment here and also in max_ser.c.
E.g. something like this:
static inline unsigned int max_des_num_pads(struct max_des *des)
{
return des->info->num_links + des->info->num_phys;
/*
* TODO: once MEDIA_PAD_FL_INTERNAL is enabled in the uAPI we
* can add the TPG pad:
* return des->info->num_links + des->info->num_phys +
* (des->ops->set_tpg ? 1 : 0);
*/
}
That way it is actually recorded in the source why the tpg pad is currently
not added and what to do to add it back.
Regards,
Hans
> }
>
> static struct max_des_phy *max_des_pad_to_phy(struct max_des *des, u32 pad)
> diff --git a/drivers/media/i2c/maxim-serdes/max_ser.c b/drivers/media/i2c/maxim-serdes/max_ser.c
> index e9bb722ea22f..c8dd5c3d352c 100644
> --- a/drivers/media/i2c/maxim-serdes/max_ser.c
> +++ b/drivers/media/i2c/maxim-serdes/max_ser.c
> @@ -90,8 +90,7 @@ static inline unsigned int max_ser_phy_to_pad(struct max_ser *ser,
>
> static inline unsigned int max_ser_num_pads(struct max_ser *ser)
> {
> - return ser->ops->num_phys + MAX_SER_NUM_LINKS +
> - (ser->ops->set_tpg ? 1 : 0);
> + return ser->ops->num_phys + MAX_SER_NUM_LINKS;
> }
>
> static struct max_ser_phy *max_ser_pad_to_phy(struct max_ser *ser, u32 pad)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] media: maxim-serdes: Disable test pattern generator for now
2026-10-08 6:58 ` Hans Verkuil
@ 2026-10-08 7:51 ` Sakari Ailus
0 siblings, 0 replies; 7+ messages in thread
From: Sakari Ailus @ 2026-10-08 7:51 UTC (permalink / raw)
To: Hans Verkuil
Cc: linux-media, laurent.pinchart, Prabhakar, Kate Hsuan,
Dave Stevenson, Tommaso Merciai, Benjamin Mugnier,
Sylvain Petinot, Christophe JAILLET, Julien Massot,
Naushir Patuck, Yan, Dongcheng, Stefan Klug, Mirela Rabulea,
André Apitzsch, Heimir Thor Sverrisson, Kieran Bingham,
Mehdi Djait, Ricardo Ribalda Delgado, Hans de Goede, Jacopo Mondi,
Tomi Valkeinen, David Plowman, Yu, Ong Hock, Ng, Khai Wen,
Jai Luthra, Rishikesh Donadkar, Mattijs Korpershoek, Antti Laakso,
Dumitru Ceclan, Martin Hecht, Andrian Suciu, Martin Hecht,
Cosmin Tanislav, Vivekananda Dayananda, Quentin Freimanis,
Cory Keitz
Hi Hans,
On Thu, Oct 08, 2026 at 08:58:20AM +0200, Hans Verkuil wrote:
> On 07/10/2026 22:41, Sakari Ailus wrote:
> > Disable the test pattern generator that uses the INTERNAL pad flags for
> > now.
> >
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> > drivers/media/i2c/maxim-serdes/max_des.c | 3 +--
> > drivers/media/i2c/maxim-serdes/max_ser.c | 3 +--
> > 2 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/media/i2c/maxim-serdes/max_des.c b/drivers/media/i2c/maxim-serdes/max_des.c
> > index 1cbe4c3a3233..cb43edf7a9ae 100644
> > --- a/drivers/media/i2c/maxim-serdes/max_des.c
> > +++ b/drivers/media/i2c/maxim-serdes/max_des.c
> > @@ -137,8 +137,7 @@ static inline unsigned int max_des_phy_to_pad(struct max_des *des,
> >
> > static inline unsigned int max_des_num_pads(struct max_des *des)
> > {
> > - return des->info->num_links + des->info->num_phys +
> > - (des->ops->set_tpg ? 1 : 0);
> > + return des->info->num_links + des->info->num_phys;
>
> I think you need to add a comment here and also in max_ser.c.
>
> E.g. something like this:
>
> static inline unsigned int max_des_num_pads(struct max_des *des)
> {
> return des->info->num_links + des->info->num_phys;
> /*
> * TODO: once MEDIA_PAD_FL_INTERNAL is enabled in the uAPI we
> * can add the TPG pad:
> * return des->info->num_links + des->info->num_phys +
> * (des->ops->set_tpg ? 1 : 0);
> */
> }
>
> That way it is actually recorded in the source why the tpg pad is currently
> not added and what to do to add it back.
I'm adding the reverts of the two patches to my metadata series. I can add
a comment here, too, if you wish.
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-08 7:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 20:41 [PATCH 0/2] Keep MEDIA_PAD_FL_INTERNAL for kernel only, for now Sakari Ailus
2026-10-07 20:41 ` [PATCH 1/2] media: mc: Keep INTERNAL pad flags just for the kernel, " Sakari Ailus
2026-10-07 21:18 ` Laurent Pinchart
2026-10-08 6:52 ` Hans Verkuil
2026-10-07 20:41 ` [PATCH 2/2] media: maxim-serdes: Disable test pattern generator " Sakari Ailus
2026-10-08 6:58 ` Hans Verkuil
2026-10-08 7:51 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox