[BISECTED] Fail to read VRAM information on second GPU in a multi GPU system
Upon updating to 6.11, my RX 6600 XT no longer boots properly, as in there is no display out.
Looking through the logs I found that the following error was repeatedly being logged:
amdgpu 0000:08:00.0: [drm] Cannot find any crtc or sizes
After a bit of digging around I could not find a solution for this however downgrading to 6.10 worked as a temporary solution. Speaking with members on the Arch Linux forum, I tried a build of 6.12rc1, which also had the same error - albeit with less errors.
Bisecting the kernel led me to find that this commit: drm/amd/display: Add misc DC changes for DCN401
was causing the issue.
Further narrowing it down, found that the line in the function bios_parser_get_vram_info
, was failing for these older cards.
Analysing the function, it appears that the added result != BP_RESULT_OK
causes this the issue and removing the test resolves the issue and allows the GPU to properly initialise. This was tested against master and the latest 6.11.6 stable release.
Looking further shows that the result
variable of type bp_result
is initialised as static, as such the value for result from the previous instance of bios_parser_get_vram_info
gets passed into the next instance. This means for multi GPU setups, the second GPU would not be initialised as result
is already equal to BP_RESULT_OK
. Removing the keyword resolves this issue entirely.
Attached are kernel logs of 6.11 and 6.12, as well as a patch to revert that change. I have tested this patch for the last week and can confirm no issues as a result, only that it fixes the issue.
Here is the patch in case anyone would like to view it without downloading. I would be more than happy to submit this to the mailing list for review if everything looks okay.
From 607b49606fb29ac2f23b58b831e9256aded0fdc3 Mon Sep 17 00:00:00 2001
From: Hamish Claxton <hamishclaxton@gmail.com>
Date: Tue, 5 Nov 2024 10:42:31 +1000
Subject: [PATCH] drm/amd/display: Fix failure to read vram info due to static
BP_RESULT
Signed-off-by: Hamish Claxton <hamishclaxton@gmail.com>
---
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 0d8498ab9b23..c9a6de110b74 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -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;
--
2.47.0
Hardware description:
- CPU: Intel Core i5-10500
- GPU: AMD Radeon Sapphire Nitro RX 6600 XT,AMD Radeon ASRock RX 6950 XT OC Formula 16GB, Intel UHD Graphics 630
- System Memory: 64GB
- Display(s): AOC AGON AG493UCX2
- Type of Display Connection: HDMI (RX 6600 XT), DP (RX 6950 XT), HDMI (UHD 630)
System information:
- Distro name and Version: Arch Linux
- Kernel version: 6.11+
- Custom kernel: N/A
- AMD official driver version: N/A
Log files
0001-drm-amd-display-Fix-failure-to-read-vram-info-due-to.patch 6-12.log 6-11.log