]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Initialize memory ranges for gmc v12_1
authorHawking Zhang <Hawking.Zhang@amd.com>
Sun, 15 Jun 2025 06:22:13 +0000 (14:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Dec 2025 22:39:22 +0000 (17:39 -0500)
Initialize memory ranges for gmc v12_1

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

index dfa5181851161c67b2e488c77d28dbfc233a1e2c..8e3e2d3c553fc2b5820daa152c65de5e6093dd33 100644 (file)
@@ -878,6 +878,14 @@ static int gmc_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
 
        amdgpu_gmc_get_vbios_allocations(adev);
 
+#ifdef HAVE_ACPI_DEV_GET_FIRST_MATCH_DEV
+       if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 1, 0)) {
+               r = amdgpu_gmc_init_mem_ranges(adev);
+               if (r)
+                       return r;
+       }
+#endif
+
        /* Memory manager */
        r = amdgpu_bo_init(adev);
        if (r)