Keep MEDIA_PAD_FL_INTERNAL for kernel only, for now
Subsystems (2)
Sakari Ailus
maintainerv2 cover Keep MEDIA_PAD_FL_INTERNAL for kernel only, for now
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.
since v1:
- Improve grammar in the commit message of the 1st patch
- Add TODO comments to the maxim-serdes driver about INTERNAL pads.
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 | 9 +++++++-- drivers/media/i2c/maxim-serdes/max_ser.c | 9 +++++++-- include/uapi/linux/media.h | 6 ++++++ 3 files changed, 20 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.3
Sakari Ailus
maintainerPATCH v2 1/2 media: mc: Keep INTERNAL pad flags just for the kernel, for now
Do not expose INTERNAL pads on UAPI as neither the documentation nor v4l2-compliance changes to support MEDIA_PAD_FL_INTERNAL pads have been merged yet.
--- include/uapi/linux/media.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/uapi/linux/media.h +6 -0
@@ -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 +* are merged. +*/ #define MEDIA_PAD_FL_INTERNAL (1U << 3) +#endif /* __KERNEL__ */ struct media_pad_desc {__u32 entity;/* entity ID */
Signature · 1 line
2.47.3
Sakari Ailus
maintainerPATCH v2 2/2 media: maxim-serdes: Disable test pattern generator for now
In reply to Sakari AilusDisable the test pattern generator that uses the INTERNAL pad flags for now.
--- drivers/media/i2c/maxim-serdes/max_des.c | 9 +++++++-- drivers/media/i2c/maxim-serdes/max_ser.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/media/i2c/maxim-serdes/max_des.c +7 -2
@@ -137,8 +137,13 @@ 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; +/* +* 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); +*/ }static struct max_des_phy *max_des_pad_to_phy (struct max_des *des,u32 pad)
drivers/media/i2c/maxim-serdes/max_ser.c +7 -2
@@ -90,8 +90,13 @@ 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 ; +/* +* TODO: once MEDIA_PAD_FL_INTERNAL is enabled in the uAPI we +* can add the TPG pad: +* return ser->ops->num_phys + MAX_SER_NUM_LINKS + +* (ser->ops->set_tpg ? 1 : 0); +*/ }static struct max_ser_phy *max_ser_pad_to_phy (struct max_ser *ser,u32 pad)
Signature · 1 line
2.47.3