diff mbox series

[v5,10/14] staging: media: starfive: Add V4L2_CAP_IO_MC capability

Message ID 20240709083824.430473-11-changhuang.liang@starfivetech.com (mailing list archive)
State New
Headers show
Series Add ISP 3A for StarFive | expand

Commit Message

Changhuang Liang July 9, 2024, 8:38 a.m. UTC
Add V4L2_CAP_IO_MC capabality for video device. User space can enumerate
formats by mbus code.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
 drivers/staging/media/starfive/camss/stf-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacopo Mondi July 10, 2024, 12:18 p.m. UTC | #1
Hi Changhuang

On Tue, Jul 09, 2024 at 01:38:20AM GMT, Changhuang Liang wrote:
> Add V4L2_CAP_IO_MC capabality for video device. User space can enumerate
> formats by mbus code.
>
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> ---
>  drivers/staging/media/starfive/camss/stf-video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c
> index 2203605ec9c7..8c6c45d8b7a1 100644
> --- a/drivers/staging/media/starfive/camss/stf-video.c
> +++ b/drivers/staging/media/starfive/camss/stf-video.c
> @@ -668,7 +668,7 @@ int stf_video_register(struct stfcamss_video *video,
>  	}
>
>  	vdev->fops = &stf_vid_fops;
> -	vdev->device_caps |= V4L2_CAP_STREAMING;
> +	vdev->device_caps |= V4L2_CAP_STREAMING | V4L2_CAP_IO_MC;

Does this set the flag for the stat node as well ? Not that it hurts
but filtering on mbus code where only METADATA_FIXED is allowed
doesn't make much sense ?

Same for the parameters node

>  	vdev->entity.ops = &stf_media_ops;
>  	vdev->vfl_dir = VFL_DIR_RX;
>  	vdev->release = stf_video_release;
> --
> 2.25.1
>
>
Changhuang Liang July 10, 2024, 1:10 p.m. UTC | #2
Hi Jacopo

Thanks for your comments.

> 
> Hi Changhuang
> 
> On Tue, Jul 09, 2024 at 01:38:20AM GMT, Changhuang Liang wrote:
> > Add V4L2_CAP_IO_MC capabality for video device. User space can
> > enumerate formats by mbus code.
> >
> > Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> > ---
> >  drivers/staging/media/starfive/camss/stf-video.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/starfive/camss/stf-video.c
> > b/drivers/staging/media/starfive/camss/stf-video.c
> > index 2203605ec9c7..8c6c45d8b7a1 100644
> > --- a/drivers/staging/media/starfive/camss/stf-video.c
> > +++ b/drivers/staging/media/starfive/camss/stf-video.c
> > @@ -668,7 +668,7 @@ int stf_video_register(struct stfcamss_video *video,
> >  	}
> >
> >  	vdev->fops = &stf_vid_fops;
> > -	vdev->device_caps |= V4L2_CAP_STREAMING;
> > +	vdev->device_caps |= V4L2_CAP_STREAMING | V4L2_CAP_IO_MC;
> 
> Does this set the flag for the stat node as well ? Not that it hurts but filtering
> on mbus code where only METADATA_FIXED is allowed doesn't make much
> sense ?
> 
> Same for the parameters node
> 

Yes, I will drop this flag from stat node and parameters node.

> >  	vdev->entity.ops = &stf_media_ops;
> >  	vdev->vfl_dir = VFL_DIR_RX;
> >  	vdev->release = stf_video_release;
> > --

Regards,
Changhuang
diff mbox series

Patch

diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c
index 2203605ec9c7..8c6c45d8b7a1 100644
--- a/drivers/staging/media/starfive/camss/stf-video.c
+++ b/drivers/staging/media/starfive/camss/stf-video.c
@@ -668,7 +668,7 @@  int stf_video_register(struct stfcamss_video *video,
 	}
 
 	vdev->fops = &stf_vid_fops;
-	vdev->device_caps |= V4L2_CAP_STREAMING;
+	vdev->device_caps |= V4L2_CAP_STREAMING | V4L2_CAP_IO_MC;
 	vdev->entity.ops = &stf_media_ops;
 	vdev->vfl_dir = VFL_DIR_RX;
 	vdev->release = stf_video_release;