drm/amdgpu: allow harvesting check for Polaris VCE
authorLeo Liu <leo.liu@amd.com>
Wed, 1 Nov 2017 01:12:35 +0000 (21:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 Nov 2017 03:37:16 +0000 (23:37 -0400)
Fixes init failures on Polaris cards with harvested
VCE blocks.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c

index 90332f55cfba91b7a543da4ec3820809bb876336..cf81065e3c5ab95030f24f4a883924f27c71bc90 100644 (file)
@@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
 {
        u32 tmp;
 
-       /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */
        if ((adev->asic_type == CHIP_FIJI) ||
-           (adev->asic_type == CHIP_STONEY) ||
-           (adev->asic_type == CHIP_POLARIS10) ||
-           (adev->asic_type == CHIP_POLARIS11) ||
-           (adev->asic_type == CHIP_POLARIS12))
+           (adev->asic_type == CHIP_STONEY))
                return AMDGPU_VCE_HARVEST_VCE1;
 
-       /* Tonga and CZ are dual or single pipe */
        if (adev->flags & AMD_IS_APU)
                tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) &
                       VCE_HARVEST_FUSE_MACRO__MASK) >>
@@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
        case 3:
                return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
        default:
+               if ((adev->asic_type == CHIP_POLARIS10) ||
+                   (adev->asic_type == CHIP_POLARIS11) ||
+                   (adev->asic_type == CHIP_POLARIS12))
+                       return AMDGPU_VCE_HARVEST_VCE1;
+
                return 0;
        }
 }