Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
··· 400 400 mem_channel_number = vram_info->v30.channel_num; 401 401 mem_channel_width = vram_info->v30.channel_width; 402 402 if (vram_width) 403 - *vram_width = mem_channel_number * (1 << mem_channel_width); 403 + *vram_width = mem_channel_number * 16; 404 404 break; 405 405 default: 406 406 return -EINVAL;