drm/amdgpu/vcn2.5: convert to IP version checking
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Aug 2021 21:10:52 +0000 (17:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Oct 2021 19:23:00 +0000 (15:23 -0400)
Use IP versions rather than asic_type to differentiate
IP version specific features.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c

index 1780ad1eacd67ea8803dab54bbee217188f41984..b76d96559029eea27b3f93bb447efeadf41707ec 100644 (file)
@@ -1720,7 +1720,7 @@ static void vcn_v2_5_set_dec_ring_funcs(struct amdgpu_device *adev)
        for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
                if (adev->vcn.harvest_config & (1 << i))
                        continue;
-               if (adev->asic_type == CHIP_ARCTURUS)
+               if (adev->ip_versions[UVD_HWIP] == IP_VERSION(2, 5, 0))
                        adev->vcn.inst[i].ring_dec.funcs = &vcn_v2_5_dec_ring_vm_funcs;
                else /* CHIP_ALDEBARAN */
                        adev->vcn.inst[i].ring_dec.funcs = &vcn_v2_6_dec_ring_vm_funcs;
@@ -1737,7 +1737,7 @@ static void vcn_v2_5_set_enc_ring_funcs(struct amdgpu_device *adev)
                if (adev->vcn.harvest_config & (1 << j))
                        continue;
                for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
-                       if (adev->asic_type == CHIP_ARCTURUS)
+                       if (adev->ip_versions[UVD_HWIP] == IP_VERSION(2, 5, 0))
                                adev->vcn.inst[j].ring_enc[i].funcs = &vcn_v2_5_enc_ring_vm_funcs;
                        else /* CHIP_ALDEBARAN */
                                adev->vcn.inst[j].ring_enc[i].funcs = &vcn_v2_6_enc_ring_vm_funcs;