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)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Dec 2020 16:35:42 +0000 (11:35 -0500)
commit7eded018bfeccb365963bb51be731a9f99aeea59
treebead5a01643c90923a0fc6e9846b351008f93ca0
parent3aa883ac8eea38281f97a7409d2922e6f343bf6c
drm/amdgpu: fix regression in vbios reservation handling on headless

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c