123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- /**
- * @file ProjectConfig.h
- * @brief Header file of Project.
- *
- * @verbatim
- * ==============================================================================
- * ##### How to use #####
- * ==============================================================================
- *
- *
- @ endverbatim
- *
- * @author HiView SoC Software Team
- * @version 1.0.0
- * @date 2022-08-26
- */
- #ifndef __DEVICE_HIVIEW_HT7315_PRODUCT_QHD_PROJECT_H__
- #define __DEVICE_HIVIEW_HT7315_PRODUCT_QHD_PROJECT_H__
- #define HV_CONFIG_ON 1
- #define HV_CONFIG_OFF 0
- /*************************************************
- Platform definiton
- *************************************************/
- #define HV_PROJECT_CONFIG_MANUFACT_OUI 0x24DD1B
- #define HV_PROJECT_CONFIG_DEV_STRING0 0x00
- #define HV_PROJECT_CONFIG_DEV_STRING1 0x00000000
- #define HV_PROJECT_CONFIG_DEV_STRING2 0x00
- #define HV_PROJECT_CONFIG_HW_MAJOR_REV 0x00
- #define HV_PROJECT_CONFIG_HW_MINOR_REV 0x00
- #define HV_PROJECT_CONFIG_FW_MAJOR_REV 0x00
- #define HV_PROJECT_CONFIG_FW_MINOR_REV 0x00
- #define HV_PROJECT_CONFIG_GUID0 0x00000000
- #define HV_PROJECT_CONFIG_GUID1 0x00000000
- #define HV_PROJECT_CONFIG_GUID2 0x00000000
- #define HV_PROJECT_CONFIG_GUID3 0x00000000
- /*特殊分辨率panel 自定义分辨率,给OSD/OD等宏使用*/
- #ifdef CONFIG_USER_PANEL_RESOLUTION_TYPE_CUSTOMIZE
- #define HV_PROJECT_CONFIG_PANEL_H_ACTIVE_CUSTOMIZE 3440
- #define HV_PROJECT_CONFIG_PANEL_V_ACTIVE_CUSTOMIZE 1440
- #endif
- /*************************************************
- Product function definiton
- *************************************************/
- #define HV_PROJECT_CONFIG_DARK_STABILIZER HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_MPRT HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_FREESYNC HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_ADAPTIVESYNC HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_GSYNC HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_LDR HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_DCR HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_EYESHIELD HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_CROSSHAIR HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_REFRESH_RATE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_HDR HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_CUSTOM_KEY HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_LIGHT_EFFECT HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_VARIABLEBACKLIGHT HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_CM HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_AUDIO_SETTING HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_MAIN_MONTAGE HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_MAIN_FLIP HV_CONFIG_ON
- #ifdef CONFIG_USER_DOUBLE_CHANNEL_ON
- #define HV_PROJECT_CONFIG_MAGNIFY HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_PXP HV_CONFIG_ON
- #else
- #define HV_PROJECT_CONFIG_MAGNIFY HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_PXP HV_CONFIG_OFF
- #endif
- /*************************************************
- INPUTPORT Option
- *************************************************/
- #define HV_PROJECT_CONFIG_HDCP_KEY_ONROM HV_CONFIG_OFF /* 1: HDCP Key saved in ROM */
- #define HV_PROJECT_CONFIG_HDCP_KEY_CLEAR_TEXT HV_CONFIG_OFF /* 0: cipher Text(����); 1: clear Text(����) */
- #define HV_PROJECT_CONFIG_EDID_EXTER_EEPROM HV_CONFIG_OFF /* 1: USE Extern EEPROM to save EDID */
- #define HV_PROJECT_CONFIG_EDID_UP_FCTWEEK HV_CONFIG_ON /* 1: Update the Factory Week */
- #define HV_PROJECT_CONFIG_EDID_UP_FCTYEAR HV_CONFIG_ON /* 1: EDID Update the Factory Year */
- #define HV_PROJECT_CONFIG_EDID_UP_SN_VENDOR HV_CONFIG_OFF /* 1: EDID Update the Factory SN on Vendor Info */
- #define HV_PROJECT_CONFIG_EDID_UP_DESC_SN HV_CONFIG_ON /* 1: EDID Update the Factory SN on Desc Info */
- #define HV_PROJECT_CONFIG_ESEGMENT HV_CONFIG_ON /* 1: Support E-Segment */
- #define HV_PROJECT_CONFIG_ESEGMENT_PM51 HV_CONFIG_OFF /* 1: Support E-Segment on 51 */
- #define HV_PROJECT_CONFIG_FRL HV_CONFIG_ON /* 1: Support HDMI FRL */
- #define HV_PROJECT_CONFIG_CTS HV_CONFIG_OFF /* 1: CTS specific handle */
- #define HV_PROJECT_CONFIG_DEFAULT_EDID HV_CONFIG_ON /* 1: Default EDID exist*/
- #define HV_PROJECT_CONFIG_VCP_CMD_FREESYNC HV_CONFIG_ON /* 1: Use AMD VCP Code to update freesync state */
- /*************************************************
- PQ Option
- *************************************************/
- // #define HDR_PARAM_DYNAMIC_UP
- #ifdef HDR_PARAM_DYNAMIC_UP
- // 如下宏定义的色坐标值 = EDID色坐标值,范围 0.000 ~ 0.999
- #define HDR_RED_X ((FLOAT32)0.111)
- #define HDR_RED_Y ((FLOAT32)0.222)
- #define HDR_GREEN_X ((FLOAT32)0.333)
- #define HDR_GREEN_Y ((FLOAT32)0.444)
- #define HDR_BLUE_X ((FLOAT32)0.555)
- #define HDR_BLUE_Y ((FLOAT32)0.666)
- #define HDR_WHITE_X ((FLOAT32)0.777)
- #define HDR_WHITE_Y ((FLOAT32)0.888)
- // 注意,只有原始EDID存在HDR Static Metadata,如下HDR_LUMINANCE的宏才会生效
- // 如下宏定义的亮度值单位为cd/m^2,max范围为 50 ~ 12525.722,min范围为 0 ~ 125.257
- #define HDR_LUMINANCE_MAX_EN (1) // 0:禁用,1:启用
- #define HDR_LUMINANCE_MAX ((FLOAT32)436.203)
- #define HDR_LUMINANCE_AVG_EN (1) // 0:禁用,1:启用,该值如果为1,HDR_LUMINANCE_MAX_EN必须为1
- #define HDR_LUMINANCE_AVG ((FLOAT32)147.683)
- #define HDR_LUMINANCE_MIN_EN (1) // 0:禁用,1:启用,该值如果为1,HDR_LUMINANCE_AVG_EN必须为1
- #define HDR_LUMINANCE_MIN ((FLOAT32)0.007)
- #endif
- /*************************************************
- DEMURA Option
- *************************************************/
- #ifdef CONFIG_USER_DISPCTRL_DEMURA_ON
- #define DEMURA_COLOR_MODE (0) /*0-mono mode, 1-color mode*/
- #define DEMURA_BLK_X_BIT (3) /*block x size bits*/
- #define DEMURA_BLK_Y_BIT (3) /*block y size bits*/
- #define DEMURA_LAYER_NUM (3) /*layer number*/
- #define DEMURA_BLACK_LIMIT (0) /*lower level*/
- #define DEMURA_LAYER0_LEVEL (256) /*layer0 level*/
- #define DEMURA_LAYER1_LEVEL (512) /*layer1 level*/
- #define DEMURA_LAYER2_LEVEL (716) /*layer2 level*/
- #define DEMURA_LAYER3_LEVEL (716) /*layer3 level*/
- #define DEMURA_LAYER4_LEVEL (716) /*layer4 level*/
- #define DEMURA_LAYER5_LEVEL (716) /*layer5 level*/
- #define DEMURA_LAYER6_LEVEL (716) /*layer6 level*/
- #define DEMURA_LAYER7_LEVEL (716) /*layer7 level*/
- #define DEMURA_LAYER8_LEVEL (716) /*layer8 level*/
- #define DEMURA_WHITE_LIMIT (1023) /*upper level*/
- #define DEMURA_STRENGTH_GAIN_LOW (0x00) /*low strength gain */
- #define DEMURA_STRENGTH_GAIN (0x400) /*type strength gain*/
- #define DEMURA_STRENGTH_GAIN_HIGH (0x400) /*high strength gain*/
- #endif
- /*************************************************
- DPU Option
- *************************************************/
- /*是否允许SUB通道和辅助通道公用相同的port*/
- #define HV_PROJECT_CONFIG_CHANNEL_USE_SAME_PORT 1
- /*是否开启完整LocalDimming*/
- #define HV_PROJECT_CONFIG_FULL_LOCALDIMMING HV_CONFIG_OFF
- /*是否开启LocalDimming 2D PixelGain*/
- #define HV_PROJECT_CONFIG_LDC_2D_PIXELGAIN HV_CONFIG_OFF
- /* 开启ldc需要配置kspi通道 */
- #if (HV_PROJECT_CONFIG_FULL_LOCALDIMMING == HV_CONFIG_ON)
- #define HV_PROJECT_CONFIG_KSPI_CHANNEL_NUM 0x1
- #endif
- /*是否使用bin文件进行PQ初始化*/
- #define HV_PROJECT_CONFIG_PQ_INITBYBIN HV_CONFIG_ON
- /*PQ模块调试工具是否读写数据库,默认关闭,调试PQ打开*/
- #define HV_PROJECT_CONFIG_PQ_DATABASEWREN HV_CONFIG_ON
- /* PQ模块关闭HDR是否切换EDID*/
- #define HV_PROJECT_CONFIG_PQ_HDR_CHANGEEDID HV_CONFIG_OFF
- /*搜索端口的间隔时间,单位ms*/
- #define HV_PROJECT_CONFIG_PERIOD_SEARCH_CHECK_SROUCE_TIMER 100
- #define HV_PROJECT_CONFIG_CURRENT_PORT_SEARCHE_TIMES 90 /*当前通道搜索次数,一次HV_PROJECT_CONFIG_PERIOD_SEARCH_CHECK_SROUCE_TIMER毫秒*/
- #define HV_PROJECT_CONFIG_EACH_PORT_DISCONNECT_SEARCHE_TIMES 20 /*通道未插线搜索次数,一次HV_PROJECT_CONFIG_PERIOD_SEARCH_CHECK_SROUCE_TIMER毫秒*/
- #if (HV_PROJECT_CONFIG_CTS == HV_CONFIG_OFF)
- #define HV_PROJECT_CONFIG_NO_SIGNAL_CHECK_TIMES 10 /*无信号时进入待机前的检测信号的次数,每1秒检测一次*/
- #define HV_PROJECT_CONFIG_EACH_PORT_SERARCH_MAX_TIMES 30 /*提示无信号前,每个插线通道搜索的次数,每100ms搜索一次*/
- #else
- #define HV_PROJECT_CONFIG_NO_SIGNAL_CHECK_TIMES 200
- #define HV_PROJECT_CONFIG_EACH_PORT_SERARCH_MAX_TIMES 100
- #endif
- /*工厂模式下,加速进入老化模式*/
- #define HV_PROJECT_CONFIG_BURN_IN_EACH_PORT_SEARCH_TIMES 10
- #define HV_PROJECT_CONFIG_MAX_SEARCH_TIMERS_BURN_IN (HV_PROJECT_CONFIG_BURN_IN_EACH_PORT_SEARCH_TIMES * (HV_BOARD_CONFIG_MAX_HDMI_PORT_NUM + HV_BOARD_CONFIG_MAX_DP_PORT_NUM))
- /*unit millisecond*/
- /*total nosignal keep time = NO_SIGNAL_DURATION_TIMES * NO_SIGNAL_CHECK_TIMER_LENGTH */
- #define HV_PROJECT_CONFIG_NO_SIGNAL_CHECK_TIMER_LENGTH 1000
- #define HV_PROJECT_CONFIG_DPU_OVER_SCAN_SIDE_SIZE 250UL /*side image (250 is 2.5% of each side size) over screen, 0: off*/
- #define HV_PROJECT_CONFIG_DPU_BRIGHT_FRAME HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_AUTO_POWER_OFF HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_MAGNIFY_SAMPLING_FLOW_POS HV_CONFIG_ON /*放大镜取样位置是否跟随放大镜显示位置(放大放大镜正下方画面)*/
- #define HV_PROJECT_CONFIG_PIP_POS_PRECISE_ADJ HV_CONFIG_OFF /*PIP sub 位置是否开启精确调节,开启后h v位置可以步进调节*/
- #define HV_PROJECT_CONFIG_CHANNEL_SEAMLESS_SWITCH HV_CONFIG_OFF /*双通道冻结一帧切换*/
- #define HV_PROJECT_CONFIG_OVER_PANEL_CLOCK_EN HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OVER_PANEL_CLOCK_UP 2000 /*over panel pixel clock KHz*/
- #define HV_PROJECT_CONFIG_OVER_PANEL_CLOCK_DOWN 2000 /*reduce panel pixel clock KHz*/
- /*************************************************
- PM51 Option
- *************************************************/
- #define HV_PROJECT_CONFIG_PM51_UART_PRINT_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_PM51_TYPEC0_ENABLE HV_CONFIG_ON
- /* STBY_GP 189:6, 161:0, 162:1 */
- #define HV_PROJECT_CONFIG_PM51_IR_USE_GPIO 6
- #define HV_PROJECT_CONFIG_PM51_IR_SYSCODE0 0x00bf
- #define HV_PROJECT_CONFIG_PM51_IR_SYSCODE1 0x00fc
- #define HV_PROJECT_CONFIG_PM51_IR_POWERCODE 0x0d
- /*************************************************
- DPMS Option
- *************************************************/
- #define HV_PROJECT_CONFIG_DPMS_HDMI0_CABLE_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_DPMS_HDMI1_CABLE_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_DPMS_DP0_CABLE_ENABLE HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_DPMS_DP1_CABLE_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_DPMS_DP0_AUX_ENABLE HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_DPMS_DP1_AUX_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_DPMS_DP0_GPIO_ENABLE HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_DPMS_DP1_GPIO_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_HDMI0_DDC_WAKEUP_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_HDMI1_DDC_WAKEUP_ENABLE HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_CABLE_WAKEUP_DOUBLE_ENABLE HV_CONFIG_ON
- /*************************************************
- Audio Option
- *************************************************/
- #define HV_PROJECT_CONFIG_VOLUME_CONSISTENT 1
- #define HV_PROJECT_CONFIG_AUDIO_EQ 1
- #define HV_PROJECT_CONFIG_DIGITAL_MAX_VOLUME 256
- //#define HV_PROJECT_CONFIG_ADJUST_DIGITAL_VOLUME 1
- /*************************************************
- Panel Option
- *************************************************/
- #define HV_PROJECT_CONFIG_EDP_TX_TRAINING_TYPE HV_EDP_TX_FULL_LINK_TRAINING
- #define HV_PROJECT_CONFIG_EDP_TX_ASSR_EN HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_EDP_TX_AUX0_PORT EDP_AUX_PROT_INDEX0
- #define HV_PROJECT_CONFIG_EDP_TX_AUX1_PORT EDP_AUX_PROT_INDEX1
- #define HV_PROJECT_CONFIG_EDP_TX_HPD0_PORT EDP_HPD_PROT_INDEX0
- #define HV_PROJECT_CONFIG_EDP_TX_HPD1_PORT EDP_HPD_PROT_INDEX1
- #define HV_PROJECT_CONFIG_EDP_TX_HPD_IRQ_EN HV_CONFIG_OFF
- /*************************************************
- MPRT(PWM) Option
- *************************************************/
- /* 通过原理图查看pinshare,选择合适的port输出波形 */
- #define HV_PROJECT_CONFIG_MPRT_HIGHT_PORT 1 //GPIO11/PWM1/PIN92控制
- #define HV_PROJECT_CONFIG_MPRT_HIGHT_POL 0
- #define HV_PROJECT_CONFIG_BACKLIGHT_ENABLE 1 //背光开
- #define HV_PROJECT_CONFIG_BACKLIGHT_DISABLE 0 //背光关
- /* 输出固定高频PWM所需的固定参数,根据要设置的频率查表得到此值 */
- #define HV_PROJECT_CONFIG_MPRT_HIGHT_FREQ_PWM_TOTAL 4304
- #define HV_PROJECT_CONFIG_MPRT_HIGHT_FREQ_PWM_MULT 0
- #define HV_PROJECT_CONFIG_MPRT_HIGHT_FREQ_PWM_DUTY 90
- /* 通过原理图查看pinshare,选择合适的port输出波形 */
- #define HV_PROJECT_CONFIG_MPRT_PORT 2 //GPIO12/PWM2/PIN93控制
- #define HV_PROJECT_CONFIG_MPRT_POL 0
- /* 输出固定MPRT的PWM所需的固定参数 */
- #define HV_PROJECT_CONFIG_MPRT_MODE 0
- #define HV_PROJECT_CONFIG_MPRT_STA_VALUE 690 //普通MPRT模式下的拉高起始行,根据实际效果调节
- #define HV_PROJECT_CONFIG_MPRT_VALUE 1440
- #define HV_PROJECT_CONFIG_MPRT_VS_CLEAR 1 // VRR下MPRT开时,VS_CLEAR也要开,保证在帧结尾波形被拉低
- #define HV_PROJECT_CONFIG_MPRT_VRR_STA_VALUE 19660 //65535的占比,起始行占htotal的比例,会根据上一帧自动计算,这里只设比例即可
- #define HV_PROJECT_CONFIG_MPRT_VRR_VALUE 1440 // VRR下MPRT开时,VALUE按h total算,要保障拉行数足够大在帧结尾保持高电平
- /* 设置供LDC使用的vsync接口,需要PWM的一个通道 */
- #define HV_PROJECT_CONFIG_MPRT_LDCVSYNC_PORT 4
- /*************************************************
- Factory Option
- *************************************************/
- /* Factory Min*/
- #define HV_PROJECT_CONFIG_FACTORY_PANEL_TIME_COUNT_PERIOD 30
- /* Device Info Define*/
- #define HV_PROJECT_CONFIG_FACTORY_MONITOR_MODE "HIVIEW 27G5F_QHD"
- #define HV_PROJECT_CONFIG_FACTORY_SCALER_MODE "HT7315"
- #define HV_PROJECT_CONFIG_FACTORY_FW_VERSION "1.0.0"
- #define HV_PROJECT_CONFIG_FACTORY_FW_CHANGE_DATE "20241209"
- #define HV_PROJECT_CONFIG_FACTORY_PANEL_TYPE "SN270ES01_1 V1.4"
- #define HV_PROJECT_CONFIG_FACTORY_PANEL_SIZE "27.0"
- /* 8Bytes Max */
- #define HV_PROJECT_CONFIG_HDMI_SCDC_DEVICE_STR "HiView"
- /*Color Filter Define */
- #define HV_PROJECT_CONFIG_COLOR_FILTER HV_CONFIG_ON
- /*PQ Ambilight Define */
- #define HV_PROJECT_CONFIG_AMBILIGHT HV_CONFIG_ON
- /*PQ Ambient Light Define */
- #define HV_PROJECT_CONFIG_AMBIENT_LIGHT HV_CONFIG_OFF
- /*OSD&LD Bright Frame Define */
- #define HV_PROJECT_CONFIG_OSD_BRIGHT_FRAME HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_BRIGHT_FRAME_ALPHA (128)
- /* PQ VRR Gamma support */
- #define HV_PROJECT_CONFIG_VRR_GAMMA HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_PLATFORM HV_CONFIG_ON
- /*OTA Partition Define */
- #define HV_PROJECT_CONFIG_DUAL_PARTITION HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_LOGO_BIN_NAME "Logo.bin"
- /* 0:remember, 1:poweroff, 2:poweroff */
- #define HV_PROJECT_CONFIG_AC_POWER_STATE 2
- #endif
|