Skip to contentSkip to conversation

drm/amdgpu/vce4: Remove vce interrupt enable related code for sriov

PATCH In review Xiangliang.Yu 2 participants 2 messages Jul 25, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/8 drm/amdgpu/vce4: Remove vce interrupt enable related code for sriov

From: Frank Min <[email protected]>

Interrupt enable is contained in vce init table and this register could not be accessed in secure ASICs, so just remove it.

---
 drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +6 -4
index 28532e3..9e0050d 100644
@@ -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;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1500974229-2482-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org

Acked-by
#2 lore raw
Quoted 7 lines · Xiangliang.Yu

From: Frank Min <[email protected]>

Interrupt enable is contained in vce init table and this register could not be accessed in secure ASICs, so just remove it.

Quoted 29 lines
---
 drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +6 -5
index 28532e3..9e0050d 100644
@@ -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;
 }
 
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx