OSDN Git Service

drm/amdgpu: fixup bad vram size on gmc v8
authorZongmin Zhou <zhouzongmin@kylinos.cn>
Wed, 15 Dec 2021 09:23:37 +0000 (17:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Dec 2021 21:05:21 +0000 (16:05 -0500)
commit11544d77e3974924c5a9c8a8320b996a3e9b2f8b
tree4282928d5d852620e842fda170804798447e4095
parent88eabcb8e6965b38331618f60567dfe92ad3c42c
drm/amdgpu: fixup bad vram size on gmc v8

Some boards(like RX550) seem to have garbage in the upper
16 bits of the vram size register.  Check for
this and clamp the size properly.  Fixes
boards reporting bogus amounts of vram.

after add this patch,the maximum GPU VRAM size is 64GB,
otherwise only 64GB vram size will be used.

Signed-off-by: Zongmin Zhou<zhouzongmin@kylinos.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c