20 #include <linux/kernel.h>
21 #include <linux/types.h>
23 #include <linux/slab.h>
234 static const enum omap_color_mode omap2_dss_supported_color_modes[] = {
252 static const enum omap_color_mode omap3_dss_supported_color_modes[] = {
274 static const enum omap_color_mode omap4_dss_supported_color_modes[] = {
390 static const char *
const omap2_dss_clk_source_names[] = {
396 static const char *
const omap3_dss_clk_source_names[] = {
402 static const char *
const omap4_dss_clk_source_names[] = {
410 static const char *
const omap5_dss_clk_source_names[] = {
485 static const enum dss_feat_id omap2_dss_feat_list[] = {
494 static const enum dss_feat_id omap3430_dss_feat_list[] = {
514 static const enum dss_feat_id am35xx_dss_feat_list[] = {
533 static const enum dss_feat_id omap3630_dss_feat_list[] = {
551 static const enum dss_feat_id omap4430_es1_0_dss_feat_list[] = {
568 static const enum dss_feat_id omap4430_es2_0_1_2_dss_feat_list[] = {
586 static const enum dss_feat_id omap4_dss_feat_list[] = {
605 static const enum dss_feat_id omap5_dss_feat_list[] = {
629 .reg_fields = omap2_dss_reg_fields,
630 .num_reg_fields =
ARRAY_SIZE(omap2_dss_reg_fields),
632 .features = omap2_dss_feat_list,
633 .num_features =
ARRAY_SIZE(omap2_dss_feat_list),
637 .supported_displays = omap2_dss_supported_displays,
638 .supported_outputs = omap2_dss_supported_outputs,
639 .supported_color_modes = omap2_dss_supported_color_modes,
640 .overlay_caps = omap2_dss_overlay_caps,
641 .clksrc_names = omap2_dss_clk_source_names,
642 .dss_params = omap2_dss_param_range,
644 .buffer_size_unit = 1,
645 .burst_size_unit = 8,
650 .reg_fields = omap3_dss_reg_fields,
651 .num_reg_fields =
ARRAY_SIZE(omap3_dss_reg_fields),
653 .features = omap3430_dss_feat_list,
654 .num_features =
ARRAY_SIZE(omap3430_dss_feat_list),
658 .supported_displays = omap3430_dss_supported_displays,
659 .supported_outputs = omap3430_dss_supported_outputs,
660 .supported_color_modes = omap3_dss_supported_color_modes,
661 .overlay_caps = omap3430_dss_overlay_caps,
662 .clksrc_names = omap3_dss_clk_source_names,
663 .dss_params = omap3_dss_param_range,
665 .buffer_size_unit = 1,
666 .burst_size_unit = 8,
674 .reg_fields = omap3_dss_reg_fields,
675 .num_reg_fields =
ARRAY_SIZE(omap3_dss_reg_fields),
677 .features = am35xx_dss_feat_list,
678 .num_features =
ARRAY_SIZE(am35xx_dss_feat_list),
682 .supported_displays = omap3430_dss_supported_displays,
683 .supported_outputs = omap3430_dss_supported_outputs,
684 .supported_color_modes = omap3_dss_supported_color_modes,
685 .overlay_caps = omap3430_dss_overlay_caps,
686 .clksrc_names = omap3_dss_clk_source_names,
687 .dss_params = omap3_dss_param_range,
689 .buffer_size_unit = 1,
690 .burst_size_unit = 8,
694 .reg_fields = omap3_dss_reg_fields,
695 .num_reg_fields =
ARRAY_SIZE(omap3_dss_reg_fields),
697 .features = omap3630_dss_feat_list,
698 .num_features =
ARRAY_SIZE(omap3630_dss_feat_list),
702 .supported_displays = omap3630_dss_supported_displays,
703 .supported_outputs = omap3630_dss_supported_outputs,
704 .supported_color_modes = omap3_dss_supported_color_modes,
705 .overlay_caps = omap3630_dss_overlay_caps,
706 .clksrc_names = omap3_dss_clk_source_names,
707 .dss_params = omap3_dss_param_range,
709 .buffer_size_unit = 1,
710 .burst_size_unit = 8,
716 .reg_fields = omap4_dss_reg_fields,
717 .num_reg_fields =
ARRAY_SIZE(omap4_dss_reg_fields),
719 .features = omap4430_es1_0_dss_feat_list,
720 .num_features =
ARRAY_SIZE(omap4430_es1_0_dss_feat_list),
725 .supported_displays = omap4_dss_supported_displays,
726 .supported_outputs = omap4_dss_supported_outputs,
727 .supported_color_modes = omap4_dss_supported_color_modes,
728 .overlay_caps = omap4_dss_overlay_caps,
729 .clksrc_names = omap4_dss_clk_source_names,
730 .dss_params = omap4_dss_param_range,
732 .buffer_size_unit = 16,
733 .burst_size_unit = 16,
738 .reg_fields = omap4_dss_reg_fields,
739 .num_reg_fields =
ARRAY_SIZE(omap4_dss_reg_fields),
741 .features = omap4430_es2_0_1_2_dss_feat_list,
742 .num_features =
ARRAY_SIZE(omap4430_es2_0_1_2_dss_feat_list),
747 .supported_displays = omap4_dss_supported_displays,
748 .supported_outputs = omap4_dss_supported_outputs,
749 .supported_color_modes = omap4_dss_supported_color_modes,
750 .overlay_caps = omap4_dss_overlay_caps,
751 .clksrc_names = omap4_dss_clk_source_names,
752 .dss_params = omap4_dss_param_range,
754 .buffer_size_unit = 16,
755 .burst_size_unit = 16,
760 .reg_fields = omap4_dss_reg_fields,
761 .num_reg_fields =
ARRAY_SIZE(omap4_dss_reg_fields),
763 .features = omap4_dss_feat_list,
764 .num_features =
ARRAY_SIZE(omap4_dss_feat_list),
769 .supported_displays = omap4_dss_supported_displays,
770 .supported_outputs = omap4_dss_supported_outputs,
771 .supported_color_modes = omap4_dss_supported_color_modes,
772 .overlay_caps = omap4_dss_overlay_caps,
773 .clksrc_names = omap4_dss_clk_source_names,
774 .dss_params = omap4_dss_param_range,
776 .buffer_size_unit = 16,
777 .burst_size_unit = 16,
782 .reg_fields = omap5_dss_reg_fields,
783 .num_reg_fields =
ARRAY_SIZE(omap5_dss_reg_fields),
785 .features = omap5_dss_feat_list,
786 .num_features =
ARRAY_SIZE(omap5_dss_feat_list),
790 .supported_displays = omap5_dss_supported_displays,
791 .supported_outputs = omap5_dss_supported_outputs,
792 .supported_color_modes = omap4_dss_supported_color_modes,
793 .overlay_caps = omap4_dss_overlay_caps,
794 .clksrc_names = omap5_dss_clk_source_names,
795 .dss_params = omap5_dss_param_range,
797 .buffer_size_unit = 16,
798 .burst_size_unit = 16,
801 #if defined(CONFIG_OMAP4_DSS_HDMI)
818 #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
819 .audio_enable = ti_hdmi_4xxx_wp_audio_enable,
820 .audio_disable = ti_hdmi_4xxx_wp_audio_disable,
821 .audio_start = ti_hdmi_4xxx_audio_start,
822 .audio_stop = ti_hdmi_4xxx_audio_stop,
823 .audio_config = ti_hdmi_4xxx_audio_config,
831 ip_data->
ops = &omap4_hdmi_functions;
838 return omap_current_dss_features->
num_mgrs;
843 return omap_current_dss_features->
num_ovls;
848 return omap_current_dss_features->
num_wbs;
908 const int num_features = omap_current_dss_features->
num_features;
910 for (i = 0; i < num_features; i++) {
911 if (features[i] ==
id)
923 *start = omap_current_dss_features->
reg_fields[
id].start;
935 omap_current_dss_features = &omap2_dss_features;
937 omap_current_dss_features = &omap3630_dss_features;
940 omap_current_dss_features = &am35xx_dss_features;
942 omap_current_dss_features = &omap3430_dss_features;
946 omap_current_dss_features = &omap4430_es1_0_dss_features;
950 omap_current_dss_features = &omap4430_es2_0_1_2_dss_features;
952 omap_current_dss_features = &omap4_dss_features;
954 omap_current_dss_features = &omap5_dss_features;
956 DSSWARN(
"Unsupported OMAP version");