]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
drm/amdgpu/atomfirmware: add intergrated info v2.3 table
[thirdparty/kernel/stable.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_atomfirmware.c
index a6d64bdbbb14acaabc92e84ffda0701e006567b8..108003bdf1e91156d3a5af46591eb5f279e1af1c 100644 (file)
@@ -212,6 +212,7 @@ union igp_info {
        struct atom_integrated_system_info_v1_11 v11;
        struct atom_integrated_system_info_v1_12 v12;
        struct atom_integrated_system_info_v2_1 v21;
+       struct atom_integrated_system_info_v2_3 v23;
 };
 
 union umc_info {
@@ -360,6 +361,20 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
                                        if (vram_type)
                                                *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
                                        break;
+                               case 3:
+                                       mem_channel_number = igp_info->v23.umachannelnumber;
+                                       if (!mem_channel_number)
+                                               mem_channel_number = 1;
+                                       mem_type = igp_info->v23.memorytype;
+                                       if (mem_type == LpDdr5MemType)
+                                               mem_channel_width = 32;
+                                       else
+                                               mem_channel_width = 64;
+                                       if (vram_width)
+                                               *vram_width = mem_channel_number * mem_channel_width;
+                                       if (vram_type)
+                                               *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
+                                       break;
                                default:
                                        return -EINVAL;
                                }