aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-omap/include/plat/display.h31
-rw-r--r--drivers/video/omap2/dss/core.c3
-rw-r--r--drivers/video/omap2/dss/dispc.c56
-rw-r--r--drivers/video/omap2/dss/manager.c33
-rw-r--r--drivers/video/omap2/dss/overlay.c24
5 files changed, 60 insertions, 87 deletions
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
index 8bd15bdb4132..c915a661f1f5 100644
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -81,37 +81,6 @@ enum omap_color_mode {
81 OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */ 81 OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
82 OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */ 82 OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
83 OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */ 83 OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */
84
85 OMAP_DSS_COLOR_GFX_OMAP2 =
86 OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
87 OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
88 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
89 OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P,
90
91 OMAP_DSS_COLOR_VID_OMAP2 =
92 OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
93 OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
94 OMAP_DSS_COLOR_UYVY,
95
96 OMAP_DSS_COLOR_GFX_OMAP3 =
97 OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
98 OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
99 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
100 OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
101 OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
102 OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,
103
104 OMAP_DSS_COLOR_VID1_OMAP3 =
105 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
106 OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
107 OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
108
109 OMAP_DSS_COLOR_VID2_OMAP3 =
110 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
111 OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
112 OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
113 OMAP_DSS_COLOR_UYVY | OMAP_DSS_COLOR_ARGB32 |
114 OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,
115}; 84};
116 85
117enum omap_lcd_display_type { 86enum omap_lcd_display_type {
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index b3a498f22d36..8e89f6049280 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -37,6 +37,7 @@
37#include <plat/clock.h> 37#include <plat/clock.h>
38 38
39#include "dss.h" 39#include "dss.h"
40#include "dss_features.h"
40 41
41static struct { 42static struct {
42 struct platform_device *pdev; 43 struct platform_device *pdev;
@@ -502,6 +503,8 @@ static int omap_dss_probe(struct platform_device *pdev)
502 503
503 core.pdev = pdev; 504 core.pdev = pdev;
504 505
506 dss_features_init();
507
505 dss_init_overlay_managers(pdev); 508 dss_init_overlay_managers(pdev);
506 dss_init_overlays(pdev); 509 dss_init_overlays(pdev);
507 510
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 90eb11083cc7..fa40fa59a9ac 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -39,6 +39,7 @@
39#include <plat/display.h> 39#include <plat/display.h>
40 40
41#include "dss.h" 41#include "dss.h"
42#include "dss_features.h"
42 43
43/* DISPC */ 44/* DISPC */
44#define DISPC_BASE 0x48050400 45#define DISPC_BASE 0x48050400
@@ -774,12 +775,12 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
774 775
775static void _dispc_setup_global_alpha(enum omap_plane plane, u8 global_alpha) 776static void _dispc_setup_global_alpha(enum omap_plane plane, u8 global_alpha)
776{ 777{
777 778 if (!dss_has_feature(FEAT_GLOBAL_ALPHA))
778 BUG_ON(plane == OMAP_DSS_VIDEO1);
779
780 if (cpu_is_omap24xx())
781 return; 779 return;
782 780
781 BUG_ON(!dss_has_feature(FEAT_GLOBAL_ALPHA_VID1) &&
782 plane == OMAP_DSS_VIDEO1);
783
783 if (plane == OMAP_DSS_GFX) 784 if (plane == OMAP_DSS_GFX)
784 REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 7, 0); 785 REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 7, 0);
785 else if (plane == OMAP_DSS_VIDEO2) 786 else if (plane == OMAP_DSS_VIDEO2)
@@ -949,17 +950,14 @@ static void dispc_read_plane_fifo_sizes(void)
949 DISPC_VID_FIFO_SIZE_STATUS(1) }; 950 DISPC_VID_FIFO_SIZE_STATUS(1) };
950 u32 size; 951 u32 size;
951 int plane; 952 int plane;
953 u8 start, end;
952 954
953 enable_clocks(1); 955 enable_clocks(1);
954 956
955 for (plane = 0; plane < ARRAY_SIZE(dispc.fifo_size); ++plane) { 957 dss_feat_get_reg_field(FEAT_REG_FIFOSIZE, &start, &end);
956 if (cpu_is_omap24xx())
957 size = FLD_GET(dispc_read_reg(fsz_reg[plane]), 8, 0);
958 else if (cpu_is_omap34xx())
959 size = FLD_GET(dispc_read_reg(fsz_reg[plane]), 10, 0);
960 else
961 BUG();
962 958
959 for (plane = 0; plane < ARRAY_SIZE(dispc.fifo_size); ++plane) {
960 size = FLD_GET(dispc_read_reg(fsz_reg[plane]), start, end);
963 dispc.fifo_size[plane] = size; 961 dispc.fifo_size[plane] = size;
964 } 962 }
965 963
@@ -976,6 +974,8 @@ void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high)
976 const struct dispc_reg ftrs_reg[] = { DISPC_GFX_FIFO_THRESHOLD, 974 const struct dispc_reg ftrs_reg[] = { DISPC_GFX_FIFO_THRESHOLD,
977 DISPC_VID_FIFO_THRESHOLD(0), 975 DISPC_VID_FIFO_THRESHOLD(0),
978 DISPC_VID_FIFO_THRESHOLD(1) }; 976 DISPC_VID_FIFO_THRESHOLD(1) };
977 u8 hi_start, hi_end, lo_start, lo_end;
978
979 enable_clocks(1); 979 enable_clocks(1);
980 980
981 DSSDBG("fifo(%d) low/high old %u/%u, new %u/%u\n", 981 DSSDBG("fifo(%d) low/high old %u/%u, new %u/%u\n",
@@ -984,12 +984,12 @@ void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high)
984 REG_GET(ftrs_reg[plane], 27, 16), 984 REG_GET(ftrs_reg[plane], 27, 16),
985 low, high); 985 low, high);
986 986
987 if (cpu_is_omap24xx()) 987 dss_feat_get_reg_field(FEAT_REG_FIFOHIGHTHRESHOLD, &hi_start, &hi_end);
988 dispc_write_reg(ftrs_reg[plane], 988 dss_feat_get_reg_field(FEAT_REG_FIFOLOWTHRESHOLD, &lo_start, &lo_end);
989 FLD_VAL(high, 24, 16) | FLD_VAL(low, 8, 0)); 989
990 else 990 dispc_write_reg(ftrs_reg[plane],
991 dispc_write_reg(ftrs_reg[plane], 991 FLD_VAL(high, hi_start, hi_end) |
992 FLD_VAL(high, 27, 16) | FLD_VAL(low, 11, 0)); 992 FLD_VAL(low, lo_start, lo_end));
993 993
994 enable_clocks(0); 994 enable_clocks(0);
995} 995}
@@ -1009,13 +1009,16 @@ static void _dispc_set_fir(enum omap_plane plane, int hinc, int vinc)
1009 u32 val; 1009 u32 val;
1010 const struct dispc_reg fir_reg[] = { DISPC_VID_FIR(0), 1010 const struct dispc_reg fir_reg[] = { DISPC_VID_FIR(0),
1011 DISPC_VID_FIR(1) }; 1011 DISPC_VID_FIR(1) };
1012 u8 hinc_start, hinc_end, vinc_start, vinc_end;
1012 1013
1013 BUG_ON(plane == OMAP_DSS_GFX); 1014 BUG_ON(plane == OMAP_DSS_GFX);
1014 1015
1015 if (cpu_is_omap24xx()) 1016 dss_feat_get_reg_field(FEAT_REG_FIRHINC, &hinc_start, &hinc_end);
1016 val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0); 1017 dss_feat_get_reg_field(FEAT_REG_FIRVINC, &vinc_start, &vinc_end);
1017 else 1018
1018 val = FLD_VAL(vinc, 28, 16) | FLD_VAL(hinc, 12, 0); 1019 val = FLD_VAL(vinc, vinc_start, vinc_end) |
1020 FLD_VAL(hinc, hinc_start, hinc_end);
1021
1019 dispc_write_reg(fir_reg[plane-1], val); 1022 dispc_write_reg(fir_reg[plane-1], val);
1020} 1023}
1021 1024
@@ -1541,6 +1544,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
1541 case OMAP_DSS_COLOR_ARGB16: 1544 case OMAP_DSS_COLOR_ARGB16:
1542 case OMAP_DSS_COLOR_ARGB32: 1545 case OMAP_DSS_COLOR_ARGB32:
1543 case OMAP_DSS_COLOR_RGBA32: 1546 case OMAP_DSS_COLOR_RGBA32:
1547 if (!dss_has_feature(FEAT_GLOBAL_ALPHA))
1548 return -EINVAL;
1544 case OMAP_DSS_COLOR_RGBX32: 1549 case OMAP_DSS_COLOR_RGBX32:
1545 if (cpu_is_omap24xx()) 1550 if (cpu_is_omap24xx())
1546 return -EINVAL; 1551 return -EINVAL;
@@ -1581,9 +1586,10 @@ static int _dispc_setup_plane(enum omap_plane plane,
1581 case OMAP_DSS_COLOR_ARGB16: 1586 case OMAP_DSS_COLOR_ARGB16:
1582 case OMAP_DSS_COLOR_ARGB32: 1587 case OMAP_DSS_COLOR_ARGB32:
1583 case OMAP_DSS_COLOR_RGBA32: 1588 case OMAP_DSS_COLOR_RGBA32:
1584 if (cpu_is_omap24xx()) 1589 if (!dss_has_feature(FEAT_GLOBAL_ALPHA))
1585 return -EINVAL; 1590 return -EINVAL;
1586 if (plane == OMAP_DSS_VIDEO1) 1591 if (!dss_has_feature(FEAT_GLOBAL_ALPHA_VID1) &&
1592 plane == OMAP_DSS_VIDEO1)
1587 return -EINVAL; 1593 return -EINVAL;
1588 break; 1594 break;
1589 1595
@@ -1976,7 +1982,7 @@ void dispc_enable_trans_key(enum omap_channel ch, bool enable)
1976} 1982}
1977void dispc_enable_alpha_blending(enum omap_channel ch, bool enable) 1983void dispc_enable_alpha_blending(enum omap_channel ch, bool enable)
1978{ 1984{
1979 if (cpu_is_omap24xx()) 1985 if (!dss_has_feature(FEAT_GLOBAL_ALPHA))
1980 return; 1986 return;
1981 1987
1982 enable_clocks(1); 1988 enable_clocks(1);
@@ -1990,7 +1996,7 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
1990{ 1996{
1991 bool enabled; 1997 bool enabled;
1992 1998
1993 if (cpu_is_omap24xx()) 1999 if (!dss_has_feature(FEAT_GLOBAL_ALPHA))
1994 return false; 2000 return false;
1995 2001
1996 enable_clocks(1); 2002 enable_clocks(1);
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 6a649ab5539e..545e9b9a4d92 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -33,6 +33,7 @@
33#include <plat/cpu.h> 33#include <plat/cpu.h>
34 34
35#include "dss.h" 35#include "dss.h"
36#include "dss_features.h"
36 37
37static int num_managers; 38static int num_managers;
38static struct list_head manager_list; 39static struct list_head manager_list;
@@ -448,8 +449,8 @@ struct manager_cache_data {
448 449
449static struct { 450static struct {
450 spinlock_t lock; 451 spinlock_t lock;
451 struct overlay_cache_data overlay_cache[3]; 452 struct overlay_cache_data overlay_cache[MAX_DSS_OVERLAYS];
452 struct manager_cache_data manager_cache[2]; 453 struct manager_cache_data manager_cache[MAX_DSS_MANAGERS];
453 454
454 bool irq_enabled; 455 bool irq_enabled;
455} dss_cache; 456} dss_cache;
@@ -882,12 +883,12 @@ static int configure_dispc(void)
882{ 883{
883 struct overlay_cache_data *oc; 884 struct overlay_cache_data *oc;
884 struct manager_cache_data *mc; 885 struct manager_cache_data *mc;
885 const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); 886 const int num_ovls = dss_feat_get_num_ovls();
886 const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); 887 const int num_mgrs = dss_feat_get_num_mgrs();
887 int i; 888 int i;
888 int r; 889 int r;
889 bool mgr_busy[2]; 890 bool mgr_busy[MAX_DSS_MANAGERS];
890 bool mgr_go[2]; 891 bool mgr_go[MAX_DSS_MANAGERS];
891 bool busy; 892 bool busy;
892 893
893 r = 0; 894 r = 0;
@@ -989,7 +990,7 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev,
989{ 990{
990 struct overlay_cache_data *oc; 991 struct overlay_cache_data *oc;
991 struct manager_cache_data *mc; 992 struct manager_cache_data *mc;
992 const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); 993 const int num_ovls = dss_feat_get_num_ovls();
993 struct omap_overlay_manager *mgr; 994 struct omap_overlay_manager *mgr;
994 int i; 995 int i;
995 u16 x, y, w, h; 996 u16 x, y, w, h;
@@ -1121,8 +1122,8 @@ void dss_start_update(struct omap_dss_device *dssdev)
1121{ 1122{
1122 struct manager_cache_data *mc; 1123 struct manager_cache_data *mc;
1123 struct overlay_cache_data *oc; 1124 struct overlay_cache_data *oc;
1124 const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); 1125 const int num_ovls = dss_feat_get_num_ovls();
1125 const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); 1126 const int num_mgrs = dss_feat_get_num_mgrs();
1126 struct omap_overlay_manager *mgr; 1127 struct omap_overlay_manager *mgr;
1127 int i; 1128 int i;
1128 1129
@@ -1151,10 +1152,10 @@ static void dss_apply_irq_handler(void *data, u32 mask)
1151{ 1152{
1152 struct manager_cache_data *mc; 1153 struct manager_cache_data *mc;
1153 struct overlay_cache_data *oc; 1154 struct overlay_cache_data *oc;
1154 const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); 1155 const int num_ovls = dss_feat_get_num_ovls();
1155 const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); 1156 const int num_mgrs = dss_feat_get_num_mgrs();
1156 int i, r; 1157 int i, r;
1157 bool mgr_busy[2]; 1158 bool mgr_busy[MAX_DSS_MANAGERS];
1158 1159
1159 mgr_busy[0] = dispc_go_busy(0); 1160 mgr_busy[0] = dispc_go_busy(0);
1160 mgr_busy[1] = dispc_go_busy(1); 1161 mgr_busy[1] = dispc_go_busy(1);
@@ -1461,7 +1462,7 @@ int dss_init_overlay_managers(struct platform_device *pdev)
1461 1462
1462 num_managers = 0; 1463 num_managers = 0;
1463 1464
1464 for (i = 0; i < 2; ++i) { 1465 for (i = 0; i < dss_feat_get_num_mgrs(); ++i) {
1465 struct omap_overlay_manager *mgr; 1466 struct omap_overlay_manager *mgr;
1466 mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); 1467 mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
1467 1468
@@ -1471,14 +1472,10 @@ int dss_init_overlay_managers(struct platform_device *pdev)
1471 case 0: 1472 case 0:
1472 mgr->name = "lcd"; 1473 mgr->name = "lcd";
1473 mgr->id = OMAP_DSS_CHANNEL_LCD; 1474 mgr->id = OMAP_DSS_CHANNEL_LCD;
1474 mgr->supported_displays =
1475 OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI |
1476 OMAP_DISPLAY_TYPE_SDI | OMAP_DISPLAY_TYPE_DSI;
1477 break; 1475 break;
1478 case 1: 1476 case 1:
1479 mgr->name = "tv"; 1477 mgr->name = "tv";
1480 mgr->id = OMAP_DSS_CHANNEL_DIGIT; 1478 mgr->id = OMAP_DSS_CHANNEL_DIGIT;
1481 mgr->supported_displays = OMAP_DISPLAY_TYPE_VENC;
1482 break; 1479 break;
1483 } 1480 }
1484 1481
@@ -1494,6 +1491,8 @@ int dss_init_overlay_managers(struct platform_device *pdev)
1494 mgr->disable = &dss_mgr_disable; 1491 mgr->disable = &dss_mgr_disable;
1495 1492
1496 mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC; 1493 mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC;
1494 mgr->supported_displays =
1495 dss_feat_get_supported_displays(mgr->id);
1497 1496
1498 dss_overlay_setup_dispc_manager(mgr); 1497 dss_overlay_setup_dispc_manager(mgr);
1499 1498
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index 244dca81a399..75642c22cac7 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -35,6 +35,7 @@
35#include <plat/cpu.h> 35#include <plat/cpu.h>
36 36
37#include "dss.h" 37#include "dss.h"
38#include "dss_features.h"
38 39
39static int num_overlays; 40static int num_overlays;
40static struct list_head overlay_list; 41static struct list_head overlay_list;
@@ -237,7 +238,8 @@ static ssize_t overlay_global_alpha_store(struct omap_overlay *ovl,
237 /* Video1 plane does not support global alpha 238 /* Video1 plane does not support global alpha
238 * to always make it 255 completely opaque 239 * to always make it 255 completely opaque
239 */ 240 */
240 if (ovl->id == OMAP_DSS_VIDEO1) 241 if (!dss_has_feature(FEAT_GLOBAL_ALPHA_VID1) &&
242 ovl->id == OMAP_DSS_VIDEO1)
241 info.global_alpha = 255; 243 info.global_alpha = 255;
242 else 244 else
243 info.global_alpha = simple_strtoul(buf, NULL, 10); 245 info.global_alpha = simple_strtoul(buf, NULL, 10);
@@ -510,11 +512,11 @@ static void omap_dss_add_overlay(struct omap_overlay *overlay)
510 list_add_tail(&overlay->list, &overlay_list); 512 list_add_tail(&overlay->list, &overlay_list);
511} 513}
512 514
513static struct omap_overlay *dispc_overlays[3]; 515static struct omap_overlay *dispc_overlays[MAX_DSS_OVERLAYS];
514 516
515void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr) 517void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr)
516{ 518{
517 mgr->num_overlays = 3; 519 mgr->num_overlays = dss_feat_get_num_ovls();
518 mgr->overlays = dispc_overlays; 520 mgr->overlays = dispc_overlays;
519} 521}
520 522
@@ -535,7 +537,7 @@ void dss_init_overlays(struct platform_device *pdev)
535 537
536 num_overlays = 0; 538 num_overlays = 0;
537 539
538 for (i = 0; i < 3; ++i) { 540 for (i = 0; i < dss_feat_get_num_ovls(); ++i) {
539 struct omap_overlay *ovl; 541 struct omap_overlay *ovl;
540 ovl = kzalloc(sizeof(*ovl), GFP_KERNEL); 542 ovl = kzalloc(sizeof(*ovl), GFP_KERNEL);
541 543
@@ -545,18 +547,12 @@ void dss_init_overlays(struct platform_device *pdev)
545 case 0: 547 case 0:
546 ovl->name = "gfx"; 548 ovl->name = "gfx";
547 ovl->id = OMAP_DSS_GFX; 549 ovl->id = OMAP_DSS_GFX;
548 ovl->supported_modes = cpu_is_omap34xx() ?
549 OMAP_DSS_COLOR_GFX_OMAP3 :
550 OMAP_DSS_COLOR_GFX_OMAP2;
551 ovl->caps = OMAP_DSS_OVL_CAP_DISPC; 550 ovl->caps = OMAP_DSS_OVL_CAP_DISPC;
552 ovl->info.global_alpha = 255; 551 ovl->info.global_alpha = 255;
553 break; 552 break;
554 case 1: 553 case 1:
555 ovl->name = "vid1"; 554 ovl->name = "vid1";
556 ovl->id = OMAP_DSS_VIDEO1; 555 ovl->id = OMAP_DSS_VIDEO1;
557 ovl->supported_modes = cpu_is_omap34xx() ?
558 OMAP_DSS_COLOR_VID1_OMAP3 :
559 OMAP_DSS_COLOR_VID_OMAP2;
560 ovl->caps = OMAP_DSS_OVL_CAP_SCALE | 556 ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
561 OMAP_DSS_OVL_CAP_DISPC; 557 OMAP_DSS_OVL_CAP_DISPC;
562 ovl->info.global_alpha = 255; 558 ovl->info.global_alpha = 255;
@@ -564,9 +560,6 @@ void dss_init_overlays(struct platform_device *pdev)
564 case 2: 560 case 2:
565 ovl->name = "vid2"; 561 ovl->name = "vid2";
566 ovl->id = OMAP_DSS_VIDEO2; 562 ovl->id = OMAP_DSS_VIDEO2;
567 ovl->supported_modes = cpu_is_omap34xx() ?
568 OMAP_DSS_COLOR_VID2_OMAP3 :
569 OMAP_DSS_COLOR_VID_OMAP2;
570 ovl->caps = OMAP_DSS_OVL_CAP_SCALE | 563 ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
571 OMAP_DSS_OVL_CAP_DISPC; 564 OMAP_DSS_OVL_CAP_DISPC;
572 ovl->info.global_alpha = 255; 565 ovl->info.global_alpha = 255;
@@ -579,6 +572,9 @@ void dss_init_overlays(struct platform_device *pdev)
579 ovl->get_overlay_info = &dss_ovl_get_overlay_info; 572 ovl->get_overlay_info = &dss_ovl_get_overlay_info;
580 ovl->wait_for_go = &dss_ovl_wait_for_go; 573 ovl->wait_for_go = &dss_ovl_wait_for_go;
581 574
575 ovl->supported_modes =
576 dss_feat_get_supported_color_modes(ovl->id);
577
582 omap_dss_add_overlay(ovl); 578 omap_dss_add_overlay(ovl);
583 579
584 r = kobject_init_and_add(&ovl->kobj, &overlay_ktype, 580 r = kobject_init_and_add(&ovl->kobj, &overlay_ktype,
@@ -651,7 +647,7 @@ void dss_recheck_connections(struct omap_dss_device *dssdev, bool force)
651 } 647 }
652 648
653 if (mgr) { 649 if (mgr) {
654 for (i = 0; i < 3; i++) { 650 for (i = 0; i < dss_feat_get_num_ovls(); i++) {
655 struct omap_overlay *ovl; 651 struct omap_overlay *ovl;
656 ovl = omap_dss_get_overlay(i); 652 ovl = omap_dss_get_overlay(i);
657 if (!ovl->manager || force) { 653 if (!ovl->manager || force) {