From ace9429bb58fd418f0c81d4c2835699bddf6bde6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:27:49 +0200 Subject: Adding upstream version 6.6.15. Signed-off-by: Daniel Baumann --- drivers/gpu/drm/imx/ipuv3/Kconfig | 41 ++ drivers/gpu/drm/imx/ipuv3/Makefile | 11 + drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c | 283 ++++++++ drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 357 ++++++++++ drivers/gpu/drm/imx/ipuv3/imx-drm.h | 45 ++ drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 770 ++++++++++++++++++++++ drivers/gpu/drm/imx/ipuv3/imx-tve.c | 674 +++++++++++++++++++ drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 456 +++++++++++++ drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 947 +++++++++++++++++++++++++++ drivers/gpu/drm/imx/ipuv3/ipuv3-plane.h | 50 ++ drivers/gpu/drm/imx/ipuv3/parallel-display.c | 383 +++++++++++ 11 files changed, 4017 insertions(+) create mode 100644 drivers/gpu/drm/imx/ipuv3/Kconfig create mode 100644 drivers/gpu/drm/imx/ipuv3/Makefile create mode 100644 drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c create mode 100644 drivers/gpu/drm/imx/ipuv3/imx-drm-core.c create mode 100644 drivers/gpu/drm/imx/ipuv3/imx-drm.h create mode 100644 drivers/gpu/drm/imx/ipuv3/imx-ldb.c create mode 100644 drivers/gpu/drm/imx/ipuv3/imx-tve.c create mode 100644 drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c create mode 100644 drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c create mode 100644 drivers/gpu/drm/imx/ipuv3/ipuv3-plane.h create mode 100644 drivers/gpu/drm/imx/ipuv3/parallel-display.c (limited to 'drivers/gpu/drm/imx/ipuv3') diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig new file mode 100644 index 0000000000..bacf0655eb --- /dev/null +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0-only +config DRM_IMX + tristate "DRM Support for Freescale i.MX" + select DRM_KMS_HELPER + select VIDEOMODE_HELPERS + select DRM_GEM_DMA_HELPER + depends on DRM && (ARCH_MXC || COMPILE_TEST) + depends on IMX_IPUV3_CORE + help + enable i.MX graphics support + +config DRM_IMX_PARALLEL_DISPLAY + tristate "Support for parallel displays" + select DRM_PANEL + depends on DRM_IMX + select VIDEOMODE_HELPERS + +config DRM_IMX_TVE + tristate "Support for TV and VGA displays" + depends on DRM_IMX + depends on COMMON_CLK + select REGMAP_MMIO + help + Choose this to enable the internal Television Encoder (TVe) + found on i.MX53 processors. + +config DRM_IMX_LDB + tristate "Support for LVDS displays" + depends on DRM_IMX && MFD_SYSCON + depends on COMMON_CLK + select DRM_PANEL + help + Choose this to enable the internal LVDS Display Bridge (LDB) + found on i.MX53 and i.MX6 processors. + +config DRM_IMX_HDMI + tristate "Freescale i.MX DRM HDMI" + select DRM_DW_HDMI + depends on DRM_IMX && OF + help + Choose this if you want to use HDMI on i.MX6. diff --git a/drivers/gpu/drm/imx/ipuv3/Makefile b/drivers/gpu/drm/imx/ipuv3/Makefile new file mode 100644 index 0000000000..21cdcc2faa --- /dev/null +++ b/drivers/gpu/drm/imx/ipuv3/Makefile @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +imxdrm-objs := imx-drm-core.o ipuv3-crtc.o ipuv3-plane.o + +obj-$(CONFIG_DRM_IMX) += imxdrm.o + +obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o +obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o +obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o + +obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o diff --git a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c new file mode 100644 index 0000000000..a2277a0d6d --- /dev/null +++ b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c @@ -0,0 +1,283 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (C) 2011-2013 Freescale Semiconductor, Inc. + * + * derived from imx-hdmi.c(renamed to bridge/dw_hdmi.c now) + */ + +#include +#include +#include +#include +#include +#include + +#include