Re: [PATCH v4 1/2] media: v4l2: Make sure all drivers set _MPLANE caps in vdev->device_caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/16/19 14:03, Boris Brezillon wrote:
> This is needed if we want the core to be able to check _MPLANE support
> without having to call the ->vdioc_querycap() hook.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> ---
> Changes in v4:
> - Add a hack in fimc-lite and fimc-isp-video ->querycap()
>   implementation to avoid reporting _MPLANE caps as userspace is not
>   ready for that
 

> diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c
> index bb35a2017f21..0fb474b608ba 100644
> --- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
> +++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
> @@ -349,7 +349,15 @@ static int isp_video_querycap(struct file *file, void *priv,
>  {
>  	struct fimc_isp *isp = video_drvdata(file);
>  
> -	__fimc_vidioc_querycap(&isp->pdev->dev, cap, V4L2_CAP_STREAMING);
> +	__fimc_vidioc_querycap(&isp->pdev->dev, cap);
> +
> +	/*
> +	 * FIXME: Userspace does not expect V4L2_CAP_VIDEO_CAPTURE_MPLANE to
> +	 * be set when calling ioctl(QUERYCAP) but we need to set this bit
> +	 * in vdev->device_caps to let the v4l2 core do some consistency check.
> +	 * Let's clear it here until we find a better solution.
> +	 */
> +	cap->device_caps &= ~V4L2_CAP_VIDEO_CAPTURE_MPLANE;

If the common convention is that we set these caps then I don't see a reason
why we couldn't drop this hack, and in fimc-lite as well.
The chances that leaving these caps raised are not greater than zero on systems
where this driver could be used I'd say.
Otherwise the patches look good to me.

Thanks,
Sylwester



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux