summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-07-24 04:56:24 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2025-07-24 04:56:24 +0300
commit25fae0b93d1d7ddb25958bcb90c3c0e5e0e202bd (patch)
tree3e7c0a45dde9d7aa8cc1162d72db10a4e8baf40d /drivers/gpu/drm/nouveau
parentf9af7b5d9349bf92cc4d0a0baa8a151295f12f4b (diff)
parent337666c522b9eca36deabf4133f7b2279155b69f (diff)
downloadlinux-master.tar.xz
Merge tag 'drm-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/kernelHEADmaster
Pull drm fixes from Dave Airlie: "This might just be part one, but I'm sending it a bit early as it has two sets of reverts for regressions, one is all the gem/dma-buf handling and another was a nouveau ioctl change. Otherwise there is an amdgpu fix, nouveau fix and a scheduler fix. If any other changes come in I'll follow up with another more usual Fri/Sat MR. gem: - revert all the dma-buf/gem changes as there as lifetime issues with them nouveau: - revert an ioctl change as it causes issues - fix NULL ptr on fermi bridge: - remove extra semicolon sched: - remove hang causing optimisation amdgpu: - fix garbage in cleared vram after resume" * tag 'drm-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/kernel: drm/bridge: ti-sn65dsi86: Remove extra semicolon in ti_sn_bridge_probe() Revert "drm/nouveau: check ioctl command codes better" drm/nouveau/nvif: fix null ptr deref on pre-fermi boards Revert "drm/gem-dma: Use dma_buf from GEM object instance" Revert "drm/gem-shmem: Use dma_buf from GEM object instance" Revert "drm/gem-framebuffer: Use dma_buf from GEM object instance" Revert "drm/prime: Use dma_buf from GEM object instance" Revert "drm/etnaviv: Use dma_buf from GEM object instance" Revert "drm/vmwgfx: Use dma_buf from GEM object instance" Revert "drm/virtio: Use dma_buf from GEM object instance" drm/sched: Remove optimization that causes hang when killing dependent jobs drm/amdgpu: Reset the clear flag in buddy during resume
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c11
-rw-r--r--drivers/gpu/drm/nouveau/nvif/chan.c3
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 7bb64fcdd497..1527b801f013 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1284,9 +1284,6 @@ nouveau_ioctls[] = {
DRM_IOCTL_DEF_DRV(NOUVEAU_EXEC, nouveau_exec_ioctl_exec, DRM_RENDER_ALLOW),
};
-#define DRM_IOCTL_NOUVEAU_NVIF _IOC(_IOC_READ | _IOC_WRITE, DRM_IOCTL_BASE, \
- DRM_COMMAND_BASE + DRM_NOUVEAU_NVIF, 0)
-
long
nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
@@ -1300,10 +1297,14 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return ret;
}
- if ((cmd & ~IOCSIZE_MASK) == DRM_IOCTL_NOUVEAU_NVIF)
+ switch (_IOC_NR(cmd) - DRM_COMMAND_BASE) {
+ case DRM_NOUVEAU_NVIF:
ret = nouveau_abi16_ioctl(filp, (void __user *)arg, _IOC_SIZE(cmd));
- else
+ break;
+ default:
ret = drm_ioctl(file, cmd, arg);
+ break;
+ }
pm_runtime_mark_last_busy(dev->dev);
pm_runtime_put_autosuspend(dev->dev);
diff --git a/drivers/gpu/drm/nouveau/nvif/chan.c b/drivers/gpu/drm/nouveau/nvif/chan.c
index baa10227d51a..80c01017d642 100644
--- a/drivers/gpu/drm/nouveau/nvif/chan.c
+++ b/drivers/gpu/drm/nouveau/nvif/chan.c
@@ -39,6 +39,9 @@ nvif_chan_gpfifo_post(struct nvif_chan *chan)
const u32 pbptr = (chan->push.cur - map) + chan->func->gpfifo.post_size;
const u32 gpptr = (chan->gpfifo.cur + 1) & chan->gpfifo.max;
+ if (!chan->func->gpfifo.post)
+ return 0;
+
return chan->func->gpfifo.post(chan, gpptr, pbptr);
}