aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/dss_features.c')
-rw-r--r--drivers/video/omap2/dss/dss_features.c64
1 files changed, 44 insertions, 20 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index acbc1e1efba3..3e8287c8709d 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -23,7 +23,6 @@
23#include <linux/slab.h> 23#include <linux/slab.h>
24 24
25#include <video/omapdss.h> 25#include <video/omapdss.h>
26#include <plat/cpu.h>
27 26
28#include "dss.h" 27#include "dss.h"
29#include "dss_features.h" 28#include "dss_features.h"
@@ -825,10 +824,20 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
825 824
826}; 825};
827 826
828void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data) 827void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data,
828 enum omapdss_version version)
829{ 829{
830 if (cpu_is_omap44xx()) 830 switch (version) {
831 case OMAPDSS_VER_OMAP4430_ES1:
832 case OMAPDSS_VER_OMAP4430_ES2:
833 case OMAPDSS_VER_OMAP4:
831 ip_data->ops = &omap4_hdmi_functions; 834 ip_data->ops = &omap4_hdmi_functions;
835 break;
836 default:
837 ip_data->ops = NULL;
838 }
839
840 WARN_ON(ip_data->ops == NULL);
832} 841}
833#endif 842#endif
834 843
@@ -929,29 +938,44 @@ bool dss_feat_rotation_type_supported(enum omap_dss_rotation_type rot_type)
929 return omap_current_dss_features->supported_rotation_types & rot_type; 938 return omap_current_dss_features->supported_rotation_types & rot_type;
930} 939}
931 940
932void dss_features_init(void) 941void dss_features_init(enum omapdss_version version)
933{ 942{
934 if (cpu_is_omap24xx()) 943 switch (version) {
944 case OMAPDSS_VER_OMAP24xx:
935 omap_current_dss_features = &omap2_dss_features; 945 omap_current_dss_features = &omap2_dss_features;
936 else if (cpu_is_omap3630()) 946 break;
947
948 case OMAPDSS_VER_OMAP34xx_ES1:
949 case OMAPDSS_VER_OMAP34xx_ES3:
950 omap_current_dss_features = &omap3430_dss_features;
951 break;
952
953 case OMAPDSS_VER_OMAP3630:
937 omap_current_dss_features = &omap3630_dss_features; 954 omap_current_dss_features = &omap3630_dss_features;
938 else if (cpu_is_omap34xx()) { 955 break;
939 if (soc_is_am35xx()) { 956
940 omap_current_dss_features = &am35xx_dss_features; 957 case OMAPDSS_VER_OMAP4430_ES1:
941 } else {
942 omap_current_dss_features = &omap3430_dss_features;
943 }
944 }
945 else if (omap_rev() == OMAP4430_REV_ES1_0)
946 omap_current_dss_features = &omap4430_es1_0_dss_features; 958 omap_current_dss_features = &omap4430_es1_0_dss_features;
947 else if (omap_rev() == OMAP4430_REV_ES2_0 || 959 break;
948 omap_rev() == OMAP4430_REV_ES2_1 || 960
949 omap_rev() == OMAP4430_REV_ES2_2) 961 case OMAPDSS_VER_OMAP4430_ES2:
950 omap_current_dss_features = &omap4430_es2_0_1_2_dss_features; 962 omap_current_dss_features = &omap4430_es2_0_1_2_dss_features;
951 else if (cpu_is_omap44xx()) 963 break;
964
965 case OMAPDSS_VER_OMAP4:
952 omap_current_dss_features = &omap4_dss_features; 966 omap_current_dss_features = &omap4_dss_features;
953 else if (soc_is_omap54xx()) 967 break;
968
969 case OMAPDSS_VER_OMAP5:
954 omap_current_dss_features = &omap5_dss_features; 970 omap_current_dss_features = &omap5_dss_features;
955 else 971 break;
972
973 case OMAPDSS_VER_AM35xx:
974 omap_current_dss_features = &am35xx_dss_features;
975 break;
976
977 default:
956 DSSWARN("Unsupported OMAP version"); 978 DSSWARN("Unsupported OMAP version");
979 break;
980 }
957} 981}