From: Christian König Date: Wed, 15 Aug 2018 12:04:47 +0000 (+0200) Subject: drm/amdgpu: fix VM size reporting on Raven X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=09b6f25b55d9c66af7302e1f09ad90aa5b1dfbcb;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: fix VM size reporting on Raven Raven doesn't have an VCE block and so also no buggy VCE firmware. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Chunming Zhou Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index a1043b421e3e..0c5d59b89849 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -619,7 +619,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file vm_size -= AMDGPU_VA_RESERVED_SIZE; /* Older VCE FW versions are buggy and can handle only 40bits */ - if (adev->vce.fw_version < AMDGPU_VCE_FW_53_45) + if (adev->vce.fw_version && + adev->vce.fw_version < AMDGPU_VCE_FW_53_45) vm_size = min(vm_size, 1ULL << 40); dev_info.virtual_address_offset = AMDGPU_VA_RESERVED_SIZE;