Skip to contentSkip to conversation

drm/amd/display: Fix failure to read vram info due to static BP_RESULT

PATCH In review Alex Deucher 2 participants 3 messages Nov 8, 2024 – Nov 12, 2024

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amd/display: Fix failure to read vram info due to static BP_RESULT

From: Hamish Claxton <[email protected]>

The static declaration causes the check to fail. Remove it.

Fixes 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401")
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +1 -1
index be8fbb04ad98..902491669cbc 100644
@@ -3122,7 +3122,7 @@ static enum bp_result bios_parser_get_vram_info(
 		struct dc_vram_info *info)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	static enum bp_result result = BP_RESULT_BADBIOSTABLE;
+	enum bp_result result = BP_RESULT_BADBIOSTABLE;
 	struct atom_common_table_header *header;
 	struct atom_data_revision revision;
 
Signature · 1 line
2.47.0
author maintainer
#1 lore raw

PATCH 2/2 Revert "drm/amd/display: parse umc_info or vram_info based on ASIC"

This reverts commit 2551b4a321a68134360b860113dd460133e856e5.

This was not the root cause. Revert.

---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +1 -3
index 902491669cbc..c9a6de110b74 100644
@@ -3127,9 +3127,7 @@ static enum bp_result bios_parser_get_vram_info(
 	struct atom_data_revision revision;
 
 	// vram info moved to umc_info for DCN4x
-	if (dcb->ctx->dce_version >= DCN_VERSION_4_01 &&
-		dcb->ctx->dce_version < DCN_VERSION_MAX &&
-		info && DATA_TABLES(umc_info)) {
+	if (info && DATA_TABLES(umc_info)) {
 		header = GET_IMAGE(struct atom_common_table_header,
 					DATA_TABLES(umc_info));
 
Signature · 1 line
2.47.0
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] Revert "drm/amd/display: parse umc_info or vram_info based on ASIC"

Quoted 8 lines · Alex Deucher

This reverts commit 2551b4a321a68134360b860113dd460133e856e5.

This was not the root cause. Revert.

Series is

Harry

Quoted 19 lines
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +1 -3
index 902491669cbc..c9a6de110b74 100644
@@ -3127,9 +3127,7 @@ static enum bp_result bios_parser_get_vram_info(
 	struct atom_data_revision revision;
 
 	// vram info moved to umc_info for DCN4x
-	if (dcb->ctx->dce_version >= DCN_VERSION_4_01 &&
-		dcb->ctx->dce_version < DCN_VERSION_MAX &&
-		info && DATA_TABLES(umc_info)) {
+	if (info && DATA_TABLES(umc_info)) {
 		header = GET_IMAGE(struct atom_common_table_header,
 					DATA_TABLES(umc_info));