From: "Khatri, Sunil" <sukhatri@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/sdma7: properly reference trap interrupts for userqs
Date: Mon, 14 Apr 2025 23:05:54 +0530 [thread overview]
Message-ID: <35eb9c0f-da56-4e27-be10-dfd24582b9c8@amd.com> (raw)
In-Reply-To: <20250413160608.2198429-4-alexander.deucher@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
On 4/13/2025 9:36 PM, Alex Deucher wrote:
> We need to take a reference to the interrupts to make
> sure they stay enabled even if the kernel queues have
> disabled them.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 31 +++++++++++++++++++++++++-
> 1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
> index 1f3045323c929..669d1ef3fab22 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
> @@ -1352,11 +1352,39 @@ static int sdma_v7_0_sw_fini(struct amdgpu_ip_block *ip_block)
> return 0;
> }
>
> +static int sdma_v7_0_set_userq_trap_interrupts(struct amdgpu_device *adev,
> + bool enable)
> +{
> + unsigned int irq_type;
> + int i, r;
> +
> + if (adev->userq_funcs[AMDGPU_HW_IP_DMA]) {
> + for (i = 0; i < adev->sdma.num_instances; i++) {
> + irq_type = AMDGPU_SDMA_IRQ_INSTANCE0 + i;
> + if (enable)
> + r = amdgpu_irq_get(adev, &adev->sdma.trap_irq,
> + irq_type);
> + else
> + r = amdgpu_irq_put(adev, &adev->sdma.trap_irq,
> + irq_type);
> + if (r)
> + return r;
> + }
> + }
> +
> + return 0;
> +}
> +
> static int sdma_v7_0_hw_init(struct amdgpu_ip_block *ip_block)
> {
> struct amdgpu_device *adev = ip_block->adev;
> + int r;
>
> - return sdma_v7_0_start(adev);
> + r = sdma_v7_0_start(adev);
> + if (r)
> + return r;
> +
> + return sdma_v7_0_set_userq_trap_interrupts(adev, true);
> }
>
> static int sdma_v7_0_hw_fini(struct amdgpu_ip_block *ip_block)
> @@ -1368,6 +1396,7 @@ static int sdma_v7_0_hw_fini(struct amdgpu_ip_block *ip_block)
>
> sdma_v7_0_ctx_switch_enable(adev, false);
> sdma_v7_0_enable(adev, false);
> + sdma_v7_0_set_userq_trap_interrupts(adev, false);
>
> return 0;
> }
next prev parent reply other threads:[~2025-04-14 17:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-13 16:06 [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP interrupts for userqs Alex Deucher
2025-04-13 16:06 ` [PATCH 2/4] drm/amdgpu/gfx12: " Alex Deucher
2025-04-13 16:06 ` [PATCH 3/4] drm/sdma6: properly reference trap " Alex Deucher
2025-04-14 9:58 ` Khatri, Sunil
2025-04-14 15:32 ` Alex Deucher
2025-04-14 17:35 ` Khatri, Sunil
2025-04-13 16:06 ` [PATCH 4/4] drm/sdma7: " Alex Deucher
2025-04-14 17:35 ` Khatri, Sunil [this message]
2025-04-14 9:42 ` [PATCH 1/4] drm/amdgpu/gfx11: properly reference EOP " Khatri, Sunil
2025-04-14 9:51 ` Khatri, Sunil
2025-04-14 15:29 ` Alex Deucher
2025-04-14 17:17 ` Khatri, Sunil
2025-04-14 17:24 ` Alex Deucher
2025-04-14 17:33 ` Khatri, Sunil
2025-04-14 17:42 ` Khatri, Sunil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35eb9c0f-da56-4e27-be10-dfd24582b9c8@amd.com \
--to=sukhatri@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.