From 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 25 Mar 2016 03:53:42 -0300 Subject: Linux-libre 4.5-gnu --- drivers/gpu/drm/omapdrm/dss/Kconfig | 135 + drivers/gpu/drm/omapdrm/dss/Makefile | 18 + drivers/gpu/drm/omapdrm/dss/apply.c | 1702 +++++++ drivers/gpu/drm/omapdrm/dss/core.c | 343 ++ drivers/gpu/drm/omapdrm/dss/dispc-compat.c | 667 +++ drivers/gpu/drm/omapdrm/dss/dispc-compat.h | 30 + drivers/gpu/drm/omapdrm/dss/dispc.c | 4234 +++++++++++++++++ drivers/gpu/drm/omapdrm/dss/dispc.h | 918 ++++ drivers/gpu/drm/omapdrm/dss/dispc_coefs.c | 325 ++ drivers/gpu/drm/omapdrm/dss/display-sysfs.c | 356 ++ drivers/gpu/drm/omapdrm/dss/display.c | 338 ++ drivers/gpu/drm/omapdrm/dss/dpi.c | 899 ++++ drivers/gpu/drm/omapdrm/dss/dsi.c | 5607 +++++++++++++++++++++++ drivers/gpu/drm/omapdrm/dss/dss-of.c | 183 + drivers/gpu/drm/omapdrm/dss/dss.c | 1329 ++++++ drivers/gpu/drm/omapdrm/dss/dss.h | 468 ++ drivers/gpu/drm/omapdrm/dss/dss_features.c | 951 ++++ drivers/gpu/drm/omapdrm/dss/dss_features.h | 108 + drivers/gpu/drm/omapdrm/dss/hdmi.h | 370 ++ drivers/gpu/drm/omapdrm/dss/hdmi4.c | 839 ++++ drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 904 ++++ drivers/gpu/drm/omapdrm/dss/hdmi4_core.h | 273 ++ drivers/gpu/drm/omapdrm/dss/hdmi5.c | 876 ++++ drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 916 ++++ drivers/gpu/drm/omapdrm/dss/hdmi5_core.h | 304 ++ drivers/gpu/drm/omapdrm/dss/hdmi_common.c | 148 + drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 247 + drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 255 ++ drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 282 ++ drivers/gpu/drm/omapdrm/dss/manager-sysfs.c | 531 +++ drivers/gpu/drm/omapdrm/dss/manager.c | 263 ++ drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | 225 + drivers/gpu/drm/omapdrm/dss/output.c | 267 ++ drivers/gpu/drm/omapdrm/dss/overlay-sysfs.c | 456 ++ drivers/gpu/drm/omapdrm/dss/overlay.c | 202 + drivers/gpu/drm/omapdrm/dss/pll.c | 389 ++ drivers/gpu/drm/omapdrm/dss/rfbi.c | 1078 +++++ drivers/gpu/drm/omapdrm/dss/sdi.c | 454 ++ drivers/gpu/drm/omapdrm/dss/venc.c | 1009 ++++ drivers/gpu/drm/omapdrm/dss/video-pll.c | 211 + 40 files changed, 29110 insertions(+) create mode 100644 drivers/gpu/drm/omapdrm/dss/Kconfig create mode 100644 drivers/gpu/drm/omapdrm/dss/Makefile create mode 100644 drivers/gpu/drm/omapdrm/dss/apply.c create mode 100644 drivers/gpu/drm/omapdrm/dss/core.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dispc-compat.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dispc-compat.h create mode 100644 drivers/gpu/drm/omapdrm/dss/dispc.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dispc.h create mode 100644 drivers/gpu/drm/omapdrm/dss/dispc_coefs.c create mode 100644 drivers/gpu/drm/omapdrm/dss/display-sysfs.c create mode 100644 drivers/gpu/drm/omapdrm/dss/display.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dpi.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dsi.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dss-of.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dss.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dss.h create mode 100644 drivers/gpu/drm/omapdrm/dss/dss_features.c create mode 100644 drivers/gpu/drm/omapdrm/dss/dss_features.h create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi.h create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi4.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi4_core.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi4_core.h create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi5.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi5_core.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi5_core.h create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi_common.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi_phy.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi_pll.c create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi_wp.c create mode 100644 drivers/gpu/drm/omapdrm/dss/manager-sysfs.c create mode 100644 drivers/gpu/drm/omapdrm/dss/manager.c create mode 100644 drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c create mode 100644 drivers/gpu/drm/omapdrm/dss/output.c create mode 100644 drivers/gpu/drm/omapdrm/dss/overlay-sysfs.c create mode 100644 drivers/gpu/drm/omapdrm/dss/overlay.c create mode 100644 drivers/gpu/drm/omapdrm/dss/pll.c create mode 100644 drivers/gpu/drm/omapdrm/dss/rfbi.c create mode 100644 drivers/gpu/drm/omapdrm/dss/sdi.c create mode 100644 drivers/gpu/drm/omapdrm/dss/venc.c create mode 100644 drivers/gpu/drm/omapdrm/dss/video-pll.c (limited to 'drivers/gpu/drm/omapdrm/dss') diff --git a/drivers/gpu/drm/omapdrm/dss/Kconfig b/drivers/gpu/drm/omapdrm/dss/Kconfig new file mode 100644 index 000000000..d1fa730c7 --- /dev/null +++ b/drivers/gpu/drm/omapdrm/dss/Kconfig @@ -0,0 +1,135 @@ +config OMAP2_DSS_INIT + bool + +menuconfig OMAP2_DSS + tristate "OMAP2+ Display Subsystem support" + select VIDEOMODE_HELPERS + select OMAP2_DSS_INIT + select HDMI + help + OMAP2+ Display Subsystem support. + +if OMAP2_DSS + +config OMAP2_DSS_DEBUG + bool "Debug support" + default n + 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 OMAP2_DSS_DEBUGFS + bool "Debugfs filesystem support" + depends on DEBUG_FS + default n + 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 OMAP2_DSS_COLLECT_IRQ_STATS + bool "Collect DSS IRQ statistics" + depends on OMAP2_DSS_DEBUGFS + default n + 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 OMAP2_DSS_DPI + bool "DPI support" + default y + help + DPI Interface. This is the Parallel Display Interface. + +config OMAP2_DSS_RFBI + bool "RFBI support" + depends on BROKEN + default n + help + MIPI DBI support (RFBI, Remote Framebuffer Interface, in Texas + Instrument's terminology). + + DBI is a bus between the host processor and a peripheral, + such as a display or a framebuffer chip. + + See http://www.mipi.org/ for DBI specifications. + +config OMAP2_DSS_VENC + bool "VENC support" + default y + help + OMAP Video Encoder support for S-Video and composite TV-out. + +config OMAP2_DSS_HDMI_COMMON + bool + +config OMAP4_DSS_HDMI + bool "HDMI support for OMAP4" + default y + select OMAP2_DSS_HDMI_COMMON + help + HDMI support for OMAP4 based SoCs. + +config OMAP5_DSS_HDMI + bool "HDMI support for OMAP5" + default n + select OMAP2_DSS_HDMI_COMMON + help + HDMI Interface for OMAP5 and similar cores. This adds the High + Definition Multimedia Interface. See http://www.hdmi.org/ for HDMI + specification. + +config OMAP2_DSS_SDI + bool "SDI support" + default n + help + SDI (Serial Display Interface) support. + + SDI is a high speed one-way display serial bus between the host + processor and a display. + +config OMAP2_DSS_DSI + bool "DSI support" + default n + 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 http://www.mipi.org/ for DSI specifications. + +config 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 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. + +endif diff --git a/drivers/gpu/drm/omapdrm/dss/Makefile b/drivers/gpu/drm/omapdrm/dss/Makefile new file mode 100644 index 000000000..b5136d3d4 --- /dev/null +++ b/drivers/gpu/drm/omapdrm/dss/Makefile @@ -0,0 +1,18 @@ +obj-$(CONFIG_OMAP2_DSS_INIT) += omapdss-boot-init.o +obj-$(CONFIG_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_OMAP2_DSS_DPI) += dpi.o +omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o +omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o +omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o +omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o +omapdss-$(CONFIG_OMAP2_DSS_HDMI_COMMON) += hdmi_common.o hdmi_wp.o hdmi_pll.o \ + hdmi_phy.o +omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi4.o hdmi4_core.o +omapdss-$(CONFIG_OMAP5_DSS_HDMI) += hdmi5.o hdmi5_core.o +ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG diff --git a/drivers/gpu/drm/omapdrm/dss/apply.c b/drivers/gpu/drm/omapdrm/dss/apply.c new file mode 100644 index 000000000..663ccc3bf --- /dev/null +++ b/drivers/gpu/drm/omapdrm/dss/apply.c @@ -0,0 +1,1702 @@ +/* + * Copyright (C) 2011 Texas Instruments + * Author: Tomi Valkeinen + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#define DSS_SUBSYS_NAME "APPLY" + +#include +#include +#include +#include +#include + +#include