aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-16 07:17:54 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 01:54:47 -0500
commit5d5a97a6fbf98f82ae50c837eba3ebcfea0902f8 (patch)
treeb8f6a3f1a5ef3a00c539b70574bc57477147927c
parentc1a9febfafa2a9a9ac09b2de4c80aa96b41a03d1 (diff)
OMAPDSS: APPLY: move channel-field to extra_info set
Setting overlay's output channel is currently handled at the same time as other overlay attributes. This is not right, as the normal attributes should only affect one overlay and manager, but changing the channel affects two managers. This patch moves the channel field into the "extra_info" set, handled together with enabled-status. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/apply.c21
-rw-r--r--include/video/omapdss.h2
2 files changed, 7 insertions, 16 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index debd37aa9128..3fd2ea163f05 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -69,8 +69,6 @@ struct ovl_priv_data {
69 69
70 struct omap_overlay_info info; 70 struct omap_overlay_info info;
71 71
72 enum omap_channel channel;
73
74 u32 fifo_low; 72 u32 fifo_low;
75 u32 fifo_high; 73 u32 fifo_high;
76 74
@@ -78,7 +76,7 @@ struct ovl_priv_data {
78 bool shadow_extra_info_dirty; 76 bool shadow_extra_info_dirty;
79 77
80 bool enabled; 78 bool enabled;
81 79 enum omap_channel channel;
82}; 80};
83 81
84struct mgr_priv_data { 82struct mgr_priv_data {
@@ -384,8 +382,6 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl)
384 382
385 ilace = ovl->manager->device->type == OMAP_DISPLAY_TYPE_VENC; 383 ilace = ovl->manager->device->type == OMAP_DISPLAY_TYPE_VENC;
386 384
387 dispc_ovl_set_channel_out(ovl->id, op->channel);
388
389 r = dispc_ovl_setup(ovl->id, oi, ilace, replication); 385 r = dispc_ovl_setup(ovl->id, oi, ilace, replication);
390 if (r) { 386 if (r) {
391 /* 387 /*
@@ -423,6 +419,7 @@ static void dss_ovl_write_regs_extra(struct omap_overlay *ovl)
423 * disabled */ 419 * disabled */
424 420
425 dispc_ovl_enable(ovl->id, op->enabled); 421 dispc_ovl_enable(ovl->id, op->enabled);
422 dispc_ovl_set_channel_out(ovl->id, op->channel);
426 423
427 mp = get_mgr_priv(ovl->manager); 424 mp = get_mgr_priv(ovl->manager);
428 425
@@ -608,19 +605,12 @@ static void omap_dss_mgr_apply_ovl(struct omap_overlay *ovl)
608 605
609 op = get_ovl_priv(ovl); 606 op = get_ovl_priv(ovl);
610 607
611 if (ovl->manager_changed) {
612 ovl->manager_changed = false;
613 op->user_info_dirty = true;
614 }
615
616 if (!op->user_info_dirty) 608 if (!op->user_info_dirty)
617 return; 609 return;
618 610
619 op->user_info_dirty = false; 611 op->user_info_dirty = false;
620 op->dirty = true; 612 op->dirty = true;
621 op->info = op->user_info; 613 op->info = op->user_info;
622
623 op->channel = ovl->manager->id;
624} 614}
625 615
626static void omap_dss_mgr_apply_mgr(struct omap_overlay_manager *mgr) 616static void omap_dss_mgr_apply_mgr(struct omap_overlay_manager *mgr)
@@ -910,9 +900,11 @@ int dss_ovl_set_manager(struct omap_overlay *ovl,
910 goto err; 900 goto err;
911 } 901 }
912 902
903 op->channel = mgr->id;
904 op->extra_info_dirty = true;
905
913 ovl->manager = mgr; 906 ovl->manager = mgr;
914 list_add_tail(&ovl->list, &mgr->overlays); 907 list_add_tail(&ovl->list, &mgr->overlays);
915 ovl->manager_changed = true;
916 908
917 spin_unlock_irqrestore(&data_lock, flags); 909 spin_unlock_irqrestore(&data_lock, flags);
918 910
@@ -960,9 +952,10 @@ int dss_ovl_unset_manager(struct omap_overlay *ovl)
960 goto err; 952 goto err;
961 } 953 }
962 954
955 op->channel = -1;
956
963 ovl->manager = NULL; 957 ovl->manager = NULL;
964 list_del(&ovl->list); 958 list_del(&ovl->list);
965 ovl->manager_changed = true;
966 959
967 spin_unlock_irqrestore(&data_lock, flags); 960 spin_unlock_irqrestore(&data_lock, flags);
968 961
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 2e2c53f5e7ca..e629b0de3262 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -384,8 +384,6 @@ struct omap_overlay {
384 /* dynamic fields */ 384 /* dynamic fields */
385 struct omap_overlay_manager *manager; 385 struct omap_overlay_manager *manager;
386 386
387 bool manager_changed;
388
389 int (*enable)(struct omap_overlay *ovl); 387 int (*enable)(struct omap_overlay *ovl);
390 int (*disable)(struct omap_overlay *ovl); 388 int (*disable)(struct omap_overlay *ovl);
391 bool (*is_enabled)(struct omap_overlay *ovl); 389 bool (*is_enabled)(struct omap_overlay *ovl);