drm/amd/display: fix vram info table parsing ordering
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amd/display: fix vram info table parsing ordering
For DCN 4.x, the vram_info moved into the umc_info table. However, it appears some DCN 2.x based boards also happen to have a umc table with a version matching DCN 4.x which causes them to match the wrong table.
Fixes 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401")
Signed-off-by Alex Deucher <[email protected]>
--- .../drm/amd/display/dc/bios/bios_parser2.c | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +25 -24
@@ -3126,29 +3126,7 @@ static enum bp_result bios_parser_get_vram_info(struct atom_common_table_header *header;struct atom_data_revision revision; -// vram info moved to umc_info for DCN4x -if (info &&DATA_TABLES (umc_info)) { - header = GET_IMAGE(struct atom_common_table_header, -DATA_TABLES (umc_info)); - -get_atom_data_table_revision (header, &revision); - -switch (revision.major) { -case 4 : -switch (revision.minor) { -case 0 : - result =get_vram_info_from_umc_info_v40 (bp, info); -break ; -default : -break ; - } -break ; -default : -break ; - } - } - -if (result !=BP_RESULT_OK && info &&DATA_TABLES (vram_info)) { +if (info &&DATA_TABLES (vram_info)) { header = GET_IMAGE(struct atom_common_table_header,DATA_TABLES (vram_info));
@@ -3182,10 +3160,33 @@ static enum bp_result bios_parser_get_vram_info(break ;default : -return result; +break ; } } + +// vram info moved to umc_info for DCN4x +if (result !=BP_RESULT_OK && info &&DATA_TABLES (umc_info)) { + header = GET_IMAGE(struct atom_common_table_header, +DATA_TABLES (umc_info)); + +get_atom_data_table_revision (header, &revision); + +switch (revision.major) { +case 4 : +switch (revision.minor) { +case 0 : + result =get_vram_info_from_umc_info_v40 (bp, info); +break ; +default : +break ; + } +break ; +default : +break ; + } + } +return result; }
Signature · 1 line
2.46.2