From 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:05:51 +0200 Subject: Adding upstream version 5.10.209. Signed-off-by: Daniel Baumann --- drivers/media/platform/omap/Kconfig | 17 + drivers/media/platform/omap/Makefile | 9 + drivers/media/platform/omap/omap_vout.c | 1740 ++++++++++++++++++++++++++ drivers/media/platform/omap/omap_vout_vrfb.c | 419 +++++++ drivers/media/platform/omap/omap_vout_vrfb.h | 40 + drivers/media/platform/omap/omap_voutdef.h | 219 ++++ drivers/media/platform/omap/omap_voutlib.c | 361 ++++++ drivers/media/platform/omap/omap_voutlib.h | 39 + 8 files changed, 2844 insertions(+) create mode 100644 drivers/media/platform/omap/Kconfig create mode 100644 drivers/media/platform/omap/Makefile create mode 100644 drivers/media/platform/omap/omap_vout.c create mode 100644 drivers/media/platform/omap/omap_vout_vrfb.c create mode 100644 drivers/media/platform/omap/omap_vout_vrfb.h create mode 100644 drivers/media/platform/omap/omap_voutdef.h create mode 100644 drivers/media/platform/omap/omap_voutlib.c create mode 100644 drivers/media/platform/omap/omap_voutlib.h (limited to 'drivers/media/platform/omap') diff --git a/drivers/media/platform/omap/Kconfig b/drivers/media/platform/omap/Kconfig new file mode 100644 index 000000000..f73b58932 --- /dev/null +++ b/drivers/media/platform/omap/Kconfig @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0-only +config VIDEO_OMAP2_VOUT_VRFB + bool + default y + depends on VIDEO_OMAP2_VOUT && (OMAP2_VRFB || COMPILE_TEST) + +config VIDEO_OMAP2_VOUT + tristate "OMAP2/OMAP3 V4L2-Display driver" + depends on MMU + depends on FB_OMAP2 || (COMPILE_TEST && FB_OMAP2=n) + depends on ARCH_OMAP2 || ARCH_OMAP3 || COMPILE_TEST + depends on VIDEO_V4L2 + select VIDEOBUF2_DMA_CONTIG + select OMAP2_VRFB if ARCH_OMAP2 || ARCH_OMAP3 + select FRAME_VECTOR + help + V4L2 Display driver support for OMAP2/3 based boards. diff --git a/drivers/media/platform/omap/Makefile b/drivers/media/platform/omap/Makefile new file mode 100644 index 000000000..b17a0ac10 --- /dev/null +++ b/drivers/media/platform/omap/Makefile @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Makefile for the omap video device drivers. +# + +# OMAP2/3 Display driver +omap-vout-y += omap_vout.o omap_voutlib.o +omap-vout-$(CONFIG_VIDEO_OMAP2_VOUT_VRFB) += omap_vout_vrfb.o +obj-$(CONFIG_VIDEO_OMAP2_VOUT) += omap-vout.o diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c new file mode 100644 index 000000000..21193f0b7 --- /dev/null +++ b/drivers/media/platform/omap/omap_vout.c @@ -0,0 +1,1740 @@ +/* + * omap_vout.c + * + * Copyright (C) 2005-2010 Texas Instruments. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + * + * Leveraged code from the OMAP2 camera driver + * Video-for-Linux (Version 2) camera capture driver for + * the OMAP24xx camera controller. + * + * Author: Andy Lowe (source@mvista.com) + * + * Copyright (C) 2004 MontaVista Software, Inc. + * Copyright (C) 2010 Texas Instruments. + * + * History: + * 20-APR-2006 Khasim Modified VRFB based Rotation, + * The image data is always read from 0 degree + * view and written + * to the virtual space of desired rotation angle + * 4-DEC-2006 Jian Changed to support better memory management + * + * 17-Nov-2008 Hardik Changed driver to use video_ioctl2 + * + * 23-Feb-2010 Vaibhav H Modified to use new DSS2 interface + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include