Commit bc1a9518 authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: APPLY: use dispc_mgr_get_vsync_irq()

Use dispc_mgr_get_vsync_irq() to get the interrupt numbers for vsync,
instead of hardcoding the values depending on the display type.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 3dcec4d6
...@@ -131,13 +131,7 @@ int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr) ...@@ -131,13 +131,7 @@ int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr)
if (mgr_manual_update(mgr)) if (mgr_manual_update(mgr))
return 0; return 0;
if (dssdev->type == OMAP_DISPLAY_TYPE_VENC irq = dispc_mgr_get_vsync_irq(mgr->id);
|| dssdev->type == OMAP_DISPLAY_TYPE_HDMI) {
irq = DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN;
} else {
irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
DISPC_IRQ_VSYNC : DISPC_IRQ_VSYNC2;
}
mc = &dss_cache.manager_cache[mgr->id]; mc = &dss_cache.manager_cache[mgr->id];
i = 0; i = 0;
...@@ -200,13 +194,7 @@ int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl) ...@@ -200,13 +194,7 @@ int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl)
if (ovl_manual_update(ovl)) if (ovl_manual_update(ovl))
return 0; return 0;
if (dssdev->type == OMAP_DISPLAY_TYPE_VENC irq = dispc_mgr_get_vsync_irq(ovl->manager->id);
|| dssdev->type == OMAP_DISPLAY_TYPE_HDMI) {
irq = DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN;
} else {
irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
DISPC_IRQ_VSYNC : DISPC_IRQ_VSYNC2;
}
oc = &dss_cache.overlay_cache[ovl->id]; oc = &dss_cache.overlay_cache[ovl->id];
i = 0; i = 0;
...@@ -421,13 +409,13 @@ static void dss_apply_irq_handler(void *data, u32 mask); ...@@ -421,13 +409,13 @@ static void dss_apply_irq_handler(void *data, u32 mask);
static void dss_register_vsync_isr(void) static void dss_register_vsync_isr(void)
{ {
const int num_mgrs = dss_feat_get_num_mgrs();
u32 mask; u32 mask;
int r; int r, i;
mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_ODD | mask = 0;
DISPC_IRQ_EVSYNC_EVEN; for (i = 0; i < num_mgrs; ++i)
if (dss_has_feature(FEAT_MGR_LCD2)) mask |= dispc_mgr_get_vsync_irq(i);
mask |= DISPC_IRQ_VSYNC2;
r = omap_dispc_register_isr(dss_apply_irq_handler, NULL, mask); r = omap_dispc_register_isr(dss_apply_irq_handler, NULL, mask);
WARN_ON(r); WARN_ON(r);
...@@ -437,13 +425,13 @@ static void dss_register_vsync_isr(void) ...@@ -437,13 +425,13 @@ static void dss_register_vsync_isr(void)
static void dss_unregister_vsync_isr(void) static void dss_unregister_vsync_isr(void)
{ {
const int num_mgrs = dss_feat_get_num_mgrs();
u32 mask; u32 mask;
int r; int r, i;
mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_ODD | mask = 0;
DISPC_IRQ_EVSYNC_EVEN; for (i = 0; i < num_mgrs; ++i)
if (dss_has_feature(FEAT_MGR_LCD2)) mask |= dispc_mgr_get_vsync_irq(i);
mask |= DISPC_IRQ_VSYNC2;
r = omap_dispc_unregister_isr(dss_apply_irq_handler, NULL, mask); r = omap_dispc_unregister_isr(dss_apply_irq_handler, NULL, mask);
WARN_ON(r); WARN_ON(r);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment