From: Munique Feitoza <muniquefeitoz4@gmail.com>
To: Lyude Paul <lyude@redhat.com>, Danilo Krummrich <dakr@kernel.org>
Cc: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Munique Feitoza <muniquefeitoz4@gmail.com>
Subject: [PATCH] drm/nouveau: Fix CE channel creation on pre-Kepler GPUs
Date: Fri, 30 Oct 2026 17:28:09 -0300 [thread overview]
Message-ID: <20261030202809.28723-1-muniquefeitoz4@gmail.com> (raw)
Commit 04e0481526e3 ("nouveau/dmem: Fix privileged error in copy engine
channel") changed nouveau_accel_ce_init() to unconditionally request a
privileged channel (priv = true) when calling nouveau_channel_new().
However, privileged channels (func->ramfc->priv) are only supported on
Kepler (gk104_chan_ramfc) and newer FIFO implementations. On pre-Kepler
GPUs that expose a Copy Engine runlist, func->ramfc->priv is false,
which causes nvkm_chan_new_() to reject the channel creation with
-EINVAL:
nouveau 0000:01:00.0: DRM: failed to create ce channel, -22
Specifically, this affects:
- Tesla GT215 (NVA3), GT216 (NVA5), GT218 (NVA8), and MCP89 (NVAF)
using g84_chan_ramfc (GeForce GT 210/220/240, 310/320M/330M, etc.).
- Fermi GF100 (NVC0), GF108 (NVC1), GF106 (NVC3), GF104 (NVC4),
GF110 (NVC8), GF114 (NVCE), GF116 (NVCF), GF117 (NVD7), and
GF119 (NVD9) using gf100_chan_ramfc (GeForce GTX 400/500 series and
Fermi-based GeForce GT 600/700 series such as the GT 730).
As a result, drm->cechan remains NULL on Fermi GPUs and TTM buffer moves
in nouveau_bo_move_init() cannot use the dedicated hardware Copy Engines
(COPY0/COPY1), falling back to M2MF on the main graphics channel.
Only request a privileged CE channel when device->info.family >=
NV_DEVICE_INFO_V0_KEPLER.
Fixes: 04e0481526e3 ("nouveau/dmem: Fix privileged error in copy engine channel")
Signed-off-by: Munique Feitoza <muniquefeitoz4@gmail.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 5e1336615..0a15f1281 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -337,6 +337,7 @@ static void
nouveau_accel_ce_init(struct nouveau_drm *drm)
{
struct nvif_device *device = &drm->client.device;
+ bool priv;
u64 runm;
int ret = 0;
@@ -349,7 +350,13 @@ nouveau_accel_ce_init(struct nouveau_drm *drm)
return;
}
- ret = nouveau_channel_new(&drm->client, true, runm, NvDmaFB, NvDmaTT, &drm->cechan);
+ /* nouveau_dmem copies require a privileged channel, which is only
+ * supported by Kepler and newer FIFO implementations.
+ */
+ priv = device->info.family >= NV_DEVICE_INFO_V0_KEPLER;
+
+ ret = nouveau_channel_new(&drm->client, priv, runm, NvDmaFB, NvDmaTT,
+ &drm->cechan);
if (ret)
NV_ERROR(drm, "failed to create ce channel, %d\n", ret);
}
--
2.56.0
reply other threads:[~2026-10-30 20:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261030202809.28723-1-muniquefeitoz4@gmail.com \
--to=muniquefeitoz4@gmail.com \
--cc=airlied@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=simona@ffwll.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®