Commit 55b68fb8 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

drm/omap: squash omapdrm sub-modules into one



At the moment we have three different modules: omapdss-base, omapdss,
omapdrm. This setup is finally obsolete, as the last omapdrm specific
panel has been converted to DRM panel.

We can thus remove omapdss-base and omapdss, and just compile everything
into omapdrm.ko.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-51-tomi.valkeinen@ti.com
parent f7c2724a
Loading
Loading
Loading
Loading
+118 −1
Original line number Diff line number Diff line
@@ -5,12 +5,129 @@ config DRM_OMAP
	depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
	select OMAP2_DSS
	select DRM_KMS_HELPER
	select VIDEOMODE_HELPERS
	select HDMI
	default n
	help
	  DRM display driver for OMAP2/3/4 based boards.

if DRM_OMAP

source "drivers/gpu/drm/omapdrm/dss/Kconfig"
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 <debugfs>/dynamic_debug/control.

config OMAP2_DSS_DEBUGFS
	bool "Debugfs filesystem support"
	depends on DEBUG_FS
	default n
	help
	  This enables debugfs for OMAPDSS at <debugfs>/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
	  <debugfs>/omapdss/dispc_irq for DISPC interrupts, and
	  <debugfs>/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_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 OMAP4_DSS_HDMI_CEC
	bool "Enable HDMI CEC support for OMAP4"
	depends on OMAP4_DSS_HDMI
	select CEC_CORE
	default y
	help
	  When selected the HDMI transmitter will support the CEC feature.

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
	select DRM_MIPI_DSI
	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
+14 −3
Original line number Diff line number Diff line
@@ -4,8 +4,6 @@
# Direct Rendering Infrastructure (DRI)
#

obj-y += dss/

omapdrm-y := omap_drv.o \
	omap_irq.o \
	omap_debugfs.o \
@@ -20,4 +18,17 @@ omapdrm-y := omap_drv.o \

omapdrm-$(CONFIG_DRM_FBDEV_EMULATION) += omap_fbdev.o

omapdrm-y += dss/base.o dss/display.o dss/output.o dss/dss.o dss/dispc.o \
		dss/dispc_coefs.o dss/pll.o dss/video-pll.o
omapdrm-$(CONFIG_OMAP2_DSS_DPI) += dss/dpi.o
omapdrm-$(CONFIG_OMAP2_DSS_VENC) += dss/venc.o
omapdrm-$(CONFIG_OMAP2_DSS_SDI) += dss/sdi.o
omapdrm-$(CONFIG_OMAP2_DSS_DSI) += dss/dsi.o
omapdrm-$(CONFIG_OMAP2_DSS_HDMI_COMMON) += dss/hdmi_common.o dss/hdmi_wp.o \
		dss/hdmi_pll.o dss/hdmi_phy.o
omapdrm-$(CONFIG_OMAP4_DSS_HDMI) += dss/hdmi4.o dss/hdmi4_core.o
omapdrm-$(CONFIG_OMAP4_DSS_HDMI_CEC) += dss/hdmi4_cec.o
omapdrm-$(CONFIG_OMAP5_DSS_HDMI) += dss/hdmi5.o dss/hdmi5_core.o
ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG

obj-$(CONFIG_DRM_OMAP) += omapdrm.o
+0 −132
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
config OMAP_DSS_BASE
	tristate

menuconfig OMAP2_DSS
	tristate "OMAP2+ Display Subsystem support"
	select OMAP_DSS_BASE
	select VIDEOMODE_HELPERS
	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 <debugfs>/dynamic_debug/control.

config OMAP2_DSS_DEBUGFS
	bool "Debugfs filesystem support"
	depends on DEBUG_FS
	default n
	help
	  This enables debugfs for OMAPDSS at <debugfs>/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
	  <debugfs>/omapdss/dispc_irq for DISPC interrupts, and
	  <debugfs>/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_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 OMAP4_DSS_HDMI_CEC
	bool "Enable HDMI CEC support for OMAP4"
	depends on OMAP4_DSS_HDMI
	select CEC_CORE
	default y
	help
	  When selected the HDMI transmitter will support the CEC feature.

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 https://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
	select DRM_MIPI_DSI
	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 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
