On 3/25/24 07:57, Patrick Shanahan wrote:
* Masaru Nomiya <nomiya@lake.dti.ne.jp> [03-25-24 00:46]:
Hello,
In the Message;
Subject : Re: Again: error with kernel 6.8.1-1 when compiling nVidia Message-ID : <987fc246-4e3f-456e-b01f-f5128fcc8985@yahoo.de> Date & Time: Sat, 23 Mar 2024 20:28:12 +0100
[PM] == Peter Maffter via openSUSE Users <users@lists.opensuse.org> has written:
[...] PM> after editing nvidia-drm-drv.c and replacing DRM_UNLOCKED with 0 according to PM> https://github.com/CachyOS/kernel-patches/blob/master/6.8/misc/nvidia/0001-n... [...]
I don't think 'replacing DRM_UNLOCKED with 0' is correct. So, looking at 550.67, replacing 'DRM_RENDER_ALLOW|0' seems correct.
I've created a patch along these lines, so please give it a try.
The patched driver is created as follows;
$ sh ./NVIDIA-Linux-x86_64-390.157.run --apply-patch 390.patch
on my nvidia modules I see: static const enum drm_ioctl_flags DRM_UNLOCKED = 0;
This is the patch we use on Arch with the 390.xx driver. Works fine. Patched before update to 6.8 and dkms handled it all automagically on kernel update: 20:33 wizard:~/dev/embedded-rpz/old> cat ~/cnf/nvidia/kernel-6.8.patch From a23d8d2c592028bc49570a6d3dcf75ee4aa0dde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com> Date: Fri, 2 Feb 2024 19:19:04 +0000 Subject: [PATCH] Tentative fix for NVIDIA 470.223.02 driver for Linux 6.8-rc3 --- nvidia-drm/nvidia-drm-drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c index 5ef557c..d271551 100644 --- a/nvidia-drm/nvidia-drm-drv.c +++ b/nvidia-drm/nvidia-drm-drv.c @@ -60,6 +60,7 @@ #include <drm/drm_ioctl.h> #endif +#include <linux/version.h> #include <linux/pci.h> /* @@ -741,6 +742,13 @@ static const struct file_operations nv_drm_fops = { .llseek = noop_llseek, }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) +// Rel. commit. "drm: Remove locking for legacy ioctls and DRM_UNLOCKED" (Thomas Zimmermann, 22 Nov 2023) +// Mock this flag, which was already useless on any recent kernel, since it +// only did something if the driver set DRIVER_LEGACY in driver_features. +static const enum drm_ioctl_flags DRM_UNLOCKED = 0; +#endif + static const struct drm_ioctl_desc nv_drm_ioctls[] = { #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE) DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY, -- 2.43.0 -- David C. Rankin, J.D.,P.E.