drm/amdgpu/vce4: remove interrupt mask clearance for SRIOV

Submitted by Yu, Xiangliang on Sept. 14, 2017, 7:59 a.m.

Details

Message ID 1505375947-8318-1-git-send-email-Xiangliang.Yu@amd.com
State New
Headers show
Series "drm/amdgpu/vce4: remove interrupt mask clearance for SRIOV" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Sept. 14, 2017, 7:59 a.m.
For SRIOV, the clearance has been moved to firmware. So don't need
it any more.

Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index 11134d5..d5dc6ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
@@ -1011,9 +1011,10 @@  static int vce_v4_0_process_interrupt(struct amdgpu_device *adev,
 {
 	DRM_DEBUG("IH: VCE\n");
 
-	WREG32_P(SOC15_REG_OFFSET(VCE, 0, mmVCE_SYS_INT_STATUS),
-			VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK,
-			~VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK);
+	if (!amdgpu_sriov_vf(adev))
+		WREG32_P(SOC15_REG_OFFSET(VCE, 0, mmVCE_SYS_INT_STATUS),
+			 VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK,
+			 ~VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK);
 
 	switch (entry->src_data[0]) {
 	case 0:

Comments

> -----Original Message-----

> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Xiangliang.Yu

> Sent: Thursday, September 14, 2017 3:59 AM

> To: amd-gfx@lists.freedesktop.org

> Cc: Yu, Xiangliang; Liu, Leo

> Subject: [PATCH] drm/amdgpu/vce4: remove interrupt mask clearance for

> SRIOV

> 

> For SRIOV, the clearance has been moved to firmware. So don't need

> it any more.

> 


It would be good to check if we need this on bare metal as well.  I'd like to try and keep as much code common as possible.

> Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>


Acked-by: Alex Deucher <alexander.deucher@amd.com>


> ---

>  drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 7 ++++---

>  1 file changed, 4 insertions(+), 3 deletions(-)

> 

> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

> b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

> index 11134d5..d5dc6ec 100644

> --- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

> @@ -1011,9 +1011,10 @@ static int vce_v4_0_process_interrupt(struct

> amdgpu_device *adev,

>  {

>  	DRM_DEBUG("IH: VCE\n");

> 

> -	WREG32_P(SOC15_REG_OFFSET(VCE, 0, mmVCE_SYS_INT_STATUS),

> -

> 	VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MAS

> K,

> -

> 	~VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MA

> SK);

> +	if (!amdgpu_sriov_vf(adev))

> +		WREG32_P(SOC15_REG_OFFSET(VCE, 0,

> mmVCE_SYS_INT_STATUS),

> +

> VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK,

> +

> ~VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK);

> 

>  	switch (entry->src_data[0]) {

>  	case 0:

> --

> 2.7.4

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx