drm/amdgpu: Fix logic error
authorKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Tue, 29 Nov 2022 07:10:32 +0000 (15:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 29 Nov 2022 16:03:39 +0000 (11:03 -0500)
This commit fixes logic error in function 'amdgpu_hw_ip_info':
       - value 'uvd' might be 'vcn'.

Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index ba348046fcec98791a7d812f713dcf3692b6eab2..7aa7e52ca78446493a0e9cc059aaefb9dd3afc04 100644 (file)
@@ -431,7 +431,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
        case AMDGPU_HW_IP_VCN_DEC:
                type = AMD_IP_BLOCK_TYPE_VCN;
                for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
-                       if (adev->uvd.harvest_config & (1 << i))
+                       if (adev->vcn.harvest_config & (1 << i))
                                continue;
 
                        if (adev->vcn.inst[i].ring_dec.sched.ready)
@@ -443,7 +443,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
        case AMDGPU_HW_IP_VCN_ENC:
                type = AMD_IP_BLOCK_TYPE_VCN;
                for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
-                       if (adev->uvd.harvest_config & (1 << i))
+                       if (adev->vcn.harvest_config & (1 << i))
                                continue;
 
                        for (j = 0; j < adev->vcn.num_enc_rings; j++)