Commit c09b3bf7 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/atomfirmware: fix LPDDR5 width reporting

LPDDR5 channels are 32 bit rather than 64, report the width properly
in the log.

v2: Only LPDDR5 are 32 bits per channel.  DDR5 is 64 bits per channel

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2468Acked-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4e3f85d1
...@@ -327,10 +327,13 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev, ...@@ -327,10 +327,13 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
mem_channel_number = igp_info->v11.umachannelnumber; mem_channel_number = igp_info->v11.umachannelnumber;
if (!mem_channel_number) if (!mem_channel_number)
mem_channel_number = 1; mem_channel_number = 1;
/* channel width is 64 */
if (vram_width)
*vram_width = mem_channel_number * 64;
mem_type = igp_info->v11.memorytype; mem_type = igp_info->v11.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) if (vram_type)
*vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
break; break;
...@@ -345,10 +348,13 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev, ...@@ -345,10 +348,13 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
mem_channel_number = igp_info->v21.umachannelnumber; mem_channel_number = igp_info->v21.umachannelnumber;
if (!mem_channel_number) if (!mem_channel_number)
mem_channel_number = 1; mem_channel_number = 1;
/* channel width is 64 */
if (vram_width)
*vram_width = mem_channel_number * 64;
mem_type = igp_info->v21.memorytype; mem_type = igp_info->v21.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) if (vram_type)
*vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment