aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-04-30 07:09:53 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-07-01 05:01:15 -0400
commit8cff88c5da2197aa601409d4a7ce8f83f8de8190 (patch)
tree54d106373bd366517ed731e20ef34d84072be33a /drivers/video
parent27cc213ea7dde929692df46a64c8d8ef74663e48 (diff)
OMAP: DSS2: remove update_mode from omapdss
Remove the whole update_mode stuff from omapdss driver. If automatic update for manual update displays is needed, it's better implemented in higher layers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c17
-rw-r--r--drivers/video/omap2/dss/display.c45
-rw-r--r--drivers/video/omap2/dss/manager.c59
-rw-r--r--drivers/video/omap2/dss/venc.c17
4 files changed, 14 insertions, 124 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index fdd5d4ae437..221579f75d8 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -1897,20 +1897,6 @@ err:
1897 mutex_unlock(&td->lock); 1897 mutex_unlock(&td->lock);
1898} 1898}
1899 1899
1900static int taal_set_update_mode(struct omap_dss_device *dssdev,
1901 enum omap_dss_update_mode mode)
1902{
1903 if (mode != OMAP_DSS_UPDATE_MANUAL)
1904 return -EINVAL;
1905 return 0;
1906}
1907
1908static enum omap_dss_update_mode taal_get_update_mode(
1909 struct omap_dss_device *dssdev)
1910{
1911 return OMAP_DSS_UPDATE_MANUAL;
1912}
1913
1914static struct omap_dss_driver taal_driver = { 1900static struct omap_dss_driver taal_driver = {
1915 .probe = taal_probe, 1901 .probe = taal_probe,
1916 .remove = __exit_p(taal_remove), 1902 .remove = __exit_p(taal_remove),
@@ -1920,9 +1906,6 @@ static struct omap_dss_driver taal_driver = {
1920 .suspend = taal_suspend, 1906 .suspend = taal_suspend,
1921 .resume = taal_resume, 1907 .resume = taal_resume,
1922 1908
1923 .set_update_mode = taal_set_update_mode,
1924 .get_update_mode = taal_get_update_mode,
1925
1926 .update = taal_update, 1909 .update = taal_update,
1927 .sync = taal_sync, 1910 .sync = taal_sync,
1928 1911
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index c2dfc8c5005..a0bbdf6684b 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -65,48 +65,6 @@ static ssize_t display_enabled_store(struct device *dev,
65 return size; 65 return size;
66} 66}
67 67
68static ssize_t display_upd_mode_show(struct device *dev,
69 struct device_attribute *attr, char *buf)
70{
71 struct omap_dss_device *dssdev = to_dss_device(dev);
72 enum omap_dss_update_mode mode = OMAP_DSS_UPDATE_AUTO;
73 if (dssdev->driver->get_update_mode)
74 mode = dssdev->driver->get_update_mode(dssdev);
75 return snprintf(buf, PAGE_SIZE, "%d\n", mode);
76}
77
78static ssize_t display_upd_mode_store(struct device *dev,
79 struct device_attribute *attr,
80 const char *buf, size_t size)
81{
82 struct omap_dss_device *dssdev = to_dss_device(dev);
83 int val, r;
84 enum omap_dss_update_mode mode;
85
86 if (!dssdev->driver->set_update_mode)
87 return -EINVAL;
88
89 r = kstrtoint(buf, 0, &val);
90 if (r)
91 return r;
92
93 switch (val) {
94 case OMAP_DSS_UPDATE_DISABLED:
95 case OMAP_DSS_UPDATE_AUTO:
96 case OMAP_DSS_UPDATE_MANUAL:
97 mode = (enum omap_dss_update_mode)val;
98 break;
99 default:
100 return -EINVAL;
101 }
102
103 r = dssdev->driver->set_update_mode(dssdev, mode);
104 if (r)
105 return r;
106
107 return size;
108}
109
110static ssize_t display_tear_show(struct device *dev, 68static ssize_t display_tear_show(struct device *dev,
111 struct device_attribute *attr, char *buf) 69 struct device_attribute *attr, char *buf)
112{ 70{
@@ -294,8 +252,6 @@ static ssize_t display_wss_store(struct device *dev,
294 252
295static DEVICE_ATTR(enabled, S_IRUGO|S_IWUSR, 253static DEVICE_ATTR(enabled, S_IRUGO|S_IWUSR,
296 display_enabled_show, display_enabled_store); 254 display_enabled_show, display_enabled_store);
297static DEVICE_ATTR(update_mode, S_IRUGO|S_IWUSR,
298 display_upd_mode_show, display_upd_mode_store);
299static DEVICE_ATTR(tear_elim, S_IRUGO|S_IWUSR, 255static DEVICE_ATTR(tear_elim, S_IRUGO|S_IWUSR,
300 display_tear_show, display_tear_store); 256 display_tear_show, display_tear_store);
301static DEVICE_ATTR(timings, S_IRUGO|S_IWUSR, 257static DEVICE_ATTR(timings, S_IRUGO|S_IWUSR,
@@ -309,7 +265,6 @@ static DEVICE_ATTR(wss, S_IRUGO|S_IWUSR,
309 265
310static struct device_attribute *display_sysfs_attrs[] = { 266static struct device_attribute *display_sysfs_attrs[] = {
311 &dev_attr_enabled, 267 &dev_attr_enabled,
312 &dev_attr_update_mode,
313 &dev_attr_tear_elim, 268 &dev_attr_tear_elim,
314 &dev_attr_timings, 269 &dev_attr_timings,
315 &dev_attr_rotate, 270 &dev_attr_rotate,
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 9aeea50e33f..18a1b9286c4 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -416,8 +416,6 @@ struct overlay_cache_data {
416 enum omap_burst_size burst_size; 416 enum omap_burst_size burst_size;
417 u32 fifo_low; 417 u32 fifo_low;
418 u32 fifo_high; 418 u32 fifo_high;
419
420 bool manual_update;
421}; 419};
422 420
423struct manager_cache_data { 421struct manager_cache_data {
@@ -437,7 +435,6 @@ struct manager_cache_data {
437 435
438 bool alpha_enabled; 436 bool alpha_enabled;
439 437
440 bool manual_upd_display;
441 bool manual_update; 438 bool manual_update;
442 bool do_manual_update; 439 bool do_manual_update;
443 440
@@ -539,24 +536,15 @@ static int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr)
539 if (!dssdev || dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) 536 if (!dssdev || dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
540 return 0; 537 return 0;
541 538
539 if (dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE)
540 return 0;
541
542 if (dssdev->type == OMAP_DISPLAY_TYPE_VENC 542 if (dssdev->type == OMAP_DISPLAY_TYPE_VENC
543 || dssdev->type == OMAP_DISPLAY_TYPE_HDMI) { 543 || dssdev->type == OMAP_DISPLAY_TYPE_HDMI) {
544 irq = DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN; 544 irq = DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN;
545 } else { 545 } else {
546 if (dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) { 546 irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
547 enum omap_dss_update_mode mode; 547 DISPC_IRQ_VSYNC : DISPC_IRQ_VSYNC2;
548 mode = dssdev->driver->get_update_mode(dssdev);
549 if (mode != OMAP_DSS_UPDATE_AUTO)
550 return 0;
551
552 irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
553 DISPC_IRQ_FRAMEDONE
554 : DISPC_IRQ_FRAMEDONE2;
555 } else {
556 irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
557 DISPC_IRQ_VSYNC
558 : DISPC_IRQ_VSYNC2;
559 }
560 } 548 }
561 549
562 mc = &dss_cache.manager_cache[mgr->id]; 550 mc = &dss_cache.manager_cache[mgr->id];
@@ -617,24 +605,15 @@ int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl)
617 if (!dssdev || dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) 605 if (!dssdev || dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
618 return 0; 606 return 0;
619 607
608 if (dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE)
609 return 0;
610
620 if (dssdev->type == OMAP_DISPLAY_TYPE_VENC 611 if (dssdev->type == OMAP_DISPLAY_TYPE_VENC
621 || dssdev->type == OMAP_DISPLAY_TYPE_HDMI) { 612 || dssdev->type == OMAP_DISPLAY_TYPE_HDMI) {
622 irq = DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN; 613 irq = DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN;
623 } else { 614 } else {
624 if (dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) { 615 irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
625 enum omap_dss_update_mode mode; 616 DISPC_IRQ_VSYNC : DISPC_IRQ_VSYNC2;
626 mode = dssdev->driver->get_update_mode(dssdev);
627 if (mode != OMAP_DSS_UPDATE_AUTO)
628 return 0;
629
630 irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
631 DISPC_IRQ_FRAMEDONE
632 : DISPC_IRQ_FRAMEDONE2;
633 } else {
634 irq = (dssdev->manager->id == OMAP_DSS_CHANNEL_LCD) ?
635 DISPC_IRQ_VSYNC
636 : DISPC_IRQ_VSYNC2;
637 }
638 } 617 }
639 618
640 oc = &dss_cache.overlay_cache[ovl->id]; 619 oc = &dss_cache.overlay_cache[ovl->id];
@@ -763,7 +742,7 @@ static int configure_overlay(enum omap_plane plane)
763 orig_outw = outw; 742 orig_outw = outw;
764 orig_outh = outh; 743 orig_outh = outh;
765 744
766 if (c->manual_update && mc->do_manual_update) { 745 if (mc->manual_update && mc->do_manual_update) {
767 unsigned bpp; 746 unsigned bpp;
768 unsigned scale_x_m = w, scale_x_d = outw; 747 unsigned scale_x_m = w, scale_x_d = outw;
769 unsigned scale_y_m = h, scale_y_d = outh; 748 unsigned scale_y_m = h, scale_y_d = outh;
@@ -928,7 +907,7 @@ static int configure_dispc(void)
928 if (!oc->dirty) 907 if (!oc->dirty)
929 continue; 908 continue;
930 909
931 if (oc->manual_update && !mc->do_manual_update) 910 if (mc->manual_update && !mc->do_manual_update)
932 continue; 911 continue;
933 912
934 if (mgr_busy[oc->channel]) { 913 if (mgr_busy[oc->channel]) {
@@ -976,7 +955,7 @@ static int configure_dispc(void)
976 /* We don't need GO with manual update display. LCD iface will 955 /* We don't need GO with manual update display. LCD iface will
977 * always be turned off after frame, and new settings will be 956 * always be turned off after frame, and new settings will be
978 * taken in to use at next update */ 957 * taken in to use at next update */
979 if (!mc->manual_upd_display) 958 if (!mc->manual_update)
980 dispc_go(i); 959 dispc_go(i);
981 } 960 }
982 961
@@ -1302,11 +1281,6 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
1302 1281
1303 oc->enabled = true; 1282 oc->enabled = true;
1304 1283
1305 oc->manual_update =
1306 dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE &&
1307 dssdev->driver->get_update_mode(dssdev) !=
1308 OMAP_DSS_UPDATE_AUTO;
1309
1310 ++num_planes_enabled; 1284 ++num_planes_enabled;
1311 } 1285 }
1312 1286
@@ -1341,13 +1315,8 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
1341 mc->trans_enabled = mgr->info.trans_enabled; 1315 mc->trans_enabled = mgr->info.trans_enabled;
1342 mc->alpha_enabled = mgr->info.alpha_enabled; 1316 mc->alpha_enabled = mgr->info.alpha_enabled;
1343 1317
1344 mc->manual_upd_display =
1345 dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
1346
1347 mc->manual_update = 1318 mc->manual_update =
1348 dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE && 1319 dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
1349 dssdev->driver->get_update_mode(dssdev) !=
1350 OMAP_DSS_UPDATE_AUTO;
1351 } 1320 }
1352 1321
1353 /* XXX TODO: Try to get fifomerge working. The problem is that it 1322 /* XXX TODO: Try to get fifomerge working. The problem is that it
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 980f919ed98..e7485fc41fc 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -538,20 +538,6 @@ static int venc_panel_resume(struct omap_dss_device *dssdev)
538 return venc_panel_enable(dssdev); 538 return venc_panel_enable(dssdev);
539} 539}
540 540
541static enum omap_dss_update_mode venc_get_update_mode(
542 struct omap_dss_device *dssdev)
543{
544 return OMAP_DSS_UPDATE_AUTO;
545}
546
547static int venc_set_update_mode(struct omap_dss_device *dssdev,
548 enum omap_dss_update_mode mode)
549{
550 if (mode != OMAP_DSS_UPDATE_AUTO)
551 return -EINVAL;
552 return 0;
553}
554
555static void venc_get_timings(struct omap_dss_device *dssdev, 541static void venc_get_timings(struct omap_dss_device *dssdev,
556 struct omap_video_timings *timings) 542 struct omap_video_timings *timings)
557{ 543{
@@ -632,9 +618,6 @@ static struct omap_dss_driver venc_driver = {
632 .get_resolution = omapdss_default_get_resolution, 618 .get_resolution = omapdss_default_get_resolution,
633 .get_recommended_bpp = omapdss_default_get_recommended_bpp, 619 .get_recommended_bpp = omapdss_default_get_recommended_bpp,
634 620
635 .set_update_mode = venc_set_update_mode,
636 .get_update_mode = venc_get_update_mode,
637
638 .get_timings = venc_get_timings, 621 .get_timings = venc_get_timings,
639 .set_timings = venc_set_timings, 622 .set_timings = venc_set_timings,
640 .check_timings = venc_check_timings, 623 .check_timings = venc_check_timings,