From: Danilo Krummrich <dakr@kernel.org>
To: Alexandre Courbot <acourbot@nvidia.com>, Zhi Wang <zhiw@nvidia.com>
Cc: nouveau@lists.freedesktop.org, airlied@gmail.com,
daniel@ffwll.ch, bskeggs@nvidia.com, acurrid@nvidia.com,
cjia@nvidia.com, smitra@nvidia.com, ankita@nvidia.com,
aniketa@nvidia.com, kwankhede@nvidia.com, targupta@nvidia.com,
zhiwang@kernel.org,
Nouveau <nouveau-bounces@lists.freedesktop.org>
Subject: Re: [PATCH 3/5] drm/nouveau/nvkm: introduce new GSP reply policy NVKM_GSP_RPC_REPLY_POLL
Date: Wed, 12 Feb 2025 14:33:14 +0100 [thread overview]
Message-ID: <Z6yjGoOPkZdjXRrY@pollux> (raw)
In-Reply-To: <D7Q9SQ3YZD6V.1QXQ18Y0EVOML@nvidia.com>
On Wed, Feb 12, 2025 at 03:57:38PM +0900, Alexandre Courbot wrote:
> On Sat Feb 8, 2025 at 2:58 AM JST, Zhi Wang wrote:
> > There can be multiple cases of handling the GSP RPC messages, which
> > are the reply of GSP RPC commands according to the requirement of the
> > callers and the nature of the GSP RPC commands.
> >
> > Some GSP RPC command needs a new reply policy: "caller don't care about
> > the message content but want to make sure a reply is received". To
> > support this case, a new reply policy is introduced.
> >
> > Introduce new reply policy NVKM_GSP_RPC_REPLY_POLL, which waits for the
> > returned GSP message but discards it for the caller.
> >
> > No functional change is intended.
> >
> > Signed-off-by: Zhi Wang <zhiw@nvidia.com>
> > ---
> > drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 +
> > drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 3 +++
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
> > index c467e44cab47..bc16510261b8 100644
> > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
> > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
> > @@ -33,6 +33,7 @@ typedef void (*nvkm_gsp_event_func)(struct nvkm_gsp_event *, void *repv, u32 rep
> >
> > enum {
> > NVKM_GSP_RPC_REPLY_RECV = 1,
> > + NVKM_GSP_RPC_REPLY_POLL,
> > };
> >
> > struct nvkm_gsp {
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> > index bc8eb9a3cb28..af2836cca38f 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> > @@ -601,6 +601,9 @@ r535_gsp_rpc_handle_reply(struct nvkm_gsp *gsp, u32 fn, int reply,
> > else
> > repv = msg;
> > break;
> > + case NVKM_GSP_RPC_REPLY_POLL:
> > + repv = r535_gsp_msg_recv(gsp, fn, 0);
> > + break;
> > default:
> > repv = ERR_PTR(-EINVAL);
> > break;
>
> I suspect patch 4 can be merged into this one, so we introduce the user
> at the same time as the functionality.
I agree, please merge this one with patch 4 and add the corresponding 'Fixes'
tag.
next prev parent reply other threads:[~2025-02-12 13:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 17:58 [PATCH 0/5] NVKM GSP RPC message handling policy Zhi Wang
2025-02-07 17:58 ` [PATCH 1/5] drm/nouveau/nvkm: factor out r535_gsp_rpc_handle_reply() Zhi Wang
2025-02-12 6:32 ` Alexandre Courbot
2025-02-07 17:58 ` [PATCH 2/5] drm/nouveau/nvkm: factor out the current RPC command reply policies Zhi Wang
2025-02-12 6:55 ` Alexandre Courbot
2025-02-12 19:56 ` Zhi Wang
2025-02-07 17:58 ` [PATCH 3/5] drm/nouveau/nvkm: introduce new GSP reply policy NVKM_GSP_RPC_REPLY_POLL Zhi Wang
2025-02-12 6:57 ` Alexandre Courbot
2025-02-12 13:33 ` Danilo Krummrich [this message]
2025-02-12 19:59 ` Zhi Wang
2025-02-07 17:58 ` [PATCH 4/5] drm/nouveau/nvkm: use the new policy for NV_VGPU_MSG_FUNCTION_ALLOC_MEMORY Zhi Wang
2025-02-07 17:58 ` [PATCH 5/5] drm/nouveau/nvkm: introduce a kernel doc for GSP message handling Zhi Wang
2025-02-12 6:59 ` Alexandre Courbot
2025-02-12 13:36 ` [PATCH 0/5] NVKM GSP RPC message handling policy Danilo Krummrich
2025-02-20 20:48 ` Ben Skeggs
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=Z6yjGoOPkZdjXRrY@pollux \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=acurrid@nvidia.com \
--cc=airlied@gmail.com \
--cc=aniketa@nvidia.com \
--cc=ankita@nvidia.com \
--cc=bskeggs@nvidia.com \
--cc=cjia@nvidia.com \
--cc=daniel@ffwll.ch \
--cc=kwankhede@nvidia.com \
--cc=nouveau-bounces@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.org \
--cc=smitra@nvidia.com \
--cc=targupta@nvidia.com \
--cc=zhiw@nvidia.com \
--cc=zhiwang@kernel.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.