Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-22 Thread Danilo Krummrich
On 7/22/25 12:52 PM, Arnd Bergmann wrote: On Tue, Jul 22, 2025, at 12:29, Chris Bainbridge wrote: On Mon, Jul 21, 2025 at 08:22:48AM -0400, Satadru Pramanik wrote: Hello all, I suspect this commit in 6.16-rc7 has broken acceleration with Mesa's nouveau drivers on my machine. Thanks for the r

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-22 Thread Arnd Bergmann
On Tue, Jul 22, 2025, at 12:29, Chris Bainbridge wrote: > On Mon, Jul 21, 2025 at 08:22:48AM -0400, Satadru Pramanik wrote: >> Hello all, >> >> I suspect this commit in 6.16-rc7 has broken acceleration with Mesa's >> nouveau drivers on my machine. >> >> glxinfo -B reports that I'm using llvmpipe.

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-22 Thread Chris Bainbridge
On Mon, Jul 21, 2025 at 08:22:48AM -0400, Satadru Pramanik wrote: > Hello all, > > I suspect this commit in 6.16-rc7 has broken acceleration with Mesa's > nouveau drivers on my machine. > > glxinfo -B reports that I'm using llvmpipe. > > Reverting this in 6.16-rc7 restores nouveau acceleration,

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-21 Thread Satadru Pramanik
Unfortunately, that doesn't seem to fix the issue. glxinfo -B still shows llvmpipe being used, just like on stock 6.16-rc7: glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa (0x) Device: llvmpi

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-21 Thread Arnd Bergmann
On Mon, Jul 21, 2025, at 14:50, Satadru Pramanik wrote: > Sure! > > Here you go. > > The command I ran was 'glxinfo -B' > > diff glxinfo_working.txt glxinfo_broken.txt Unfortunately, the 'diff' output makes this a little harder, try 'diff -u' next time. I suppose passing "-X raw" to strace would a

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-21 Thread Arnd Bergmann
On Mon, Jul 21, 2025, at 14:22, Satadru Pramanik wrote: > Hello all, > > I suspect this commit in 6.16-rc7 has broken acceleration with Mesa's > nouveau drivers on my machine. > > glxinfo -B reports that I'm using llvmpipe. Thanks for the report! Can you run the failing command with 'strace -f -o

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-21 Thread Satadru Pramanik
Hello all, I suspect this commit in 6.16-rc7 has broken acceleration with Mesa's nouveau drivers on my machine. glxinfo -B reports that I'm using llvmpipe. Reverting this in 6.16-rc7 restores nouveau acceleration, and glxinfo then reports: "OpenGL renderer string: NVE7" inxi -G Graphics: Devi

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-11 Thread Danilo Krummrich
On Fri Jul 11, 2025 at 9:24 AM CEST, Arnd Bergmann wrote: > From: Arnd Bergmann > > nouveau_drm_ioctl() only checks the _IOC_NR() bits in the DRM_NOUVEAU_NVIF > command, but ignores the type and direction bits, so any command with > '7' in the low eight bits gets passed into nouveau_abi16_ioctl()

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-11 Thread Arnd Bergmann
On Fri, Jul 11, 2025, at 19:41, Danilo Krummrich wrote: > On Fri Jul 11, 2025 at 9:24 AM CEST, Arnd Bergmann wrote: >> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c >> b/drivers/gpu/drm/nouveau/nouveau_drm.c >> index 1527b801f013..506eeb44f0d4 100644 >> --- a/drivers/gpu/drm/nouveau/nouveau_d

Re: [PATCH] drm/nouveau: check ioctl command codes better

2025-07-11 Thread Danilo Krummrich
On Fri Jul 11, 2025 at 9:24 AM CEST, Arnd Bergmann wrote: > From: Arnd Bergmann > > nouveau_drm_ioctl() only checks the _IOC_NR() bits in the DRM_NOUVEAU_NVIF > command, but ignores the type and direction bits, so any command with > '7' in the low eight bits gets passed into nouveau_abi16_ioctl()

[PATCH] drm/nouveau: check ioctl command codes better

2025-07-11 Thread Arnd Bergmann
From: Arnd Bergmann nouveau_drm_ioctl() only checks the _IOC_NR() bits in the DRM_NOUVEAU_NVIF command, but ignores the type and direction bits, so any command with '7' in the low eight bits gets passed into nouveau_abi16_ioctl() instead of drm_ioctl(). Check for all the bits except the size tha