OSDN Git Service

drm/amdgpu: drop psp ih programming for sriov guest on navi
authorHawking Zhang <Hawking.Zhang@amd.com>
Tue, 22 Dec 2020 10:16:11 +0000 (18:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Dec 2020 20:07:50 +0000 (15:07 -0500)
the psp access ih path is not needed in navi

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jane Jian <Jane.Jian@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/navi10_ih.c

index 0603576..f4e4040 100644 (file)
@@ -151,14 +151,7 @@ static int navi10_ih_toggle_ring_interrupts(struct amdgpu_device *adev,
        /* enable_intr field is only valid in ring0 */
        if (ih == &adev->irq.ih)
                tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, ENABLE_INTR, (enable ? 1 : 0));
-       if (amdgpu_sriov_vf(adev)) {
-               if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp)) {
-                       dev_err(adev->dev, "PSP program IH_RB_CNTL failed!\n");
-                       return -ETIMEDOUT;
-               }
-       } else {
-               WREG32(ih_regs->ih_rb_cntl, tmp);
-       }
+       WREG32(ih_regs->ih_rb_cntl, tmp);
 
        if (enable) {
                ih->enabled = true;
@@ -268,14 +261,7 @@ static int navi10_ih_enable_ring(struct amdgpu_device *adev,
                tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_ENABLE, 0);
                tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_FULL_DRAIN_ENABLE, 1);
        }
-       if (amdgpu_sriov_vf(adev)) {
-               if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp)) {
-                       dev_err(adev->dev, "PSP program IH_RB_CNTL failed!\n");
-                       return -ETIMEDOUT;
-               }
-       } else {
-               WREG32(ih_regs->ih_rb_cntl, tmp);
-       }
+       WREG32(ih_regs->ih_rb_cntl, tmp);
 
        if (ih == &adev->irq.ih) {
                /* set the ih ring 0 writeback address whether it's enabled or not */