766{
767 bool supportedResolution;
773
774
775 if (!display)
776 {
777
778#if defined(DISPLAY_RESOLUTION_QVGA)
780#elif defined(DISPLAY_RESOLUTION_WQVGA)
782#elif defined(DISPLAY_RESOLUTION_WVGA)
783#if defined(EVE_GRAPHICS_IDM2040)
785#else
787#endif
788#elif defined(DISPLAY_RESOLUTION_WSVGA)
790#elif defined(DISPLAY_RESOLUTION_HDTV)
792#elif defined(DISPLAY_RESOLUTION_WXGA)
794#elif defined(DISPLAY_RESOLUTION_HVGA_PORTRAIT)
796#else
805#endif
806 }
807
810#if EVE_DISPLAY_REFRESH
812#else
814#endif
816 supportedResolution =
configDefaultsEx(phost, config, width, height, refreshRate, hsfWidth, freq);
817
818
819#if EVE_DISPLAY_REFRESH
821 {
822
823 }
824 else
825#endif
827 {
828
829
830
831
832
833#if EVE_HARDCODED_DISPLAY_TIMINGS
834 if (supportedResolution)
835 {
847#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
848 config->PClkFreq = 0;
849#endif
850#ifdef EVE_SUPPORT_HSF
851 config->HsfWidth = 0;
852#endif
853 }
854#endif
859 }
861 {
862
863
864
865
866
867
868
869
870
871
872#if EVE_HARDCODED_DISPLAY_TIMINGS
873 if (supportedResolution)
874 {
886#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
887 config->PClkFreq = 0;
888#endif
889#ifdef EVE_SUPPORT_HSF
890 config->HsfWidth = 0;
891#endif
892 }
893#endif
894 }
895#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
897 {
898
899#if EVE_HARDCODED_DISPLAY_TIMINGS
900 if (supportedResolution)
901 {
913 config->PClkFreq = 0x885;
914 config->HsfWidth = 0;
915 }
916#endif
917 }
918#endif
920 {
921
922
923
924
925
926
927
928#if EVE_HARDCODED_DISPLAY_TIMINGS
929 if (supportedResolution)
930 {
942#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
943 config->PClkFreq = 0;
944#endif
945#ifdef EVE_SUPPORT_HSF
946 config->HsfWidth = 0;
947#endif
948 }
949#endif
950 }
952 {
953
954
955
956
957
958
959#if EVE_HARDCODED_DISPLAY_TIMINGS
960 if (supportedResolution)
961 {
962 config->
Width = 1280;
973#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
974 config->PClkFreq = 0;
975#endif
976#ifdef EVE_SUPPORT_HSF
977 config->HsfWidth = 0;
978#endif
979 }
980#endif
987 }
989 {
990
991
992
993
994
995#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
996#if EVE_HARDCODED_DISPLAY_TIMINGS
998 {
999 config->
Width = 1280;
1010 config->PClkFreq = 0x8B1;
1011#ifdef EVE_SUPPORT_HSF
1012 config->HsfWidth = 0;
1013#endif
1014 }
1015#endif
1016#endif
1023 }
1025 {
1026
1027
1028
1029
1030
1031#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
1032#if EVE_HARDCODED_DISPLAY_TIMINGS
1034 {
1035 config->
Width = 1024;
1046 config->PClkFreq = 0xD12;
1047#ifdef EVE_SUPPORT_HSF
1048 config->HsfWidth = 0;
1049#endif
1050 }
1051#endif
1052#endif
1059 }
1060
1061#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
1062
1063 if (config->AhHCycleMax && config->
HCycle > config->AhHCycleMax)
1064 config->AhHCycleMax = 0;
1065#endif
1066
1067#ifdef _DEBUG
1068#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
1069 if (config->PClkFreq)
1070 {
1071 uint32_t pclkFrequency = getFreqFromPClkFreq(config->PClkFreq);
1072 eve_printf_debug(
"Display refresh rate set to %f Hz using pclk %X freq %f MHz\n", (
float)((
double)pclkFrequency / ((
double)config->
HCycle * (
double)config->
VCycle)), (
int)config->PClkFreq, (
float)((
double)pclkFrequency * 0.000001));
1073 }
1074 else
1075#endif
1077#endif
1078
1079#if 0
1098#if (EVE_SUPPORT_CHIPID >= EVE_BT815)
1100#endif
1101#if (EVE_SUPPORT_CHIPID >= EVE_BT817)
1104#endif
1105#ifdef EVE_SUPPORT_HSF
1107#endif
1108#endif
1109}
#define EVE_DISPLAY_REFRESH
static const uint16_t s_DisplayResolutions[EVE_DISPLAY_NB][4]
static bool configDefaultsEx(EVE_HalContext *phost, EVE_ConfigParameters *config, uint32_t width, uint32_t height, uint32_t refreshRate, uint32_t hsfWidth, uint32_t freq)
@ EVE_DISPLAY_QVGA_320x240_56Hz
@ EVE_DISPLAY_HDTV_1280x720_58Hz
@ EVE_DISPLAY_HVGA_320x480_60Hz
@ EVE_DISPLAY_WSVGA_1024x600_59Hz
@ EVE_DISPLAY_WQVGA_480x272_60Hz
@ EVE_DISPLAY_WVGA_800x480_74Hz
@ EVE_DISPLAY_WVGA_800x480_W860_60Hz
@ EVE_DISPLAY_WXGA_1280x800_57Hz