summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-05 20:44:38 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-04-03 12:36:40 +0300
commita1a37647d240ffb0b6480c2ecd1b02a4c21f6926 (patch)
treec6066ea712e7b33400a9d68d11569c831b7f21f1 /drivers/gpu/drm/omapdrm
parent8a13398c3f01bc14369b879e9158391c0d447dcc (diff)
downloadlinux-a1a37647d240ffb0b6480c2ecd1b02a4c21f6926.tar.xz
drm/omap: fill dispc_ops
This patch changes the current omapdss driver to fill a dispc_ops struct and set it to omapdss-base. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dispc.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 53d08dc4ef5a..f871f69dab1a 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -4359,6 +4359,42 @@ static void dispc_errata_i734_wa(void)
REG_FLD_MOD(DISPC_CONFIG, gatestate, 8, 4);
}
+static const struct dispc_ops dispc_ops = {
+ .read_irqstatus = dispc_read_irqstatus,
+ .clear_irqstatus = dispc_clear_irqstatus,
+ .read_irqenable = dispc_read_irqenable,
+ .write_irqenable = dispc_write_irqenable,
+
+ .request_irq = dispc_request_irq,
+ .free_irq = dispc_free_irq,
+
+ .runtime_get = dispc_runtime_get,
+ .runtime_put = dispc_runtime_put,
+
+ .get_num_ovls = dispc_get_num_ovls,
+ .get_num_mgrs = dispc_get_num_mgrs,
+
+ .mgr_enable = dispc_mgr_enable,
+ .mgr_is_enabled = dispc_mgr_is_enabled,
+ .mgr_get_vsync_irq = dispc_mgr_get_vsync_irq,
+ .mgr_get_framedone_irq = dispc_mgr_get_framedone_irq,
+ .mgr_get_sync_lost_irq = dispc_mgr_get_sync_lost_irq,
+ .mgr_go_busy = dispc_mgr_go_busy,
+ .mgr_go = dispc_mgr_go,
+ .mgr_set_lcd_config = dispc_mgr_set_lcd_config,
+ .mgr_set_timings = dispc_mgr_set_timings,
+ .mgr_setup = dispc_mgr_setup,
+ .mgr_get_supported_outputs = dispc_mgr_get_supported_outputs,
+ .mgr_gamma_size = dispc_mgr_gamma_size,
+ .mgr_set_gamma = dispc_mgr_set_gamma,
+
+ .ovl_enable = dispc_ovl_enable,
+ .ovl_enabled = dispc_ovl_enabled,
+ .ovl_set_channel_out = dispc_ovl_set_channel_out,
+ .ovl_setup = dispc_ovl_setup,
+ .ovl_get_color_modes = dispc_ovl_get_color_modes,
+};
+
/* DISPC HW IP initialisation */
static int dispc_bind(struct device *dev, struct device *master, void *data)
{
@@ -4431,6 +4467,8 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
dispc_runtime_put();
+ dispc_set_ops(&dispc_ops);
+
dss_debugfs_create_file("dispc", dispc_dump_regs);
return 0;
@@ -4443,6 +4481,8 @@ err_runtime_get:
static void dispc_unbind(struct device *dev, struct device *master,
void *data)
{
+ dispc_set_ops(NULL);
+
pm_runtime_disable(dev);
dispc_errata_i734_wa_fini();