Skip to content

Commit c92a15b

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/atomfirmware: fix parsing of vram_info
commit f6f49dd upstream. 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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 30cbf6f commit c92a15b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
387387
mem_channel_number = vram_info->v30.channel_num;
388388
mem_channel_width = vram_info->v30.channel_width;
389389
if (vram_width)
390-
*vram_width = mem_channel_number * (1 << mem_channel_width);
390+
*vram_width = mem_channel_number * 16;
391391
break;
392392
default:
393393
return -EINVAL;

0 commit comments

Comments
 (0)