mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/amd/display: Set number of pipes to 1 if the second pipe was disabled
[why] Some ODM-related register settings are inconsistently updated by VBIOS, causing the state in DC to be invalid, which would then end up crashing in certain use-cases (such as disable/enable device). [how] Check the enabled status of the second pipe when determining the number of OPTC sources. If the second pipe is disabled, set the number of sources to 1 regardless of other settings (that may not be updated correctly). Signed-off-by: Nikola Cornij <nikola.cornij@amd.com> Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2ad0cdf9e2
commit
2fef0faa1c
@ -287,6 +287,10 @@ void optc2_get_optc_source(struct timing_generator *optc,
|
||||
*num_of_src_opp = 2;
|
||||
else
|
||||
*num_of_src_opp = 1;
|
||||
|
||||
/* Work around VBIOS not updating OPTC_NUM_OF_INPUT_SEGMENT */
|
||||
if (*src_opp_id_1 == 0xf)
|
||||
*num_of_src_opp = 1;
|
||||
}
|
||||
|
||||
void optc2_set_dwb_source(struct timing_generator *optc,
|
||||
|
Loading…
Reference in New Issue
Block a user