]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: use DISCOVERY_TMR_SIZE in ACPI TMR fallback
authorJesse.Zhang <Jesse.Zhang@amd.com>
Mon, 23 Mar 2026 05:31:54 +0000 (13:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Mar 2026 17:30:36 +0000 (13:30 -0400)
commit5c82adf957dcb187add5ee3209439c67b63df538
treee22c19399670d7238ce3111b2a80a28671ae93a1
parentbdb2b9e1e08f34a4897c9f2558b4c9941638a6e5
drm/amdgpu: use DISCOVERY_TMR_SIZE in ACPI TMR fallback

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@amd.com>
Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c