]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/omap: move dss_initialized to omapdss-base
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 5 Nov 2015 15:23:14 +0000 (17:23 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 3 Apr 2017 09:36:40 +0000 (12:36 +0300)
omapdss_is_initialized() is used to find out if omapdss has been probed
successfully. This patch moves the related code to the common
omapdss-base module, so that the same support will be there for both
omapdss and omapdss6.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/base.c
drivers/gpu/drm/omapdrm/dss/dss.c
drivers/gpu/drm/omapdrm/dss/omapdss.h

index 943030a7523c2797891762b9e44e51563e965970..03942097b9f1e8395065b1c3552c55a8a58b7469 100644 (file)
@@ -1,6 +1,20 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
+static bool dss_initialized;
+
+void omapdss_set_is_initialized(bool set)
+{
+       dss_initialized = set;
+}
+EXPORT_SYMBOL(omapdss_set_is_initialized);
+
+bool omapdss_is_initialized(void)
+{
+       return dss_initialized;
+}
+EXPORT_SYMBOL(omapdss_is_initialized);
+
 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
 MODULE_DESCRIPTION("OMAP Display Subsystem Base");
 MODULE_LICENSE("GPL v2");
index 4e72d2fefb4df01e2f76683571590e6f62925de2..5eb2f126054713a118276c30f139faccdd96c108 100644 (file)
@@ -117,14 +117,6 @@ static const char * const dss_generic_clk_source_names[] = {
        [DSS_CLK_SRC_HDMI_PLL]  = "HDMI PLL",
 };
 
-static bool dss_initialized;
-
-bool omapdss_is_initialized(void)
-{
-       return dss_initialized;
-}
-EXPORT_SYMBOL(omapdss_is_initialized);
-
 static inline void dss_write_reg(const struct dss_reg idx, u32 val)
 {
        __raw_writel(val, dss.base + idx.idx);
@@ -1266,7 +1258,7 @@ static int dss_bind(struct device *dev)
 
        pm_set_vt_switch(0);
 
-       dss_initialized = true;
+       omapdss_set_is_initialized(true);
 
        return 0;
 
@@ -1290,7 +1282,7 @@ static void dss_unbind(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
 
-       dss_initialized = false;
+       omapdss_set_is_initialized(false);
 
        component_unbind_all(&pdev->dev, NULL);
 
index 5b3b961127bd2db756297eca3d0ba3f8a9bf2e59..b644b12345c32cd427f408bbf24e5caa08e63c97 100644 (file)
@@ -844,6 +844,8 @@ omapdss_of_get_first_endpoint(const struct device_node *parent);
 struct omap_dss_device *
 omapdss_of_find_source_for_first_ep(struct device_node *node);
 
+void omapdss_set_is_initialized(bool set);
+
 u32 dispc_read_irqstatus(void);
 void dispc_clear_irqstatus(u32 mask);
 u32 dispc_read_irqenable(void);