+0 −18
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_OMAP_DSS_BASE) += omapdss-base.o
omapdss-base-y := base.o display.o output.o

obj-$(CONFIG_OMAP2_DSS) += omapdss.o
# Core DSS files
omapdss-y := dss.o dispc.o dispc_coefs.o \
	pll.o video-pll.o
omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.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_OMAP4_DSS_HDMI_CEC) += hdmi4_cec.o
omapdss-$(CONFIG_OMAP5_DSS_HDMI) += hdmi5.o hdmi5_core.o
ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG
+1 −23
Original line number Diff line number Diff line
@@ -20,14 +20,11 @@ struct dispc_device *dispc_get_dispc(struct dss_device *dss)
{
	return dss->dispc;
}
EXPORT_SYMBOL(dispc_get_dispc);

const struct dispc_ops *dispc_get_ops(struct dss_device *dss)
{
	return dss->dispc_ops;
}
EXPORT_SYMBOL(dispc_get_ops);


/* -----------------------------------------------------------------------------
 * OMAP DSS Devices Handling
@@ -42,7 +39,6 @@ void omapdss_device_register(struct omap_dss_device *dssdev)
	list_add_tail(&dssdev->list, &omapdss_devices_list);
	mutex_unlock(&omapdss_devices_lock);
}
EXPORT_SYMBOL_GPL(omapdss_device_register);

void omapdss_device_unregister(struct omap_dss_device *dssdev)
{
@@ -50,7 +46,6 @@ void omapdss_device_unregister(struct omap_dss_device *dssdev)
	list_del(&dssdev->list);
	mutex_unlock(&omapdss_devices_lock);
}
EXPORT_SYMBOL_GPL(omapdss_device_unregister);

static bool omapdss_device_is_registered(struct device_node *node)
{
@@ -72,24 +67,16 @@ static bool omapdss_device_is_registered(struct device_node *node)

struct omap_dss_device *omapdss_device_get(struct omap_dss_device *dssdev)
{
	if (!try_module_get(dssdev->owner))
	if (get_device(dssdev->dev) == NULL)
		return NULL;

	if (get_device(dssdev->dev) == NULL) {
		module_put(dssdev->owner);
		return NULL;
	}

	return dssdev;
}
EXPORT_SYMBOL(omapdss_device_get);

void omapdss_device_put(struct omap_dss_device *dssdev)
{
	put_device(dssdev->dev);
	module_put(dssdev->owner);
}
EXPORT_SYMBOL(omapdss_device_put);

struct omap_dss_device *omapdss_find_device_by_node(struct device_node *node)
{
@@ -150,7 +137,6 @@ struct omap_dss_device *omapdss_device_next_output(struct omap_dss_device *from)
	mutex_unlock(&omapdss_devices_lock);
	return dssdev;
}
EXPORT_SYMBOL(omapdss_device_next_output);

static bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
{
@@ -181,7 +167,6 @@ int omapdss_device_connect(struct dss_device *dss,

	return 0;
}
EXPORT_SYMBOL_GPL(omapdss_device_connect);

void omapdss_device_disconnect(struct omap_dss_device *src,
			       struct omap_dss_device *dst)
@@ -204,7 +189,6 @@ void omapdss_device_disconnect(struct omap_dss_device *src,

	dst->dss = NULL;
}
EXPORT_SYMBOL_GPL(omapdss_device_disconnect);

/* -----------------------------------------------------------------------------
 * Components Handling
@@ -290,7 +274,6 @@ void omapdss_gather_components(struct device *dev)
	for_each_available_child_of_node(dev->of_node, child)
		omapdss_walk_device(dev, child, true);
}
EXPORT_SYMBOL(omapdss_gather_components);

static bool omapdss_component_is_loaded(struct omapdss_comp_node *comp)
{
@@ -315,8 +298,3 @@ bool omapdss_stack_is_ready(void)

	return true;
}
EXPORT_SYMBOL(omapdss_stack_is_ready);

MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
MODULE_DESCRIPTION("OMAP Display Subsystem Base");
MODULE_LICENSE("GPL v2");
Loading