drm/amdgpu: fix regression in vbios reservation handling on headless
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Dec 2020 16:00:47 +0000 (11:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:54 +0000 (11:53 +0100)
commitc51e3679ebb532ad05483738ead6eb0a59c985a0
treef6d7694c82c151f4f0c67014f0e01afbab2d3fd9
parent33e8ef090befe0e1177183ef2d0a5c16abbf3495
drm/amdgpu: fix regression in vbios reservation handling on headless

[ Upstream commit 7eded018bfeccb365963bb51be731a9f99aeea59 ]

We need to move the check under the non-headless case, otherwise
we always reserve the VGA save size.

Fixes: 157fe68d74c2ad ("drm/amdgpu: fix size calculation with stolen vga memory")
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c