drm/amdgpu: Remove extra asic type check
authorJames Zhu <James.Zhu@amd.com>
Wed, 3 Jun 2020 13:29:27 +0000 (09:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Jul 2020 20:20:35 +0000 (16:20 -0400)
vcn ip block is already selected based on ASIC type during set_ip_blocks

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c

index e99bef6e235420d14bd824c0d4125df0737a522d..2719ef9de3bd996d81ba9979adaa0e9009712bde 100644 (file)
@@ -80,23 +80,18 @@ static int vcn_v2_5_early_init(void *handle)
                adev->vcn.harvest_config = 0;
                adev->vcn.num_enc_rings = 1;
        } else {
-               if (adev->asic_type == CHIP_ARCTURUS) {
-                       u32 harvest;
-                       int i;
-
-                       adev->vcn.num_vcn_inst = VCN25_MAX_HW_INSTANCES_ARCTURUS;
-                       for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
-                               harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING);
-                               if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
-                                       adev->vcn.harvest_config |= 1 << i;
-                       }
-
-                       if (adev->vcn.harvest_config == (AMDGPU_VCN_HARVEST_VCN0 |
-                                               AMDGPU_VCN_HARVEST_VCN1))
-                               /* both instances are harvested, disable the block */
-                               return -ENOENT;
-               } else
-                       adev->vcn.num_vcn_inst = 1;
+               u32 harvest;
+               int i;
+               adev->vcn.num_vcn_inst = VCN25_MAX_HW_INSTANCES_ARCTURUS;
+               for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
+                       harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING);
+                       if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
+                               adev->vcn.harvest_config |= 1 << i;
+               }
+               if (adev->vcn.harvest_config == (AMDGPU_VCN_HARVEST_VCN0 |
+                                       AMDGPU_VCN_HARVEST_VCN1))
+                       /* both instances are harvested, disable the block */
+                       return -ENOENT;
 
                adev->vcn.num_enc_rings = 2;
        }