From: Alex Deucher Date: Tue, 28 Mar 2017 16:19:31 +0000 (-0400) Subject: drm/amdgpu: refine the logic in amdgpu_need_post() X-Git-Tag: v4.14-rc1~674^2~26^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2713e8c2a34711ed820a3095a7c5f4a0c85df1c;p=platform%2Fkernel%2Flinux-rpi3.git drm/amdgpu: refine the logic in amdgpu_need_post() We check the mem config register to make sure it's been programmed by the vbios to determine if we need to post so we check for a non-0 value. However, when the asic comes out of reset, we may see all ones here, so check for that too. Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index abb51bd..ae31744 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev) /* then check MEM_SIZE, in case the crtcs are off */ reg = amdgpu_asic_get_config_memsize(adev); - if (reg) + if ((reg != 0) && (reg != 0xffffffff)) return false; return true;