#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/list.h>
+
+#include "dss.h"
#include "omapdss.h"
static struct dss_device *dss_device;
-static const struct dispc_ops *ops;
static struct list_head omapdss_comp_list;
}
EXPORT_SYMBOL(omapdss_set_dss);
-void dispc_set_ops(const struct dispc_ops *o)
-{
- ops = o;
-}
-EXPORT_SYMBOL(dispc_set_ops);
-
-const struct dispc_ops *dispc_get_ops(void)
+const struct dispc_ops *dispc_get_ops(struct dss_device *dss)
{
- return ops;
+ return dss->dispc_ops;
}
EXPORT_SYMBOL(dispc_get_ops);
dispc_runtime_put();
- dispc_set_ops(&dispc_ops);
+ dss->dispc_ops = &dispc_ops;
dispc.debugfs = dss_debugfs_create_file(dss, "dispc", dispc_dump_regs,
&dispc);
static void dispc_unbind(struct device *dev, struct device *master,
void *data)
{
+ struct dss_device *dss = dispc.dss;
+
dss_debugfs_remove_file(dispc.debugfs);
- dispc_set_ops(NULL);
+ dss->dispc_ops = NULL;
pm_runtime_disable(dev);
struct dss_pll *plls[4];
struct dss_pll *video1_pll;
struct dss_pll *video2_pll;
+
+ const struct dispc_ops *dispc_ops;
};
/* core */
const u32 *(*ovl_get_color_modes)(enum omap_plane_id plane);
};
-void dispc_set_ops(const struct dispc_ops *o);
-const struct dispc_ops *dispc_get_ops(void);
+const struct dispc_ops *dispc_get_ops(struct dss_device *dss);
bool omapdss_component_is_display(struct device_node *node);
bool omapdss_component_is_output(struct device_node *node);
enum omap_channel channel,
struct omap_dss_device *dst)
{
- const struct dispc_ops *dispc_ops = dispc_get_ops();
-
if (omap_crtc_output[channel])
return -EINVAL;
- if ((dispc_ops->mgr_get_supported_outputs(channel) & dst->id) == 0)
+ if (!(priv->dispc_ops->mgr_get_supported_outputs(channel) & dst->id))
return -EINVAL;
omap_crtc_output[channel] = dst;
DBG("%s", dev_name(dev));
priv->dev = dev;
+ priv->dss = omapdss_get_dss();
+ priv->dispc_ops = dispc_get_ops(priv->dss);
omap_crtc_pre_init(priv);
if (ret)
goto err_crtc_uninit;
- priv->dss = omapdss_get_dss();
- priv->dispc_ops = dispc_get_ops();
-
soc = soc_device_match(omapdrm_soc_devices);
priv->omaprev = soc ? (unsigned int)soc->data : 0;
priv->wq = alloc_ordered_workqueue("omapdrm", 0);