From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- drivers/video/fbdev/omap2/omapfb/dss/Kconfig | 111 + drivers/video/fbdev/omap2/omapfb/dss/Makefile | 18 + drivers/video/fbdev/omap2/omapfb/dss/apply.c | 1689 ++++++ drivers/video/fbdev/omap2/omapfb/dss/core.c | 288 + .../video/fbdev/omap2/omapfb/dss/dispc-compat.c | 657 +++ .../video/fbdev/omap2/omapfb/dss/dispc-compat.h | 19 + drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 4093 ++++++++++++++ drivers/video/fbdev/omap2/omapfb/dss/dispc.h | 907 ++++ drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c | 314 ++ .../video/fbdev/omap2/omapfb/dss/display-sysfs.c | 346 ++ drivers/video/fbdev/omap2/omapfb/dss/display.c | 327 ++ drivers/video/fbdev/omap2/omapfb/dss/dpi.c | 888 ++++ drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 5585 ++++++++++++++++++++ drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 176 + drivers/video/fbdev/omap2/omapfb/dss/dss.c | 1299 +++++ drivers/video/fbdev/omap2/omapfb/dss/dss.h | 522 ++ .../video/fbdev/omap2/omapfb/dss/dss_features.c | 939 ++++ .../video/fbdev/omap2/omapfb/dss/dss_features.h | 97 + drivers/video/fbdev/omap2/omapfb/dss/hdmi.h | 360 ++ drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 812 +++ drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 885 ++++ drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.h | 262 + drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 854 +++ drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 897 ++++ drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.h | 293 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c | 149 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | 221 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | 235 + drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c | 281 + .../video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 515 ++ drivers/video/fbdev/omap2/omapfb/dss/manager.c | 251 + .../fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 218 + drivers/video/fbdev/omap2/omapfb/dss/output.c | 256 + .../video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | 446 ++ drivers/video/fbdev/omap2/omapfb/dss/overlay.c | 191 + drivers/video/fbdev/omap2/omapfb/dss/pll.c | 378 ++ drivers/video/fbdev/omap2/omapfb/dss/sdi.c | 443 ++ drivers/video/fbdev/omap2/omapfb/dss/venc.c | 942 ++++ drivers/video/fbdev/omap2/omapfb/dss/video-pll.c | 189 + 39 files changed, 27353 insertions(+) create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/Kconfig create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/Makefile create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/apply.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/core.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/display.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dpi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dsi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss-of.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss_features.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/dss_features.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.h create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/manager.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/output.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/overlay.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/pll.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/sdi.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/venc.c create mode 100644 drivers/video/fbdev/omap2/omapfb/dss/video-pll.c (limited to 'drivers/video/fbdev/omap2/omapfb/dss') diff --git a/drivers/video/fbdev/omap2/omapfb/dss/Kconfig b/drivers/video/fbdev/omap2/omapfb/dss/Kconfig new file mode 100644 index 000000000..cc81a1953 --- /dev/null +++ b/drivers/video/fbdev/omap2/omapfb/dss/Kconfig @@ -0,0 +1,111 @@ +# SPDX-License-Identifier: GPL-2.0 +config FB_OMAP2_DSS_INIT + bool + +config FB_OMAP2_DSS + tristate + select VIDEOMODE_HELPERS + select FB_OMAP2_DSS_INIT + select HDMI + +config FB_OMAP2_DSS_DEBUG + bool "Debug support" + help + This enables printing of debug messages. Alternatively, debug messages + can also be enabled by setting CONFIG_DYNAMIC_DEBUG and then setting + appropriate flags in /dynamic_debug/control. + +config FB_OMAP2_DSS_DEBUGFS + bool "Debugfs filesystem support" + depends on DEBUG_FS + help + This enables debugfs for OMAPDSS at /omapdss. This enables + querying about clock configuration and register configuration of dss, + dispc, dsi, hdmi and rfbi. + +config FB_OMAP2_DSS_COLLECT_IRQ_STATS + bool "Collect DSS IRQ statistics" + depends on FB_OMAP2_DSS_DEBUGFS + help + Collect DSS IRQ statistics, printable via debugfs. + + The statistics can be found from + /omapdss/dispc_irq for DISPC interrupts, and + /omapdss/dsi_irq for DSI interrupts. + +config FB_OMAP2_DSS_DPI + bool "DPI support" + default y + help + DPI Interface. This is the Parallel Display Interface. + +config FB_OMAP2_DSS_VENC + bool "VENC support" + default y + help + OMAP Video Encoder support for S-Video and composite TV-out. + +config FB_OMAP2_DSS_HDMI_COMMON + bool + +config FB_OMAP4_DSS_HDMI + bool "HDMI support for OMAP4" + default y + select FB_OMAP2_DSS_HDMI_COMMON + help + HDMI support for OMAP4 based SoCs. + +config FB_OMAP5_DSS_HDMI + bool "HDMI support for OMAP5" + select FB_OMAP2_DSS_HDMI_COMMON + help + HDMI Interface for OMAP5 and similar cores. This adds the High + Definition Multimedia Interface. See https://www.hdmi.org/ for HDMI + specification. + +config FB_OMAP2_DSS_SDI + bool "SDI support" + help + SDI (Serial Display Interface) support. + + SDI is a high speed one-way display serial bus between the host + processor and a display. + +config FB_OMAP2_DSS_DSI + bool "DSI support" + help + MIPI DSI (Display Serial Interface) support. + + DSI is a high speed half-duplex serial interface between the host + processor and a peripheral, such as a display or a framebuffer chip. + + See https://www.mipi.org/ for DSI specifications. + +config FB_OMAP2_DSS_MIN_FCK_PER_PCK + int "Minimum FCK/PCK ratio (for scaling)" + range 0 32 + default 0 + help + This can be used to adjust the minimum FCK/PCK ratio. + + With this you can make sure that DISPC FCK is at least + n x PCK. Video plane scaling requires higher FCK than + normally. + + If this is set to 0, there's no extra constraint on the + DISPC FCK. However, the FCK will at minimum be + 2xPCK (if active matrix) or 3xPCK (if passive matrix). + + Max FCK is 173MHz, so this doesn't work if your PCK + is very high. + +config FB_OMAP2_DSS_SLEEP_AFTER_VENC_RESET + bool "Sleep 20ms after VENC reset" + default y + help + There is a 20ms sleep after VENC reset which seemed to fix the + reset. The reason for the bug is unclear, and it's also unclear + on what platforms this happens. + + This option enables the sleep, and is enabled by default. You can + disable the sleep if it doesn't cause problems on your platform. diff --git a/drivers/video/fbdev/omap2/omapfb/dss/Makefile b/drivers/video/fbdev/omap2/omapfb/dss/Makefile new file mode 100644 index 000000000..eb3689ae8 --- /dev/null +++ b/drivers/video/fbdev/omap2/omapfb/dss/Makefile @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_FB_OMAP2_DSS_INIT) += omapdss-boot-init.o +obj-$(CONFIG_FB_OMAP2_DSS) += omapdss.o +# Core DSS files +omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \ + output.o dss-of.o pll.o video-pll.o +# DSS compat layer files +omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \ + dispc-compat.o display-sysfs.o +omapdss-$(CONFIG_FB_OMAP2_DSS_DPI) += dpi.o +omapdss-$(CONFIG_FB_OMAP2_DSS_VENC) += venc.o +omapdss-$(CONFIG_FB_OMAP2_DSS_SDI) += sdi.o +omapdss-$(CONFIG_FB_OMAP2_DSS_DSI) += dsi.o +omapdss-$(CONFIG_FB_OMAP2_DSS_HDMI_COMMON) += hdmi_common.o hdmi_wp.o hdmi_pll.o \ + hdmi_phy.o +omapdss-$(CONFIG_FB_OMAP4_DSS_HDMI) += hdmi4.o hdmi4_core.o +omapdss-$(CONFIG_FB_OMAP5_DSS_HDMI) += hdmi5.o hdmi5_core.o +ccflags-$(CONFIG_FB_OMAP2_DSS_DEBUG) += -DDEBUG diff --git a/drivers/video/fbdev/omap2/omapfb/dss/apply.c b/drivers/video/fbdev/omap2/omapfb/dss/apply.c new file mode 100644 index 000000000..acca991c7 --- /dev/null +++ b/drivers/video/fbdev/omap2/omapfb/dss/apply.c @@ -0,0 +1,1689 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2011 Texas Instruments + * Author: Tomi Valkeinen + */ + +#define DSS_SUBSYS_NAME "APPLY" + +#include +#include +#include +#include +#include + +#include