diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-11-25 10:32:20 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-12-02 01:54:56 -0500 |
commit | 3ab15b2aa70369e0360f12e35e47bca1a269138b (patch) | |
tree | 8a3437cc7081129374ca846ec7677503e5f3f22f /drivers/video/omap2/dss/apply.c | |
parent | 5b2141719aa8a14ebd242c60b4ce6a580276f7cd (diff) |
OMAPDSS: APPLY: add dss_set_go_bits()
Currently dss_write_regs() implicitely sets the GO bits for all managers
with shadow dirty flags set. This is a bit misleading, as one does not
presume "write registers" function to also set the GO bit.
Thus this patch splits the setting of GO bits into a separate function,
dss_set_go_bits, which is used after writing the registers.
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 | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index e2eaed2e9172..f54c17f849b7 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c | |||
@@ -715,16 +715,35 @@ static void dss_write_regs(void) | |||
715 | } | 715 | } |
716 | 716 | ||
717 | dss_mgr_write_regs(mgr); | 717 | dss_mgr_write_regs(mgr); |
718 | } | ||
719 | } | ||
718 | 720 | ||
719 | if (need_go(mgr)) { | 721 | static void dss_set_go_bits(void) |
720 | mp->busy = true; | 722 | { |
723 | const int num_mgrs = omap_dss_get_num_overlay_managers(); | ||
724 | int i; | ||
721 | 725 | ||
722 | if (!dss_data.irq_enabled && need_isr()) | 726 | for (i = 0; i < num_mgrs; ++i) { |
723 | dss_register_vsync_isr(); | 727 | struct omap_overlay_manager *mgr; |
728 | struct mgr_priv_data *mp; | ||
724 | 729 | ||
725 | dispc_mgr_go(mgr->id); | 730 | mgr = omap_dss_get_overlay_manager(i); |
726 | } | 731 | mp = get_mgr_priv(mgr); |
732 | |||
733 | if (!mp->enabled || mgr_manual_update(mgr) || mp->busy) | ||
734 | continue; | ||
735 | |||
736 | if (!need_go(mgr)) | ||
737 | continue; | ||
738 | |||
739 | mp->busy = true; | ||
740 | |||
741 | if (!dss_data.irq_enabled && need_isr()) | ||
742 | dss_register_vsync_isr(); | ||
743 | |||
744 | dispc_mgr_go(mgr->id); | ||
727 | } | 745 | } |
746 | |||
728 | } | 747 | } |
729 | 748 | ||
730 | void dss_mgr_start_update(struct omap_overlay_manager *mgr) | 749 | void dss_mgr_start_update(struct omap_overlay_manager *mgr) |
@@ -848,6 +867,7 @@ static void dss_apply_irq_handler(void *data, u32 mask) | |||
848 | } | 867 | } |
849 | 868 | ||
850 | dss_write_regs(); | 869 | dss_write_regs(); |
870 | dss_set_go_bits(); | ||
851 | 871 | ||
852 | extra_updating = extra_info_update_ongoing(); | 872 | extra_updating = extra_info_update_ongoing(); |
853 | if (!extra_updating) | 873 | if (!extra_updating) |
@@ -912,6 +932,7 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) | |||
912 | omap_dss_mgr_apply_mgr(mgr); | 932 | omap_dss_mgr_apply_mgr(mgr); |
913 | 933 | ||
914 | dss_write_regs(); | 934 | dss_write_regs(); |
935 | dss_set_go_bits(); | ||
915 | 936 | ||
916 | spin_unlock_irqrestore(&data_lock, flags); | 937 | spin_unlock_irqrestore(&data_lock, flags); |
917 | 938 | ||
@@ -1016,6 +1037,7 @@ int dss_mgr_enable(struct omap_overlay_manager *mgr) | |||
1016 | dss_mgr_setup_fifos(mgr); | 1037 | dss_mgr_setup_fifos(mgr); |
1017 | 1038 | ||
1018 | dss_write_regs(); | 1039 | dss_write_regs(); |
1040 | dss_set_go_bits(); | ||
1019 | 1041 | ||
1020 | if (!mgr_manual_update(mgr)) | 1042 | if (!mgr_manual_update(mgr)) |
1021 | mp->updating = true; | 1043 | mp->updating = true; |
@@ -1392,6 +1414,7 @@ int dss_ovl_enable(struct omap_overlay *ovl) | |||
1392 | dss_ovl_setup_fifo(ovl); | 1414 | dss_ovl_setup_fifo(ovl); |
1393 | 1415 | ||
1394 | dss_write_regs(); | 1416 | dss_write_regs(); |
1417 | dss_set_go_bits(); | ||
1395 | 1418 | ||
1396 | spin_unlock_irqrestore(&data_lock, flags); | 1419 | spin_unlock_irqrestore(&data_lock, flags); |
1397 | 1420 | ||
@@ -1426,8 +1449,8 @@ int dss_ovl_disable(struct omap_overlay *ovl) | |||
1426 | spin_lock_irqsave(&data_lock, flags); | 1449 | spin_lock_irqsave(&data_lock, flags); |
1427 | 1450 | ||
1428 | dss_apply_ovl_enable(ovl, false); | 1451 | dss_apply_ovl_enable(ovl, false); |
1429 | |||
1430 | dss_write_regs(); | 1452 | dss_write_regs(); |
1453 | dss_set_go_bits(); | ||
1431 | 1454 | ||
1432 | spin_unlock_irqrestore(&data_lock, flags); | 1455 | spin_unlock_irqrestore(&data_lock, flags); |
1433 | 1456 | ||