* [PATCH] drm/amdgpu: set kiq irq in sriov case for gfx_v9.
@ 2017-04-17 12:30 Rex Zhu
[not found] ` <1492432250-23878-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Rex Zhu @ 2017-04-17 12:30 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
As the kiq ring is NULL in baremetal case,
the irq function will result in a BUG_ON in some case.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 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..35657c3 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1029,9 +1029,11 @@ static int gfx_v9_0_sw_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
/* KIQ event */
- r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP, 178, &adev->gfx.kiq.irq);
- if (r)
- return r;
+ if (amdgpu_sriov_vf()) {
+ r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP, 178, &adev->gfx.kiq.irq);
+ if (r)
+ return r;
+ }
/* EOP Event */
r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP, 181, &adev->gfx.eop_irq);
@@ -3590,9 +3592,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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: set kiq irq in sriov case for gfx_v9.
[not found] ` <1492432250-23878-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-17 18:00 ` Alex Deucher
2017-04-18 2:25 ` Yu, Xiangliang
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2017-04-17 18:00 UTC (permalink / raw)
To: Rex Zhu; +Cc: amd-gfx list
On Mon, Apr 17, 2017 at 8:30 AM, Rex Zhu <Rex.Zhu@amd.com> wrote:
> As the kiq ring is NULL in baremetal case,
> the irq function will result in a BUG_ON in some case.
>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
We need to rework this eventually to mirror gfx8 so we can enable KIQ
for gfx9 bare metal, but for now:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 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..35657c3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1029,9 +1029,11 @@ static int gfx_v9_0_sw_init(void *handle)
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> /* KIQ event */
> - r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP, 178, &adev->gfx.kiq.irq);
> - if (r)
> - return r;
> + if (amdgpu_sriov_vf()) {
> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP, 178, &adev->gfx.kiq.irq);
> + if (r)
> + return r;
> + }
>
> /* EOP Event */
> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP, 181, &adev->gfx.eop_irq);
> @@ -3590,9 +3592,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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amdgpu: set kiq irq in sriov case for gfx_v9.
[not found] ` <1492432250-23878-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-04-17 18:00 ` Alex Deucher
@ 2017-04-18 2:25 ` Yu, Xiangliang
1 sibling, 0 replies; 3+ messages in thread
From: Yu, Xiangliang @ 2017-04-18 2:25 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Zhu, Rex
Please refer to commit 4e683cb26 that fix for gfx8, I think the commit can also fix BUG_ON case of gfx9.
Thanks!
Xiangliang Yu
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Monday, April 17, 2017 8:31 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhu, Rex <Rex.Zhu@amd.com>
> Subject: [PATCH] drm/amdgpu: set kiq irq in sriov case for gfx_v9.
>
> As the kiq ring is NULL in baremetal case, the irq function will result in a
> BUG_ON in some case.
>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 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..35657c3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1029,9 +1029,11 @@ static int gfx_v9_0_sw_init(void *handle)
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> /* KIQ event */
> - r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP,
> 178, &adev->gfx.kiq.irq);
> - if (r)
> - return r;
> + if (amdgpu_sriov_vf()) {
> + r = amdgpu_irq_add_id(adev,
> AMDGPU_IH_CLIENTID_GRBM_CP, 178, &adev->gfx.kiq.irq);
> + if (r)
> + return r;
> + }
>
> /* EOP Event */
> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_GRBM_CP,
> 181, &adev->gfx.eop_irq); @@ -3590,9 +3592,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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-18 2:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-17 12:30 [PATCH] drm/amdgpu: set kiq irq in sriov case for gfx_v9 Rex Zhu
[not found] ` <1492432250-23878-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-04-17 18:00 ` Alex Deucher
2017-04-18 2:25 ` Yu, Xiangliang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.