diff options
Diffstat (limited to 'drivers/media/platform')
74 files changed, 3028 insertions, 1759 deletions
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 4acbed189644..011c1c2fcf19 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -6,7 +6,7 @@ menuconfig V4L_PLATFORM_DRIVERS bool "V4L platform devices" depends on MEDIA_CAMERA_SUPPORT default n - ---help--- + help Say Y here to enable support for platform-specific V4L drivers. if V4L_PLATFORM_DRIVERS @@ -55,7 +55,7 @@ config VIDEO_VIU depends on VIDEO_V4L2 && (PPC_MPC512x || COMPILE_TEST) && I2C select VIDEOBUF_DMA_CONTIG default y - ---help--- + help Support for Freescale VIU video driver. This device captures video data, or overlays video on DIU frame buffer. @@ -80,13 +80,13 @@ config VIDEO_OMAP3 select VIDEOBUF2_DMA_CONTIG select MFD_SYSCON select V4L2_FWNODE - ---help--- + help Driver for an OMAP 3 camera controller. config VIDEO_OMAP3_DEBUG bool "OMAP 3 Camera debug messages" depends on VIDEO_OMAP3 - ---help--- + help Enable debug messages on OMAP 3 camera controller driver. config VIDEO_PXA27x @@ -96,7 +96,7 @@ config VIDEO_PXA27x select VIDEOBUF2_DMA_SG select SG_SPLIT select V4L2_FWNODE - ---help--- + help This is a v4l2 driver for the PXA27x Quick Capture Interface config VIDEO_QCOM_CAMSS @@ -112,7 +112,7 @@ config VIDEO_S3C_CAMIF depends on PM depends on ARCH_S3C64XX || PLAT_S3C24XX || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG - ---help--- + help This is a v4l2 driver for s3c24xx and s3c64xx SoC series camera host interface (CAMIF). @@ -125,7 +125,7 @@ config VIDEO_STM32_DCMI depends on ARCH_STM32 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_FWNODE - ---help--- + help This module makes the STM32 Digital Camera Memory Interface (DCMI) available as a v4l2 device. @@ -138,7 +138,7 @@ config VIDEO_RENESAS_CEU depends on ARCH_SHMOBILE || ARCH_R7S72100 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_FWNODE - ---help--- + help This is a v4l2 driver for the Renesas CEU Interface source "drivers/media/platform/exynos4-is/Kconfig" @@ -155,7 +155,7 @@ config VIDEO_TI_CAL select VIDEOBUF2_DMA_CONTIG select V4L2_FWNODE default n - ---help--- + help Support for the TI CAL (Camera Adaptation Layer) block found on DRA72X SoC. In TI Technical Reference Manual this module is referred as @@ -168,7 +168,7 @@ menuconfig V4L_MEM2MEM_DRIVERS depends on VIDEO_V4L2 depends on MEDIA_CAMERA_SUPPORT default n - ---help--- + help Say Y here to enable selecting drivers for V4L devices that use system memory for both source and destination buffers, as opposed to capture and output drivers, which use memory buffers for just @@ -184,7 +184,7 @@ config VIDEO_CODA select VIDEOBUF2_VMALLOC select V4L2_MEM2MEM_DEV select GENERIC_ALLOCATOR - ---help--- + help Coda is a range of video codec IPs that supports H.264, MPEG-4, and other video formats. @@ -207,7 +207,7 @@ config VIDEO_MEDIATEK_JPEG depends on ARCH_MEDIATEK || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV - ---help--- + help Mediatek jpeg codec driver provides HW capability to decode JPEG format @@ -218,7 +218,7 @@ config VIDEO_MEDIATEK_VPU tristate "Mediatek Video Processor Unit" depends on VIDEO_DEV && VIDEO_V4L2 depends on ARCH_MEDIATEK || COMPILE_TEST - ---help--- + help This driver provides downloading VPU firmware and communicating with VPU. This driver for hw video codec embedded in Mediatek's MT8173 SOCs. It is able @@ -236,7 +236,7 @@ config VIDEO_MEDIATEK_MDP select V4L2_MEM2MEM_DEV select VIDEO_MEDIATEK_VPU default n - ---help--- + help It is a v4l2 driver and present in Mediatek MT8173 SoCs. The driver supports for scaling and color space conversion. @@ -252,7 +252,7 @@ config VIDEO_MEDIATEK_VCODEC select V4L2_MEM2MEM_DEV select VIDEO_MEDIATEK_VPU default n - ---help--- + help Mediatek video codec driver provides HW capability to encode and decode in a range of video formats This driver rely on VPU driver to communicate with VPU. @@ -276,7 +276,7 @@ config VIDEO_SAMSUNG_S5P_G2D select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV default n - ---help--- + help This is a v4l2 driver for Samsung S5P and EXYNOS4 G2D 2d graphics accelerator. @@ -286,7 +286,7 @@ config VIDEO_SAMSUNG_S5P_JPEG depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV - ---help--- + help This is a v4l2 driver for Samsung S5P, EXYNOS3250 and EXYNOS4 JPEG codec @@ -407,7 +407,7 @@ config VIDEO_RENESAS_FDP1 depends on (!ARM64 && !VIDEO_RENESAS_FCP) || VIDEO_RENESAS_FCP select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV - ---help--- + help This is a V4L2 driver for the Renesas Fine Display Processor providing colour space conversion, and de-interlacing features. @@ -420,7 +420,7 @@ config VIDEO_RENESAS_JPU depends on ARCH_RENESAS || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV - ---help--- + help This is a V4L2 driver for the Renesas JPEG Processing Unit. To compile this driver as a module, choose M here: the module @@ -430,7 +430,7 @@ config VIDEO_RENESAS_FCP tristate "Renesas Frame Compression Processor" depends on ARCH_RENESAS || COMPILE_TEST depends on OF - ---help--- + help This is a driver for the Renesas Frame Compression Processor (FCP). The FCP is a companion module of video processing modules in the Renesas R-Car Gen3 SoCs. It handles memory access for the codec, @@ -446,7 +446,7 @@ config VIDEO_RENESAS_VSP1 depends on (!ARM64 && !VIDEO_RENESAS_FCP) || VIDEO_RENESAS_FCP select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_VMALLOC - ---help--- + help This is a V4L2 driver for the Renesas VSP1 video processing engine. To compile this driver as a module, choose M here: the module @@ -459,7 +459,7 @@ config VIDEO_ROCKCHIP_RGA select VIDEOBUF2_DMA_SG select V4L2_MEM2MEM_DEV default n - ---help--- + help This is a v4l2 driver for Rockchip SOC RGA 2d graphics accelerator. Rockchip RGA is a separate 2D raster graphic acceleration unit. It accelerates 2D graphics operations, such as point/line drawing, @@ -477,14 +477,14 @@ config VIDEO_TI_VPE select VIDEO_TI_SC select VIDEO_TI_CSC default n - ---help--- + help Support for the TI VPE(Video Processing Engine) block found on DRA7XX SoC. config VIDEO_TI_VPE_DEBUG bool "VPE debug messages" depends on VIDEO_TI_VPE - ---help--- + help Enable debug messages on VPE driver. config VIDEO_QCOM_VENUS @@ -495,7 +495,7 @@ config VIDEO_QCOM_VENUS select QCOM_SCM if ARCH_QCOM select VIDEOBUF2_DMA_SG select V4L2_MEM2MEM_DEV - ---help--- + help This is a V4L2 driver for Qualcomm Venus video accelerator hardware. It accelerates encoding and decoding operations on various Qualcomm SoCs. @@ -530,7 +530,7 @@ config VIDEO_VIM2M select VIDEOBUF2_VMALLOC select V4L2_MEM2MEM_DEV default n - ---help--- + help This is a virtual test device for the memory-to-memory driver framework. @@ -542,7 +542,7 @@ menuconfig DVB_PLATFORM_DRIVERS bool "DVB platform devices" depends on MEDIA_DIGITAL_TV_SUPPORT default n - ---help--- + help Say Y here to enable support for platform-specific Digital TV drivers. if DVB_PLATFORM_DRIVERS @@ -562,7 +562,7 @@ config VIDEO_CROS_EC_CEC select CEC_NOTIFIER select CHROME_PLATFORMS select CROS_EC_PROTO - ---help--- + help If you say yes here you will get support for the ChromeOS Embedded Controller's CEC. The CEC bus is present in the HDMI connector and enables communication @@ -573,18 +573,34 @@ config VIDEO_MESON_AO_CEC depends on ARCH_MESON || COMPILE_TEST select CEC_CORE select CEC_NOTIFIER - ---help--- + help This is a driver for Amlogic Meson SoCs AO CEC interface. It uses the generic CEC framework interface. CEC bus is present in the HDMI connector and enables communication +config VIDEO_MESON_G12A_AO_CEC + tristate "Amlogic Meson G12A AO CEC driver" + depends on ARCH_MESON || COMPILE_TEST + depends on COMMON_CLK && OF + select REGMAP + select REGMAP_MMIO + select CEC_CORE + select CEC_NOTIFIER + ---help--- + This is a driver for Amlogic Meson G12A SoCs AO CEC interface. + This driver if for the new AO-CEC module found in G12A SoCs, + usually named AO_CEC_B in documentation. + It uses the generic CEC framework interface. + CEC bus is present in the HDMI connector and enables communication + between compatible devices. + config CEC_GPIO tristate "Generic GPIO-based CEC driver" depends on PREEMPT || COMPILE_TEST select CEC_CORE select CEC_PIN select GPIOLIB - ---help--- + help This is a generic GPIO-based CEC driver. The CEC bus is present in the HDMI connector and enables communication between compatible devices. @@ -594,7 +610,7 @@ config VIDEO_SAMSUNG_S5P_CEC depends on ARCH_EXYNOS || COMPILE_TEST select CEC_CORE select CEC_NOTIFIER - ---help--- + help This is a driver for Samsung S5P HDMI CEC interface. It uses the generic CEC framework interface. CEC bus is present in the HDMI connector and enables communication @@ -605,7 +621,7 @@ config VIDEO_STI_HDMI_CEC depends on ARCH_STI || COMPILE_TEST select CEC_CORE select CEC_NOTIFIER - ---help--- + help This is a driver for STIH4xx HDMI CEC interface. It uses the generic CEC framework interface. CEC bus is present in the HDMI connector and enables communication @@ -617,7 +633,7 @@ config VIDEO_STM32_HDMI_CEC select REGMAP select REGMAP_MMIO select CEC_CORE - ---help--- + help This is a driver for STM32 interface. It uses the generic CEC framework interface. CEC bus is present in the HDMI connector and enables communication @@ -628,7 +644,7 @@ config VIDEO_TEGRA_HDMI_CEC depends on ARCH_TEGRA || COMPILE_TEST select CEC_CORE select CEC_NOTIFIER - ---help--- + help This is a driver for the Tegra HDMI CEC interface. It uses the generic CEC framework interface. The CEC bus is present in the HDMI connector and enables communication @@ -649,7 +665,7 @@ config VIDEO_SECO_CEC config VIDEO_SECO_RC bool "SECO Boards IR RC5 support" depends on VIDEO_SECO_CEC - depends on RC_CORE + depends on RC_CORE=y || RC_CORE = VIDEO_SECO_CEC help If you say yes here you will get support for the SECO Boards Consumer-IR in seco-cec driver. @@ -662,7 +678,7 @@ menuconfig SDR_PLATFORM_DRIVERS bool "SDR platform devices" depends on MEDIA_SDR_SUPPORT default n - ---help--- + help Say Y here to enable support for platform-specific SDR Drivers. if SDR_PLATFORM_DRIVERS @@ -672,7 +688,7 @@ config VIDEO_RCAR_DRIF depends on VIDEO_V4L2 depends on ARCH_RENESAS || COMPILE_TEST select VIDEOBUF2_VMALLOC - ---help--- + help Say Y if you want to enable R-Car Gen3 DRIF support. DRIF is Digital Radio Interface that interfaces with an RF front end chip. It is a receiver of digital data which uses DMA to transfer received data to diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 5c17624aaade..fe7b937eb5f2 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -1540,7 +1540,7 @@ static int vpfe_enum_fmt(struct file *file, void *priv, if (!fmt) return -EINVAL; - strncpy(f->description, fmt->name, sizeof(f->description) - 1); + strscpy(f->description, fmt->name, sizeof(f->description)); f->pixelformat = fmt->fourcc; f->type = vpfe->fmt.type; diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c index 692e08ef38c0..8144fe36ad48 100644 --- a/drivers/media/platform/aspeed-video.c +++ b/drivers/media/platform/aspeed-video.c @@ -14,7 +14,6 @@ #include <linux/of_irq.h> #include <linux/of_reserved_mem.h> #include <linux/platform_device.h> -#include <linux/reset.h> #include <linux/sched.h> #include <linux/spinlock.h> #include <linux/string.h> @@ -208,7 +207,6 @@ struct aspeed_video { void __iomem *base; struct clk *eclk; struct clk *vclk; - struct reset_control *rst; struct device *dev; struct v4l2_ctrl_handler ctrl_handler; @@ -483,19 +481,10 @@ static void aspeed_video_enable_mode_detect(struct aspeed_video *video) aspeed_video_update(video, VE_SEQ_CTRL, 0, VE_SEQ_CTRL_TRIG_MODE_DET); } -static void aspeed_video_reset(struct aspeed_video *video) -{ - /* Reset the engine */ - reset_control_assert(video->rst); - - /* Don't usleep here; function may be called in interrupt context */ - udelay(100); - reset_control_deassert(video->rst); -} - static void aspeed_video_off(struct aspeed_video *video) { - aspeed_video_reset(video); + /* Disable interrupts */ + aspeed_video_write(video, VE_INTERRUPT_CTRL, 0); /* Turn off the relevant clocks */ clk_disable_unprepare(video->vclk); @@ -507,8 +496,6 @@ static void aspeed_video_on(struct aspeed_video *video) /* Turn on the relevant clocks */ clk_prepare_enable(video->eclk); clk_prepare_enable(video->vclk); - - aspeed_video_reset(video); } static void aspeed_video_bufs_done(struct aspeed_video *video, @@ -1464,7 +1451,9 @@ static void aspeed_video_stop_streaming(struct vb2_queue *q) * Need to force stop any DMA and try and get HW into a good * state for future calls to start streaming again. */ - aspeed_video_reset(video); + aspeed_video_off(video); + aspeed_video_on(video); + aspeed_video_init_regs(video); aspeed_video_get_resolution(video); @@ -1619,17 +1608,7 @@ static int aspeed_video_init(struct aspeed_video *video) return PTR_ERR(video->vclk); } - video->rst = devm_reset_control_get_exclusive(dev, NULL); - if (IS_ERR(video->rst)) { - dev_err(dev, "Unable to get VE reset\n"); - return PTR_ERR(video->rst); - } - - rc = of_reserved_mem_device_init(dev); - if (rc) { - dev_err(dev, "Unable to reserve memory\n"); - return rc; - } + of_reserved_mem_device_init(dev); rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); if (rc) { diff --git a/drivers/media/platform/atmel/Kconfig b/drivers/media/platform/atmel/Kconfig index a211ef20f77e..c3f6a47cdc0e 100644 --- a/drivers/media/platform/atmel/Kconfig +++ b/drivers/media/platform/atmel/Kconfig @@ -15,6 +15,6 @@ config VIDEO_ATMEL_ISI depends on ARCH_AT91 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_FWNODE - ---help--- + help This module makes the ATMEL Image Sensor Interface available as a v4l2 device. diff --git a/drivers/media/platform/atmel/atmel-isc-regs.h b/drivers/media/platform/atmel/atmel-isc-regs.h index 2aadc19235ea..d730693f299c 100644 --- a/drivers/media/platform/atmel/atmel-isc-regs.h +++ b/drivers/media/platform/atmel/atmel-isc-regs.h @@ -24,6 +24,8 @@ #define ISC_PFE_CFG0_HPOL_LOW BIT(0) #define ISC_PFE_CFG0_VPOL_LOW BIT(1) #define ISC_PFE_CFG0_PPOL_LOW BIT(2) +#define ISC_PFE_CFG0_CCIR656 BIT(9) +#define ISC_PFE_CFG0_CCIR_CRC BIT(10) #define ISC_PFE_CFG0_MODE_PROGRESSIVE (0x0 << 4) #define ISC_PFE_CFG0_MODE_MASK GENMASK(6, 4) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index 50178968b8a6..4bba9da206e4 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -89,35 +89,25 @@ struct isc_subdev_entity { struct list_head list; }; -/* Indicate the format is generated by the sensor */ -#define FMT_FLAG_FROM_SENSOR BIT(0) -/* Indicate the format is produced by ISC itself */ -#define FMT_FLAG_FROM_CONTROLLER BIT(1) -/* Indicate a Raw Bayer format */ -#define FMT_FLAG_RAW_FORMAT BIT(2) - -#define FMT_FLAG_RAW_FROM_SENSOR (FMT_FLAG_FROM_SENSOR | \ - FMT_FLAG_RAW_FORMAT) - /* * struct isc_format - ISC media bus format information + This struct |