diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-05 20:36:02 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-04-03 12:36:40 +0300 |
commit | 8a13398c3f01bc14369b879e9158391c0d447dcc (patch) | |
tree | 44c49655a9a819a135168cb658e5f4f658cd81d2 /drivers/gpu/drm/omapdrm/dss/base.c | |
parent | c283400aa5898279dbae0fe00a2ce8e0f61eb22c (diff) | |
download | linux-8a13398c3f01bc14369b879e9158391c0d447dcc.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/base.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/base.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c index 03942097b9f1..7dd447e6c4d7 100644 --- a/drivers/gpu/drm/omapdrm/dss/base.c +++ b/drivers/gpu/drm/omapdrm/dss/base.c @@ -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"); |