[SRU] [R] [PATCH 07/13] drm/amdgpu: use DISCOVERY_TMR_SIZE in ACPI TMR fallback
Yo-Jung Leo Lin (AMD)
Leo.Lin at amd.com
Mon Jul 6 06:43:35 UTC 2026
From: "Jesse.Zhang" <Jesse.Zhang at amd.com>
BugLink: https://bugs.launchpad.net/bugs/2158690
amdgpu_acpi_get_tmr_info() returns the full TMR region size, not the IP
discovery table size. Using tmr_size as discovery.size can lead to oversized
allocations and probe failure.
In the ACPI fallback path, keep discovery.size as DISCOVERY_TMR_SIZE and only
use ACPI data for offset calculation.
Fixes: 01bdc7e219c4 ("drm/amdgpu: New interface to get IP discovery binary v3")
Reviewed-by: Lijo Lazar <lijo.lazar at amd.com>
Suggested-by: Lijo Lazar <lijo.lazar at amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit 5c82adf957dcb187add5ee3209439c67b63df538)
Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index bad572aad5fa..fd47ad79d38b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -321,7 +321,7 @@ static int amdgpu_discovery_get_tmr_info(struct amdgpu_device *adev,
ret = amdgpu_acpi_get_tmr_info(adev, &tmr_offset, &tmr_size);
if (ret)
return ret;
- adev->discovery.size = (u32)tmr_size;
+ adev->discovery.size = DISCOVERY_TMR_SIZE;
adev->discovery.offset = tmr_offset + tmr_size - DISCOVERY_TMR_OFFSET;
}
}
--
2.43.0
More information about the kernel-team
mailing list