[PATCH 2/3] drm/amdgpu: set kiq irq functions in sriov case for gfx_v9
Rex Zhu
Rex.Zhu at amd.com
Mon Apr 17 12:05:28 UTC 2017
As the kiq ring is NULL in baremetal case,
the irq function will result in a BUG_ON in some case.
Change-Id: Ib43a9a100fe7b1c03ce5fa599e631a3b21ce6e9a
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index f6b2329..59462e7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3590,9 +3590,10 @@ static void gfx_v9_0_set_irq_funcs(struct amdgpu_device *adev)
adev->gfx.priv_inst_irq.num_types = 1;
adev->gfx.priv_inst_irq.funcs = &gfx_v9_0_priv_inst_irq_funcs;
-
- adev->gfx.kiq.irq.num_types = AMDGPU_CP_KIQ_IRQ_LAST;
- adev->gfx.kiq.irq.funcs = &gfx_v9_0_kiq_irq_funcs;
+ if (amdgpu_sriov_vf(adev)) {
+ adev->gfx.kiq.irq.num_types = AMDGPU_CP_KIQ_IRQ_LAST;
+ adev->gfx.kiq.irq.funcs = &gfx_v9_0_kiq_irq_funcs;
+ }
}
static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev)
--
1.9.1
More information about the amd-gfx
mailing list