diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-11-26 16:36:19 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-12-02 10:54:59 +0400 |
commit | 75ae118a0028810f93a746c25f4bb018fb044323 (patch) | |
tree | 9fd7ed24abe64d3a71573a72d164d42056d5523b /drivers/video/omap2/dss/apply.c | |
parent | a6b24f83601530f69ee36ac48527336e3c79bea8 (diff) | |
download | linux-75ae118a0028810f93a746c25f4bb018fb044323.tar.xz |
OMAPDSS: APPLY: add dss_setup_fifos
Currently fifo threshold configuration is done per overlay or per
manager. However, when a fifo size configuration is added, we need to
always configure the thresholds for all overlays.
This patch prepares for that by changing the fifo threshold
configuration to always handle all overlays.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/apply.c')
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index ef13fd65fcc1..5f5812b528de 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -960,6 +960,9 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl) u32 size, burst_size; u32 fifo_low, fifo_high; + if (!op->enabled && !op->enabling) + return; + dssdev = ovl->manager->device; size = dispc_ovl_get_fifo_size(ovl->id); @@ -993,7 +996,6 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl) static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr) { struct omap_overlay *ovl; - struct ovl_priv_data *op; struct mgr_priv_data *mp; mp = get_mgr_priv(mgr); @@ -1001,13 +1003,19 @@ static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr) if (!mp->enabled) return; - list_for_each_entry(ovl, &mgr->overlays, list) { - op = get_ovl_priv(ovl); + list_for_each_entry(ovl, &mgr->overlays, list) + dss_ovl_setup_fifo(ovl); +} - if (!op->enabled && !op->enabling) - continue; +static void dss_setup_fifos(void) +{ + const int num_mgrs = omap_dss_get_num_overlay_managers(); + struct omap_overlay_manager *mgr; + int i; - dss_ovl_setup_fifo(ovl); + for (i = 0; i < num_mgrs; ++i) { + mgr = omap_dss_get_overlay_manager(i); + dss_mgr_setup_fifos(mgr); } } @@ -1033,7 +1041,7 @@ int dss_mgr_enable(struct omap_overlay_manager *mgr) goto err; } - dss_mgr_setup_fifos(mgr); + dss_setup_fifos(); dss_write_regs(); dss_set_go_bits(); @@ -1409,7 +1417,7 @@ int dss_ovl_enable(struct omap_overlay *ovl) goto err2; } - dss_ovl_setup_fifo(ovl); + dss_setup_fifos(); op->enabling = false; dss_apply_ovl_enable(ovl, true); |