drm/amdgpu/vce4: Remove vce interrupt enable related code for sriov
authorFrank Min <Frank.Min@amd.com>
Mon, 12 Jun 2017 03:31:55 +0000 (11:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2017 18:45:46 +0000 (14:45 -0400)
Interrupt enable is contained in vce init table and this register could
not be accessed in secure ASICs, so just remove it.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

index 28532e39d0b531efb5b2e1de1fd398035819963a..9e0050d8b85294c5f363410bc16926fcb3075e75 100644 (file)
@@ -992,11 +992,13 @@ static int vce_v4_0_set_interrupt_state(struct amdgpu_device *adev,
 {
        uint32_t val = 0;
 
-       if (state == AMDGPU_IRQ_STATE_ENABLE)
-               val |= VCE_SYS_INT_EN__VCE_SYS_INT_TRAP_INTERRUPT_EN_MASK;
+       if (!amdgpu_sriov_vf(adev)) {
+               if (state == AMDGPU_IRQ_STATE_ENABLE)
+                       val |= VCE_SYS_INT_EN__VCE_SYS_INT_TRAP_INTERRUPT_EN_MASK;
 
-       WREG32_P(SOC15_REG_OFFSET(VCE, 0, mmVCE_SYS_INT_EN), val,
-                       ~VCE_SYS_INT_EN__VCE_SYS_INT_TRAP_INTERRUPT_EN_MASK);
+               WREG32_P(SOC15_REG_OFFSET(VCE, 0, mmVCE_SYS_INT_EN), val,
+                               ~VCE_SYS_INT_EN__VCE_SYS_INT_TRAP_INTERRUPT_EN_MASK);
+       }
        return 0;
 }