aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/apply.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/apply.c')
-rw-r--r--drivers/video/omap2/dss/apply.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index ba1f73c136ce..34879d0628bd 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -398,8 +398,7 @@ void dss_mgr_start_update(struct omap_overlay_manager *mgr)
398{ 398{
399 struct manager_cache_data *mc; 399 struct manager_cache_data *mc;
400 struct overlay_cache_data *oc; 400 struct overlay_cache_data *oc;
401 const int num_ovls = dss_feat_get_num_ovls(); 401 struct omap_overlay *ovl;
402 int i;
403 402
404 mc = &dss_cache.manager_cache[mgr->id]; 403 mc = &dss_cache.manager_cache[mgr->id];
405 404
@@ -407,11 +406,8 @@ void dss_mgr_start_update(struct omap_overlay_manager *mgr)
407 configure_dispc(); 406 configure_dispc();
408 mc->do_manual_update = false; 407 mc->do_manual_update = false;
409 408
410 for (i = 0; i < num_ovls; ++i) { 409 list_for_each_entry(ovl, &mgr->overlays, list) {
411 oc = &dss_cache.overlay_cache[i]; 410 oc = &dss_cache.overlay_cache[ovl->id];
412 if (oc->channel != mgr->id)
413 continue;
414
415 oc->shadow_dirty = false; 411 oc->shadow_dirty = false;
416 } 412 }
417 413
@@ -584,8 +580,9 @@ static void omap_dss_mgr_apply_ovl_fifos(struct omap_overlay *ovl)
584 580
585int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) 581int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
586{ 582{
587 int i, r; 583 int r;
588 unsigned long flags; 584 unsigned long flags;
585 struct omap_overlay *ovl;
589 586
590 DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name); 587 DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name);
591 588
@@ -596,31 +593,15 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
596 spin_lock_irqsave(&dss_cache.lock, flags); 593 spin_lock_irqsave(&dss_cache.lock, flags);
597 594
598 /* Configure overlays */ 595 /* Configure overlays */
599 for (i = 0; i < mgr->num_overlays; ++i) { 596 list_for_each_entry(ovl, &mgr->overlays, list)
600 struct omap_overlay *ovl;
601
602 ovl = mgr->overlays[i];
603
604 if (ovl->manager != mgr)
605 continue;
606
607 omap_dss_mgr_apply_ovl(ovl); 597 omap_dss_mgr_apply_ovl(ovl);
608 }
609 598
610 /* Configure manager */ 599 /* Configure manager */
611 omap_dss_mgr_apply_mgr(mgr); 600 omap_dss_mgr_apply_mgr(mgr);
612 601
613 /* Configure overlay fifos */ 602 /* Configure overlay fifos */
614 for (i = 0; i < mgr->num_overlays; ++i) { 603 list_for_each_entry(ovl, &mgr->overlays, list)
615 struct omap_overlay *ovl;
616
617 ovl = mgr->overlays[i];
618
619 if (ovl->manager != mgr)
620 continue;
621
622 omap_dss_mgr_apply_ovl_fifos(ovl); 604 omap_dss_mgr_apply_ovl_fifos(ovl);
623 }
624 605
625 r = 0; 606 r = 0;
626 if (mgr->enabled && !mgr_manual_update(mgr)) { 607 if (mgr->enabled && !mgr_manual_update(mgr)) {