Skip to contentSkip to conversation

drm/nouveau: Skip the Turing CE workaround object for non-GR channels

PATCH In review Mary Guillemard 3 participants 3 messages Oct 7 – Oct 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: Skip the Turing CE workaround object for non-GR channels

This workaround is here for the old Gallium driver and predate async CE and NVDEC. Instead of only skipping it for NVDEC, let's only apply it in case of GR channels.

This should make async CE work properly on Turing by stopping the assign of a GRCE. (here CE0)

---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_abi16.c +1 -1
index e907c1d07887..e876f154963d 100644
@@ -488,7 +488,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
 			goto done;
 		break;
 	case NV_DEVICE_INFO_V0_TURING:
-		if (engine != NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC) {
+		if (engine == NV_DEVICE_HOST_RUNLIST_ENGINES_GR) {
 			ret = nvif_object_ctor(&chan->chan->user, "abi16CeWar",
 					       0, TURING_DMA_COPY_A, NULL, 0,
 					       &chan->ce);

---
base-commit: 70456f05d4b6396b22048c4b8cd3cb98ecf9f9e3
change-id: 20261007-turing-async-ce-fix-42e179e27d4a

Best regards,

Signature · 1 line
Mary Guillemard <[email protected]>
maintainer Reviewed-by on v1 1/1
#1 lore raw

Will push to drm-misc-fixes in just a moment

Quoted 39 lines · Mary Guillemard

This workaround is here for the old Gallium driver and predate async CE
and NVDEC.  Instead of only skipping it for NVDEC, let's only apply it
in case of GR channels.

This should make async CE work properly on Turing by stopping the assign
of a GRCE. (here CE0)

---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_abi16.c +0 -0
index e907c1d07887..e876f154963d 100644
@@ -488,7 +488,7 @@
 nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
  			goto done;
  		break;

  case NV_DEVICE_INFO_V0_TURING:

drivers/gpu/drm/nouveau/nouveau_abi16.c +0 -1
-		if (engine != NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC)

{

drivers/gpu/drm/nouveau/nouveau_abi16.c +1 -0
+		if (engine == NV_DEVICE_HOST_RUNLIST_ENGINES_GR) {

  ret = nvif_object_ctor(&chan->chan->user, "abi16CeWar",
         0, TURING_DMA_COPY_A, NULL, 0,
         &chan->ce);

---
base-commit: 70456f05d4b6396b22048c4b8cd3cb98ecf9f9e3
change-id: 20261007-turing-async-ce-fix-42e179e27d4a

Best regards,

Reviewed-by on v1 1/1
#2 lore raw
In reply to Mary Guillemard
Quoted 35 lines · Mary Guillemard

This workaround is here for the old Gallium driver and predate async CE and NVDEC. Instead of only skipping it for NVDEC, let's only apply it in case of GR channels.

This should make async CE work properly on Turing by stopping the assign of a GRCE. (here CE0)

---
drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_abi16.c +1 -2
index e907c1d07887..e876f154963d 100644
@@ -488,7 +488,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
           goto done;
       break;
   case NV_DEVICE_INFO_V0_TURING:
-        if (engine != NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC) {
+        if (engine == NV_DEVICE_HOST_RUNLIST_ENGINES_GR) {
           ret = nvif_object_ctor(&chan->chan->user, "abi16CeWar",
                          0, TURING_DMA_COPY_A, NULL, 0,
                          &chan->ce);
 
---

base-commit: 70456f05d4b6396b22048c4b8cd3cb98ecf9f9e3
change-id: 20261007-turing-async-ce-fix-42e179e27d4a

Quoted 4 lines

Best regards,
--
Mary Guillemard <[email protected]>

Sorry, it didn’t occur to me to do this instead of the NVDEC only fix.