drm/amdgpu: correct vram_info for HBM2E
authorFeifei Xu <Feifei.Xu@amd.com>
Mon, 30 Nov 2020 10:57:19 +0000 (18:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 02:55:05 +0000 (22:55 -0400)
correct atom_vram_info_header_v2_6 and its vram_module.

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

index 266d949759feb90fb0b974da1c5a8450498f8693..d338f2db1f9c2dfa98c2656f94ab20df9a22d07a 100644 (file)
@@ -123,7 +123,7 @@ union vram_info {
        struct atom_vram_info_header_v2_3 v23;
        struct atom_vram_info_header_v2_4 v24;
        struct atom_vram_info_header_v2_5 v25;
-       struct atom_vram_info_header_v2_5 v26;
+       struct atom_vram_info_header_v2_6 v26;
 };
 
 union vram_module {
@@ -322,7 +322,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
                                vram_module = (union vram_module *)vram_info->v26.vram_module;
                                while (i < module_id) {
                                        vram_module = (union vram_module *)
-                                               ((u8 *)vram_module + vram_module->v11.vram_module_size);
+                                               ((u8 *)vram_module + vram_module->v9.vram_module_size);
                                        i++;
                                }
                                mem_type = vram_module->v9.memory_type;