drm/amdgpu: fix VM size reporting on Raven
authorChristian König <christian.koenig@amd.com>
Wed, 15 Aug 2018 12:04:47 +0000 (14:04 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:11:02 +0000 (11:11 -0500)
Raven doesn't have an VCE block and so also no buggy VCE firmware.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index a1043b4..0c5d59b 100644 (file)
@@ -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;