#include <linux/list.h>
#include "omapdss.h"
-static bool dss_initialized;
+static struct dss_device *dss_device;
static const struct dispc_ops *ops;
static struct list_head omapdss_comp_list;
bool dss_core_component;
};
-void omapdss_set_is_initialized(bool set)
+struct dss_device *omapdss_get_dss(void)
{
- dss_initialized = set;
+ return dss_device;
}
-EXPORT_SYMBOL(omapdss_set_is_initialized);
+EXPORT_SYMBOL(omapdss_get_dss);
-bool omapdss_is_initialized(void)
+void omapdss_set_dss(struct dss_device *dss)
{
- return dss_initialized;
+ dss_device = dss;
}
-EXPORT_SYMBOL(omapdss_is_initialized);
+EXPORT_SYMBOL(omapdss_set_dss);
void dispc_set_ops(const struct dispc_ops *o)
{
static int dss_bind(struct device *dev)
{
+ struct dss_device *dss = dev_get_drvdata(dev);
int r;
r = component_bind_all(dev, NULL);
pm_set_vt_switch(0);
omapdss_gather_components(dev);
- omapdss_set_is_initialized(true);
+ omapdss_set_dss(dss);
return 0;
}
static void dss_unbind(struct device *dev)
{
- omapdss_set_is_initialized(false);
+ omapdss_set_dss(NULL);
component_unbind_all(dev, NULL);
}
#define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 29)
#define DISPC_IRQ_FRAMEDONE3 (1 << 30)
+struct dss_device;
struct omap_drm_private;
struct omap_dss_device;
struct dss_lcd_mgr_config;
const struct hdmi_avi_infoframe *avi);
};
-bool omapdss_is_initialized(void);
+struct dss_device *omapdss_get_dss(void);
+void omapdss_set_dss(struct dss_device *dss);
+static inline bool omapdss_is_initialized(void)
+{
+ return !!omapdss_get_dss();
+}
int omapdss_register_display(struct omap_dss_device *dssdev);
void omapdss_unregister_display(struct omap_dss_device *dssdev);
struct omap_dss_device *
omapdss_of_find_source_for_first_ep(struct device_node *node);
-void omapdss_set_is_initialized(bool set);
-
struct device_node *dss_of_port_get_parent_device(struct device_node *port);
u32 dss_of_port_get_port_number(struct device_node *port);
if (ret)
goto err_crtc_uninit;
+ priv->dss = omapdss_get_dss();
priv->dispc_ops = dispc_get_ops();
soc = soc_device_match(omapdrm_soc_devices);
struct device *dev;
u32 omaprev;
+ struct dss_device *dss;
const struct dispc_ops *dispc_ops;
unsigned int num_crtcs;