drm/amdgpu: set reserve_tmr in amdgpu_discovery_get_tmr_info

If reading mmDRIVER_SCRATCH_2 returns non-zero, discovery.reserve_tmr
is set to true and driver need reserve tmr for firmware.

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Suggested-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Feifei Xu 2026-05-13 18:08:40 +08:00 committed by Alex Deucher
parent b9ea19d212
commit afa9574fb5

View File

@ -357,6 +357,7 @@ static int amdgpu_discovery_get_tmr_info(struct amdgpu_device *adev,
tmr_offset_hi = RREG32(mmDRIVER_SCRATCH_1);
adev->discovery.offset = ((u64)le32_to_cpu(tmr_offset_hi) << 32 |
le32_to_cpu(tmr_offset_lo));
adev->discovery.reserve_tmr = true;
} else if (!vram_size) {
/* fall back to apci approach to query tmr offset if vram_size is 0 */
ret = amdgpu_acpi_get_tmr_info(adev, &tmr_offset, &tmr_size);