From: Felix Kuehling <felix.kuehling@amd.com>
To: Jonathan Kim <Jonathan.Kim@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Ruili.Ji@amd.com, JinHuiEricHuang@amd.com, Shikai.Guo@amd.com
Subject: Re: [PATCH] drm/amdkfd: fix add queue process context clear for hsa non-init cases
Date: Tue, 12 Sep 2023 20:35:37 -0400 [thread overview]
Message-ID: <97d7d655-66b8-e117-471e-0785affeb660@amd.com> (raw)
In-Reply-To: <20230912121721.3035694-1-Jonathan.Kim@amd.com>
On 2023-09-12 8:17, Jonathan Kim wrote:
> There are cases where HSA is not initialized when adding queues
This statement doesn't make sense to me. If HSA is not initialized, it
means user mode hasn't opened the KFD device. So it can't create queues.
What do you really mean here?
Regards,
Felix
> and
> the ADD_QUEUE API should clear the MES process context instead of
> SET_SHADER_DEBUGGER.
>
> The only time ADD_QUEUE.skip_process_ctx_clear is required is for
> debugger use cases and a debugged process is always runtime enabled
> when adding a queue.
>
> Tested-by: Shikai Guo <shikai.guo@amd.com>
> Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> index 6d07a5dd2648..77159b03a422 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> @@ -227,8 +227,10 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
> queue_input.tba_addr = qpd->tba_addr;
> queue_input.tma_addr = qpd->tma_addr;
> queue_input.trap_en = !kfd_dbg_has_cwsr_workaround(q->device);
> - queue_input.skip_process_ctx_clear = qpd->pqm->process->debug_trap_enabled ||
> - kfd_dbg_has_ttmps_always_setup(q->device);
> + queue_input.skip_process_ctx_clear =
> + qpd->pqm->process->runtime_info.runtime_state == DEBUG_RUNTIME_STATE_ENABLED &&
> + (qpd->pqm->process->debug_trap_enabled ||
> + kfd_dbg_has_ttmps_always_setup(q->device));
>
> queue_type = convert_to_mes_queue_type(q->properties.type);
> if (queue_type < 0) {
next prev parent reply other threads:[~2023-09-13 0:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 12:17 [PATCH] drm/amdkfd: fix add queue process context clear for hsa non-init cases Jonathan Kim
2023-09-12 12:19 ` Kim, Jonathan
2023-09-13 0:35 ` Felix Kuehling [this message]
2023-09-13 0:53 ` Kim, Jonathan
2023-09-13 1:01 ` Felix Kuehling
2023-09-13 1:40 ` Kim, Jonathan
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=97d7d655-66b8-e117-471e-0785affeb660@amd.com \
--to=felix.kuehling@amd.com \
--cc=JinHuiEricHuang@amd.com \
--cc=Jonathan.Kim@amd.com \
--cc=Ruili.Ji@amd.com \
--cc=Shikai.Guo@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.