Re: [PATCH] media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_API

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

 



On Fri, Nov 10, 2023 at 09:53:00AM +0100, Hans Verkuil wrote:
> This config option was added during the development of the Request API
> to make it easy to disable it.
> 
> The Request API is now stable so it is time to drop this option altogether.

Less config options is a good idea.

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> ---
> diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
> index c7a54d82a55e..9295ded50bc3 100644
> --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
> +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
> @@ -685,10 +685,8 @@ static void fill_buf_caps(struct vb2_queue *q, u32 *caps)
>  		*caps |= V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF;
>  	if (q->allow_cache_hints && q->io_modes & VB2_MMAP)
>  		*caps |= V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS;
> -#ifdef CONFIG_MEDIA_CONTROLLER_REQUEST_API
>  	if (q->supports_requests)
>  		*caps |= V4L2_BUF_CAP_SUPPORTS_REQUESTS;
> -#endif
>  }
> 
>  static void validate_memory_flags(struct vb2_queue *q,
> diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
> index 375b09612981..c82b07d2ef36 100644
> --- a/drivers/media/mc/Kconfig
> +++ b/drivers/media/mc/Kconfig
> @@ -11,10 +11,3 @@ config MEDIA_CONTROLLER_DVB
>  	  Enable the media controller API support for DVB.
> 
>  	  This is currently experimental.
> -
> -config MEDIA_CONTROLLER_REQUEST_API
> -	bool
> -	depends on MEDIA_CONTROLLER
> -	help
> -	  This option enables the Request API for the Media controller and V4L2
> -	  interfaces. It is currently needed by a few stateless codec drivers.
> diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
> index 8cee956e38d4..c0dd4ae57227 100644
> --- a/drivers/media/mc/mc-device.c
> +++ b/drivers/media/mc/mc-device.c
> @@ -372,16 +372,12 @@ static long media_device_get_topology(struct media_device *mdev, void *arg)
> 
>  static long media_device_request_alloc(struct media_device *mdev, void *arg)
>  {
> -#ifdef CONFIG_MEDIA_CONTROLLER_REQUEST_API
>  	int *alloc_fd = arg;
> 
>  	if (!mdev->ops || !mdev->ops->req_validate || !mdev->ops->req_queue)
>  		return -ENOTTY;
> 
>  	return media_request_alloc(mdev, alloc_fd);
> -#else
> -	return -ENOTTY;
> -#endif
>  }
> 
>  static long copy_arg_from_user(void *karg, void __user *uarg, unsigned int cmd)
> diff --git a/drivers/media/platform/mediatek/vcodec/Kconfig b/drivers/media/platform/mediatek/vcodec/Kconfig
> index 74b00eb1bc97..bc8292232530 100644
> --- a/drivers/media/platform/mediatek/vcodec/Kconfig
> +++ b/drivers/media/platform/mediatek/vcodec/Kconfig
> @@ -24,7 +24,6 @@ config VIDEO_MEDIATEK_VCODEC
>  	select V4L2_H264
>  	select V4L2_VP9
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	help
>  	  Mediatek video codec driver provides HW capability to
>  	  encode and decode in a range of video formats on MT8173
> diff --git a/drivers/media/platform/nvidia/tegra-vde/Kconfig b/drivers/media/platform/nvidia/tegra-vde/Kconfig
> index f7454823bbbb..2fe13f39c95b 100644
> --- a/drivers/media/platform/nvidia/tegra-vde/Kconfig
> +++ b/drivers/media/platform/nvidia/tegra-vde/Kconfig
> @@ -6,7 +6,6 @@ config VIDEO_TEGRA_VDE
>  	select DMA_SHARED_BUFFER
>  	select IOMMU_IOVA
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	select SRAM
>  	select VIDEOBUF2_DMA_CONTIG
>  	select VIDEOBUF2_DMA_SG
> diff --git a/drivers/media/platform/verisilicon/Kconfig b/drivers/media/platform/verisilicon/Kconfig
> index e65b836b9d78..24b927d8f182 100644
> --- a/drivers/media/platform/verisilicon/Kconfig
> +++ b/drivers/media/platform/verisilicon/Kconfig
> @@ -8,7 +8,6 @@ config VIDEO_HANTRO
>  	depends on V4L_MEM2MEM_DRIVERS
>  	depends on VIDEO_DEV
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	select VIDEOBUF2_DMA_CONTIG
>  	select VIDEOBUF2_VMALLOC
>  	select V4L2_MEM2MEM_DEV
> diff --git a/drivers/media/test-drivers/Kconfig b/drivers/media/test-drivers/Kconfig
> index 459b433e9fae..5a5379524bde 100644
> --- a/drivers/media/test-drivers/Kconfig
> +++ b/drivers/media/test-drivers/Kconfig
> @@ -12,7 +12,6 @@ config VIDEO_VIM2M
>  	select VIDEOBUF2_VMALLOC
>  	select V4L2_MEM2MEM_DEV
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	help
>  	  This is a virtual test device for the memory-to-memory driver
>  	  framework.
> diff --git a/drivers/media/test-drivers/vicodec/Kconfig b/drivers/media/test-drivers/vicodec/Kconfig
> index a7a828eec2a4..4ea0689c3abe 100644
> --- a/drivers/media/test-drivers/vicodec/Kconfig
> +++ b/drivers/media/test-drivers/vicodec/Kconfig
> @@ -5,7 +5,6 @@ config VIDEO_VICODEC
>  	select VIDEOBUF2_VMALLOC
>  	select V4L2_MEM2MEM_DEV
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	help
>  	  Driver for a Virtual Codec
> 
> diff --git a/drivers/media/test-drivers/visl/Kconfig b/drivers/media/test-drivers/visl/Kconfig
> index 7508b904f196..37be9f267224 100644
> --- a/drivers/media/test-drivers/visl/Kconfig
> +++ b/drivers/media/test-drivers/visl/Kconfig
> @@ -7,7 +7,6 @@ config VIDEO_VISL
>  	select VIDEOBUF2_VMALLOC
>  	select V4L2_MEM2MEM_DEV
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	select VIDEO_V4L2_TPG
>  	help
> 
> diff --git a/drivers/media/test-drivers/vivid/Kconfig b/drivers/media/test-drivers/vivid/Kconfig
> index 5b08a5ad291e..ec2e71d76965 100644
> --- a/drivers/media/test-drivers/vivid/Kconfig
> +++ b/drivers/media/test-drivers/vivid/Kconfig
> @@ -10,7 +10,6 @@ config VIDEO_VIVID
>  	select VIDEOBUF2_DMA_CONTIG
>  	select VIDEO_V4L2_TPG
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	help
>  	  Enables a virtual video driver. This driver emulates a webcam,
>  	  TV, S-Video and HDMI capture hardware, including VBI support for
> diff --git a/drivers/staging/media/rkvdec/Kconfig b/drivers/staging/media/rkvdec/Kconfig
> index e963d60cc6ad..5f3bdd848a2c 100644
> --- a/drivers/staging/media/rkvdec/Kconfig
> +++ b/drivers/staging/media/rkvdec/Kconfig
> @@ -4,7 +4,6 @@ config VIDEO_ROCKCHIP_VDEC
>  	depends on ARCH_ROCKCHIP || COMPILE_TEST
>  	depends on VIDEO_DEV
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	select VIDEOBUF2_DMA_CONTIG
>  	select VIDEOBUF2_VMALLOC
>  	select V4L2_MEM2MEM_DEV
> diff --git a/drivers/staging/media/sunxi/cedrus/Kconfig b/drivers/staging/media/sunxi/cedrus/Kconfig
> index 621944f9907a..cb07a343c9c2 100644
> --- a/drivers/staging/media/sunxi/cedrus/Kconfig
> +++ b/drivers/staging/media/sunxi/cedrus/Kconfig
> @@ -6,7 +6,6 @@ config VIDEO_SUNXI_CEDRUS
>  	depends on HAS_DMA
>  	depends on OF
>  	select MEDIA_CONTROLLER
> -	select MEDIA_CONTROLLER_REQUEST_API
>  	select SUNXI_SRAM
>  	select VIDEOBUF2_DMA_CONTIG
>  	select V4L2_MEM2MEM_DEV

-- 
Regards,

Laurent Pinchart




[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