drm/omap: add dispc_ops

We want to change the dispc API from plain functions to a struct with
functions pointers, so that omapdrm can call either omapdss or omapdss6
depending on the platform.

This patch adds 'struct dispc_ops' and adds functions to omapdss-base
to set and get the ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Tomi Valkeinen
2015-11-05 19:36:02 +02:00
bovenliggende c283400aa5
commit 8a13398c3f
2 gewijzigde bestanden met toevoegingen van 63 en 0 verwijderingen

Bestand weergeven

@@ -2,6 +2,7 @@
#include <linux/module.h>
static bool dss_initialized;
static const struct dispc_ops *ops;
void omapdss_set_is_initialized(bool set)
{
@@ -15,6 +16,18 @@ bool omapdss_is_initialized(void)
}
EXPORT_SYMBOL(omapdss_is_initialized);
void dispc_set_ops(const struct dispc_ops *o)
{
ops = o;
}
EXPORT_SYMBOL(dispc_set_ops);
const struct dispc_ops *dispc_get_ops(void)
{
return ops;
}
EXPORT_SYMBOL(dispc_get_ops);
MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
MODULE_DESCRIPTION("OMAP Display Subsystem Base");
MODULE_LICENSE("GPL v2");