aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dss_features.c55
-rw-r--r--drivers/video/omap2/dss/dss_features.h1
-rw-r--r--drivers/video/omap2/dss/overlay.c4
3 files changed, 57 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index b415c4ee621d..6bf508de3c32 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -47,6 +47,7 @@ struct omap_dss_features {
47 const int num_ovls; 47 const int num_ovls;
48 const enum omap_display_type *supported_displays; 48 const enum omap_display_type *supported_displays;
49 const enum omap_color_mode *supported_color_modes; 49 const enum omap_color_mode *supported_color_modes;
50 const enum omap_overlay_caps *overlay_caps;
50 const char * const *clksrc_names; 51 const char * const *clksrc_names;
51 const struct dss_param_range *dss_params; 52 const struct dss_param_range *dss_params;
52 53
@@ -211,6 +212,50 @@ static const enum omap_color_mode omap4_dss_supported_color_modes[] = {
211 OMAP_DSS_COLOR_RGBX32, 212 OMAP_DSS_COLOR_RGBX32,
212}; 213};
213 214
215static const enum omap_overlay_caps omap2_dss_overlay_caps[] = {
216 /* OMAP_DSS_GFX */
217 0,
218
219 /* OMAP_DSS_VIDEO1 */
220 OMAP_DSS_OVL_CAP_SCALE,
221
222 /* OMAP_DSS_VIDEO2 */
223 OMAP_DSS_OVL_CAP_SCALE,
224};
225
226static const enum omap_overlay_caps omap3430_dss_overlay_caps[] = {
227 /* OMAP_DSS_GFX */
228 0,
229
230 /* OMAP_DSS_VIDEO1 */
231 OMAP_DSS_OVL_CAP_SCALE,
232
233 /* OMAP_DSS_VIDEO2 */
234 OMAP_DSS_OVL_CAP_SCALE,
235};
236
237static const enum omap_overlay_caps omap3630_dss_overlay_caps[] = {
238 /* OMAP_DSS_GFX */
239 0,
240
241 /* OMAP_DSS_VIDEO1 */
242 OMAP_DSS_OVL_CAP_SCALE,
243
244 /* OMAP_DSS_VIDEO2 */
245 OMAP_DSS_OVL_CAP_SCALE,
246};
247
248static const enum omap_overlay_caps omap4_dss_overlay_caps[] = {
249 /* OMAP_DSS_GFX */
250 0,
251
252 /* OMAP_DSS_VIDEO1 */
253 OMAP_DSS_OVL_CAP_SCALE,
254
255 /* OMAP_DSS_VIDEO2 */
256 OMAP_DSS_OVL_CAP_SCALE,
257};
258
214static const char * const omap2_dss_clk_source_names[] = { 259static const char * const omap2_dss_clk_source_names[] = {
215 [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "N/A", 260 [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "N/A",
216 [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "N/A", 261 [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "N/A",
@@ -275,6 +320,7 @@ static const struct omap_dss_features omap2_dss_features = {
275 .num_ovls = 3, 320 .num_ovls = 3,
276 .supported_displays = omap2_dss_supported_displays, 321 .supported_displays = omap2_dss_supported_displays,
277 .supported_color_modes = omap2_dss_supported_color_modes, 322 .supported_color_modes = omap2_dss_supported_color_modes,
323 .overlay_caps = omap2_dss_overlay_caps,
278 .clksrc_names = omap2_dss_clk_source_names, 324 .clksrc_names = omap2_dss_clk_source_names,
279 .dss_params = omap2_dss_param_range, 325 .dss_params = omap2_dss_param_range,
280 .buffer_size_unit = 1, 326 .buffer_size_unit = 1,
@@ -299,6 +345,7 @@ static const struct omap_dss_features omap3430_dss_features = {
299 .num_ovls = 3, 345 .num_ovls = 3,
300 .supported_displays = omap3430_dss_supported_displays, 346 .supported_displays = omap3430_dss_supported_displays,
301 .supported_color_modes = omap3_dss_supported_color_modes, 347 .supported_color_modes = omap3_dss_supported_color_modes,
348 .overlay_caps = omap3430_dss_overlay_caps,
302 .clksrc_names = omap3_dss_clk_source_names, 349 .clksrc_names = omap3_dss_clk_source_names,
303 .dss_params = omap3_dss_param_range, 350 .dss_params = omap3_dss_param_range,
304 .buffer_size_unit = 1, 351 .buffer_size_unit = 1,
@@ -322,6 +369,7 @@ static const struct omap_dss_features omap3630_dss_features = {
322 .num_ovls = 3, 369 .num_ovls = 3,
323 .supported_displays = omap3630_dss_supported_displays, 370 .supported_displays = omap3630_dss_supported_displays,
324 .supported_color_modes = omap3_dss_supported_color_modes, 371 .supported_color_modes = omap3_dss_supported_color_modes,
372 .overlay_caps = omap3630_dss_overlay_caps,
325 .clksrc_names = omap3_dss_clk_source_names, 373 .clksrc_names = omap3_dss_clk_source_names,
326 .dss_params = omap3_dss_param_range, 374 .dss_params = omap3_dss_param_range,
327 .buffer_size_unit = 1, 375 .buffer_size_unit = 1,
@@ -346,6 +394,7 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = {
346 .num_ovls = 3, 394 .num_ovls = 3,
347 .supported_displays = omap4_dss_supported_displays, 395 .supported_displays = omap4_dss_supported_displays,
348 .supported_color_modes = omap4_dss_supported_color_modes, 396 .supported_color_modes = omap4_dss_supported_color_modes,
397 .overlay_caps = omap4_dss_overlay_caps,
349 .clksrc_names = omap4_dss_clk_source_names, 398 .clksrc_names = omap4_dss_clk_source_names,
350 .dss_params = omap4_dss_param_range, 399 .dss_params = omap4_dss_param_range,
351 .buffer_size_unit = 16, 400 .buffer_size_unit = 16,
@@ -370,6 +419,7 @@ static const struct omap_dss_features omap4_dss_features = {
370 .num_ovls = 3, 419 .num_ovls = 3,
371 .supported_displays = omap4_dss_supported_displays, 420 .supported_displays = omap4_dss_supported_displays,
372 .supported_color_modes = omap4_dss_supported_color_modes, 421 .supported_color_modes = omap4_dss_supported_color_modes,
422 .overlay_caps = omap4_dss_overlay_caps,
373 .clksrc_names = omap4_dss_clk_source_names, 423 .clksrc_names = omap4_dss_clk_source_names,
374 .dss_params = omap4_dss_param_range, 424 .dss_params = omap4_dss_param_range,
375 .buffer_size_unit = 16, 425 .buffer_size_unit = 16,
@@ -407,6 +457,11 @@ enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane)
407 return omap_current_dss_features->supported_color_modes[plane]; 457 return omap_current_dss_features->supported_color_modes[plane];
408} 458}
409 459
460enum omap_overlay_caps dss_feat_get_overlay_caps(enum omap_plane plane)
461{
462 return omap_current_dss_features->overlay_caps[plane];
463}
464
410bool dss_feat_color_mode_supported(enum omap_plane plane, 465bool dss_feat_color_mode_supported(enum omap_plane plane,
411 enum omap_color_mode color_mode) 466 enum omap_color_mode color_mode)
412{ 467{
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index b7398cbcda5f..fd091967c950 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -90,6 +90,7 @@ unsigned long dss_feat_get_param_min(enum dss_range_param param);
90unsigned long dss_feat_get_param_max(enum dss_range_param param); 90unsigned long dss_feat_get_param_max(enum dss_range_param param);
91enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel); 91enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel);
92enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); 92enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane);
93enum omap_overlay_caps dss_feat_get_overlay_caps(enum omap_plane plane);
93bool dss_feat_color_mode_supported(enum omap_plane plane, 94bool dss_feat_color_mode_supported(enum omap_plane plane,
94 enum omap_color_mode color_mode); 95 enum omap_color_mode color_mode);
95const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id); 96const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id);
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index 0b21af95b48c..777e23690bd1 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -613,19 +613,16 @@ void dss_init_overlays(struct platform_device *pdev)
613 case 0: 613 case 0:
614 ovl->name = "gfx"; 614 ovl->name = "gfx";
615 ovl->id = OMAP_DSS_GFX; 615 ovl->id = OMAP_DSS_GFX;
616 ovl->caps = 0;
617 ovl->info.global_alpha = 255; 616 ovl->info.global_alpha = 255;
618 break; 617 break;
619 case 1: 618 case 1:
620 ovl->name = "vid1"; 619 ovl->name = "vid1";
621 ovl->id = OMAP_DSS_VIDEO1; 620 ovl->id = OMAP_DSS_VIDEO1;
622 ovl->caps = OMAP_DSS_OVL_CAP_SCALE;
623 ovl->info.global_alpha = 255; 621 ovl->info.global_alpha = 255;
624 break; 622 break;
625 case 2: 623 case 2:
626 ovl->name = "vid2"; 624 ovl->name = "vid2";
627 ovl->id = OMAP_DSS_VIDEO2; 625 ovl->id = OMAP_DSS_VIDEO2;
628 ovl->caps = OMAP_DSS_OVL_CAP_SCALE;
629 ovl->info.global_alpha = 255; 626 ovl->info.global_alpha = 255;
630 break; 627 break;
631 } 628 }
@@ -636,6 +633,7 @@ void dss_init_overlays(struct platform_device *pdev)
636 ovl->get_overlay_info = &dss_ovl_get_overlay_info; 633 ovl->get_overlay_info = &dss_ovl_get_overlay_info;
637 ovl->wait_for_go = &dss_ovl_wait_for_go; 634 ovl->wait_for_go = &dss_ovl_wait_for_go;
638 635
636 ovl->caps = dss_feat_get_overlay_caps(ovl->id);
639 ovl->supported_modes = 637 ovl->supported_modes =
640 dss_feat_get_supported_color_modes(ovl->id); 638 dss_feat_get_supported_color_modes(ovl->id);
641 639