Skip to content

Commit f6f49dd

Browse files
committed
drm/amdgpu/atomfirmware: fix parsing of vram_info
v3.x changed the how vram width was encoded. The previous implementation actually worked correctly for most boards. Fix the implementation to work correctly everywhere. This fixes the vram width reported in the kernel log on some boards. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent c223376 commit f6f49dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
400400
mem_channel_number = vram_info->v30.channel_num;
401401
mem_channel_width = vram_info->v30.channel_width;
402402
if (vram_width)
403-
*vram_width = mem_channel_number * (1 << mem_channel_width);
403+
*vram_width = mem_channel_number * 16;
404404
break;
405405
default:
406406
return -EINVAL;

0 commit comments

Comments
 (0)