mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 22:36:49 +07:00
drm/amd/display: fix check condition for edp power control
Per discussion with VBIOS team, the orginal check is not correct in all cases on latest VBIOS. Additional check is needed. This change should maintain old behaviour on older VBIOS. Signed-off-by: Eric Yang <Eric.Yang2@amd.com> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
90e3103e19
commit
d03f3f6304
@ -329,6 +329,8 @@ struct dce_hwseq_registers {
|
||||
HWSEQ_DCE10_MASK_SH_LIST(mask_sh),\
|
||||
SF(DCFEV_CLOCK_CONTROL, DCFEV_CLOCK_ENABLE, mask_sh),\
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh),\
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_DIGON, mask_sh),\
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_DIGON_OVRD, mask_sh),\
|
||||
HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh),\
|
||||
HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, CRTC0_)
|
||||
|
||||
@ -405,10 +407,12 @@ struct dce_hwseq_registers {
|
||||
HWS_SF(, DOMAIN6_PG_STATUS, DOMAIN6_PGFSM_PWR_STATUS, mask_sh), \
|
||||
HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \
|
||||
HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
|
||||
HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh), \
|
||||
HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
|
||||
HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh)
|
||||
HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh),\
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_DIGON, mask_sh), \
|
||||
HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_DIGON_OVRD, mask_sh), \
|
||||
HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh)
|
||||
|
||||
#define HWSEQ_REG_FIELD_LIST(type) \
|
||||
type DCFE_CLOCK_ENABLE; \
|
||||
@ -440,7 +444,9 @@ struct dce_hwseq_registers {
|
||||
type ENABLE_L1_TLB;\
|
||||
type SYSTEM_ACCESS_MODE;\
|
||||
type LVTMA_BLON;\
|
||||
type LVTMA_PWRSEQ_TARGET_STATE_R;
|
||||
type LVTMA_PWRSEQ_TARGET_STATE_R;\
|
||||
type LVTMA_DIGON;\
|
||||
type LVTMA_DIGON_OVRD;
|
||||
|
||||
#define HWSEQ_DCN_REG_FIELD_LIST(type) \
|
||||
type HUBP_VTG_SEL; \
|
||||
|
@ -737,10 +737,14 @@ static bool is_panel_backlight_on(struct dce_hwseq *hws)
|
||||
|
||||
static bool is_panel_powered_on(struct dce_hwseq *hws)
|
||||
{
|
||||
uint32_t value;
|
||||
uint32_t pwr_seq_state, dig_on, dig_on_ovrd;
|
||||
|
||||
REG_GET(LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, &value);
|
||||
return value == 1;
|
||||
|
||||
REG_GET(LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, &pwr_seq_state);
|
||||
|
||||
REG_GET_2(LVTMA_PWRSEQ_CNTL, LVTMA_DIGON, &dig_on, LVTMA_DIGON_OVRD, &dig_on_ovrd);
|
||||
|
||||
return (pwr_seq_state == 1) || (dig_on == 1 && dig_on_ovrd == 1);
|
||||
}
|
||||
|
||||
static enum bp_result link_transmitter_control(
|
||||
|
Loading…
Reference in New Issue
Block a user