diff options
Diffstat (limited to 'drivers/video/omap2/dss/dss_features.c')
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index ce14aa6dd67..938709724f0 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -52,6 +52,8 @@ struct omap_dss_features { | |||
52 | const char * const *clksrc_names; | 52 | const char * const *clksrc_names; |
53 | const struct dss_param_range *dss_params; | 53 | const struct dss_param_range *dss_params; |
54 | 54 | ||
55 | const enum omap_dss_rotation_type supported_rotation_types; | ||
56 | |||
55 | const u32 buffer_size_unit; | 57 | const u32 buffer_size_unit; |
56 | const u32 burst_size_unit; | 58 | const u32 burst_size_unit; |
57 | }; | 59 | }; |
@@ -311,6 +313,8 @@ static const struct dss_param_range omap2_dss_param_range[] = { | |||
311 | * scaler cannot scale a image with width more than 768. | 313 | * scaler cannot scale a image with width more than 768. |
312 | */ | 314 | */ |
313 | [FEAT_PARAM_LINEWIDTH] = { 1, 768 }, | 315 | [FEAT_PARAM_LINEWIDTH] = { 1, 768 }, |
316 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
317 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
314 | }; | 318 | }; |
315 | 319 | ||
316 | static const struct dss_param_range omap3_dss_param_range[] = { | 320 | static const struct dss_param_range omap3_dss_param_range[] = { |
@@ -324,6 +328,8 @@ static const struct dss_param_range omap3_dss_param_range[] = { | |||
324 | [FEAT_PARAM_DSIPLL_LPDIV] = { 1, (1 << 13) - 1}, | 328 | [FEAT_PARAM_DSIPLL_LPDIV] = { 1, (1 << 13) - 1}, |
325 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, | 329 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, |
326 | [FEAT_PARAM_LINEWIDTH] = { 1, 1024 }, | 330 | [FEAT_PARAM_LINEWIDTH] = { 1, 1024 }, |
331 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
332 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
327 | }; | 333 | }; |
328 | 334 | ||
329 | static const struct dss_param_range omap4_dss_param_range[] = { | 335 | static const struct dss_param_range omap4_dss_param_range[] = { |
@@ -337,6 +343,8 @@ static const struct dss_param_range omap4_dss_param_range[] = { | |||
337 | [FEAT_PARAM_DSIPLL_LPDIV] = { 0, (1 << 13) - 1 }, | 343 | [FEAT_PARAM_DSIPLL_LPDIV] = { 0, (1 << 13) - 1 }, |
338 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, | 344 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, |
339 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, | 345 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, |
346 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
347 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
340 | }; | 348 | }; |
341 | 349 | ||
342 | static const enum dss_feat_id omap2_dss_feat_list[] = { | 350 | static const enum dss_feat_id omap2_dss_feat_list[] = { |
@@ -399,6 +407,7 @@ static const enum dss_feat_id omap4430_es1_0_dss_feat_list[] = { | |||
399 | FEAT_FIR_COEF_V, | 407 | FEAT_FIR_COEF_V, |
400 | FEAT_ALPHA_FREE_ZORDER, | 408 | FEAT_ALPHA_FREE_ZORDER, |
401 | FEAT_FIFO_MERGE, | 409 | FEAT_FIFO_MERGE, |
410 | FEAT_BURST_2D, | ||
402 | }; | 411 | }; |
403 | 412 | ||
404 | static const enum dss_feat_id omap4430_es2_0_1_2_dss_feat_list[] = { | 413 | static const enum dss_feat_id omap4430_es2_0_1_2_dss_feat_list[] = { |
@@ -416,6 +425,7 @@ static const enum dss_feat_id omap4430_es2_0_1_2_dss_feat_list[] = { | |||
416 | FEAT_FIR_COEF_V, | 425 | FEAT_FIR_COEF_V, |
417 | FEAT_ALPHA_FREE_ZORDER, | 426 | FEAT_ALPHA_FREE_ZORDER, |
418 | FEAT_FIFO_MERGE, | 427 | FEAT_FIFO_MERGE, |
428 | FEAT_BURST_2D, | ||
419 | }; | 429 | }; |
420 | 430 | ||
421 | static const enum dss_feat_id omap4_dss_feat_list[] = { | 431 | static const enum dss_feat_id omap4_dss_feat_list[] = { |
@@ -434,6 +444,7 @@ static const enum dss_feat_id omap4_dss_feat_list[] = { | |||
434 | FEAT_FIR_COEF_V, | 444 | FEAT_FIR_COEF_V, |
435 | FEAT_ALPHA_FREE_ZORDER, | 445 | FEAT_ALPHA_FREE_ZORDER, |
436 | FEAT_FIFO_MERGE, | 446 | FEAT_FIFO_MERGE, |
447 | FEAT_BURST_2D, | ||
437 | }; | 448 | }; |
438 | 449 | ||
439 | /* OMAP2 DSS Features */ | 450 | /* OMAP2 DSS Features */ |
@@ -451,6 +462,7 @@ static const struct omap_dss_features omap2_dss_features = { | |||
451 | .overlay_caps = omap2_dss_overlay_caps, | 462 | .overlay_caps = omap2_dss_overlay_caps, |
452 | .clksrc_names = omap2_dss_clk_source_names, | 463 | .clksrc_names = omap2_dss_clk_source_names, |
453 | .dss_params = omap2_dss_param_range, | 464 | .dss_params = omap2_dss_param_range, |
465 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_VRFB, | ||
454 | .buffer_size_unit = 1, | 466 | .buffer_size_unit = 1, |
455 | .burst_size_unit = 8, | 467 | .burst_size_unit = 8, |
456 | }; | 468 | }; |
@@ -470,6 +482,7 @@ static const struct omap_dss_features omap3430_dss_features = { | |||
470 | .overlay_caps = omap3430_dss_overlay_caps, | 482 | .overlay_caps = omap3430_dss_overlay_caps, |
471 | .clksrc_names = omap3_dss_clk_source_names, | 483 | .clksrc_names = omap3_dss_clk_source_names, |
472 | .dss_params = omap3_dss_param_range, | 484 | .dss_params = omap3_dss_param_range, |
485 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_VRFB, | ||
473 | .buffer_size_unit = 1, | 486 | .buffer_size_unit = 1, |
474 | .burst_size_unit = 8, | 487 | .burst_size_unit = 8, |
475 | }; | 488 | }; |
@@ -488,6 +501,7 @@ static const struct omap_dss_features omap3630_dss_features = { | |||
488 | .overlay_caps = omap3630_dss_overlay_caps, | 501 | .overlay_caps = omap3630_dss_overlay_caps, |
489 | .clksrc_names = omap3_dss_clk_source_names, | 502 | .clksrc_names = omap3_dss_clk_source_names, |
490 | .dss_params = omap3_dss_param_range, | 503 | .dss_params = omap3_dss_param_range, |
504 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_VRFB, | ||
491 | .buffer_size_unit = 1, | 505 | .buffer_size_unit = 1, |
492 | .burst_size_unit = 8, | 506 | .burst_size_unit = 8, |
493 | }; | 507 | }; |
@@ -508,6 +522,7 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = { | |||
508 | .overlay_caps = omap4_dss_overlay_caps, | 522 | .overlay_caps = omap4_dss_overlay_caps, |
509 | .clksrc_names = omap4_dss_clk_source_names, | 523 | .clksrc_names = omap4_dss_clk_source_names, |
510 | .dss_params = omap4_dss_param_range, | 524 | .dss_params = omap4_dss_param_range, |
525 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_TILER, | ||
511 | .buffer_size_unit = 16, | 526 | .buffer_size_unit = 16, |
512 | .burst_size_unit = 16, | 527 | .burst_size_unit = 16, |
513 | }; | 528 | }; |
@@ -527,6 +542,7 @@ static const struct omap_dss_features omap4430_es2_0_1_2_dss_features = { | |||
527 | .overlay_caps = omap4_dss_overlay_caps, | 542 | .overlay_caps = omap4_dss_overlay_caps, |
528 | .clksrc_names = omap4_dss_clk_source_names, | 543 | .clksrc_names = omap4_dss_clk_source_names, |
529 | .dss_params = omap4_dss_param_range, | 544 | .dss_params = omap4_dss_param_range, |
545 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_TILER, | ||
530 | .buffer_size_unit = 16, | 546 | .buffer_size_unit = 16, |
531 | .burst_size_unit = 16, | 547 | .burst_size_unit = 16, |
532 | }; | 548 | }; |
@@ -546,6 +562,7 @@ static const struct omap_dss_features omap4_dss_features = { | |||
546 | .overlay_caps = omap4_dss_overlay_caps, | 562 | .overlay_caps = omap4_dss_overlay_caps, |
547 | .clksrc_names = omap4_dss_clk_source_names, | 563 | .clksrc_names = omap4_dss_clk_source_names, |
548 | .dss_params = omap4_dss_param_range, | 564 | .dss_params = omap4_dss_param_range, |
565 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_TILER, | ||
549 | .buffer_size_unit = 16, | 566 | .buffer_size_unit = 16, |
550 | .burst_size_unit = 16, | 567 | .burst_size_unit = 16, |
551 | }; | 568 | }; |
@@ -562,13 +579,17 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { | |||
562 | .pll_enable = ti_hdmi_4xxx_pll_enable, | 579 | .pll_enable = ti_hdmi_4xxx_pll_enable, |
563 | .pll_disable = ti_hdmi_4xxx_pll_disable, | 580 | .pll_disable = ti_hdmi_4xxx_pll_disable, |
564 | .video_enable = ti_hdmi_4xxx_wp_video_start, | 581 | .video_enable = ti_hdmi_4xxx_wp_video_start, |
582 | .video_disable = ti_hdmi_4xxx_wp_video_stop, | ||
565 | .dump_wrapper = ti_hdmi_4xxx_wp_dump, | 583 | .dump_wrapper = ti_hdmi_4xxx_wp_dump, |
566 | .dump_core = ti_hdmi_4xxx_core_dump, | 584 | .dump_core = ti_hdmi_4xxx_core_dump, |
567 | .dump_pll = ti_hdmi_4xxx_pll_dump, | 585 | .dump_pll = ti_hdmi_4xxx_pll_dump, |
568 | .dump_phy = ti_hdmi_4xxx_phy_dump, | 586 | .dump_phy = ti_hdmi_4xxx_phy_dump, |
569 | #if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ | 587 | #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) |
570 | defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) | ||
571 | .audio_enable = ti_hdmi_4xxx_wp_audio_enable, | 588 | .audio_enable = ti_hdmi_4xxx_wp_audio_enable, |
589 | .audio_disable = ti_hdmi_4xxx_wp_audio_disable, | ||
590 | .audio_start = ti_hdmi_4xxx_audio_start, | ||
591 | .audio_stop = ti_hdmi_4xxx_audio_stop, | ||
592 | .audio_config = ti_hdmi_4xxx_audio_config, | ||
572 | #endif | 593 | #endif |
573 | 594 | ||
574 | }; | 595 | }; |
@@ -662,6 +683,11 @@ void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end) | |||
662 | *end = omap_current_dss_features->reg_fields[id].end; | 683 | *end = omap_current_dss_features->reg_fields[id].end; |
663 | } | 684 | } |
664 | 685 | ||
686 | bool dss_feat_rotation_type_supported(enum omap_dss_rotation_type rot_type) | ||
687 | { | ||
688 | return omap_current_dss_features->supported_rotation_types & rot_type; | ||
689 | } | ||
690 | |||
665 | void dss_features_init(void) | 691 | void dss_features_init(void) |
666 | { | 692 | { |
667 | if (cpu_is_omap24xx()) | 693 | if (cpu_is_omap24xx()) |