Bug#1135762: Additional fix needed on top of 0084
Vladislav Lutkov
vlad at xorg.su
Sat Jun 20 19:19:58 BST 2026
Tags: patch
Hello,
0084 alone isn't enough — two more build errors remain afterwards
(screen_info undeclared, dma_fence_signal return type). Attached
patch fixes both, applied on top of 0084.
Tested the driver on kernel 7.0.6-2-pve.
--
Vladislav Lutkov
-------------- next part --------------
From: Vladislav Lutkov <vlad at xorg.su>
Description: fix screen_info and dma_fence_signal build errors
--- a/conftest.sh
+++ b/conftest.sh
@@ -5480,6 +5480,22 @@
exit 0
fi
;;
+ screen_info_present)
+ CODE="
+ #include <linux/screen_info.h>
+ unsigned int conftest_screen_info_present(void) {
+ return screen_info.orig_video_isVGA;
+ }"
+ compile_check_conftest "$CODE" "NV_SCREEN_INFO_PRESENT" "" "types"
+ ;;
+ dma_fence_signal_return_int)
+ CODE="
+ #include <linux/dma-fence.h>
+ int conftest_dma_fence_signal_return_int(struct dma_fence *fence) {
+ return dma_fence_signal(fence);
+ }"
+ compile_check_conftest "$CODE" "NV_DMA_FENCE_SIGNAL_RETURNS_INT" "" "types"
+ ;;
test_configuration_option)
#
# Check to see if the given config option is set.
--- a/nvidia/os-interface.c
+++ b/nvidia/os-interface.c
@@ -16,6 +16,10 @@
#include "nv-time.h"
#include "nv-gpu-numa.h"
+#if !defined(NV_SCREEN_INFO_PRESENT)
+#include <linux/screen_info.h>
+struct screen_info screen_info = {0};
+#endif
#define MAX_ERROR_STRING 512
static char nv_error_string[MAX_ERROR_STRING];
--- a/nvidia-drm/nvidia-dma-fence-helper.h
+++ b/nvidia-drm/nvidia-dma-fence-helper.h
@@ -92,8 +92,11 @@
static inline int nv_dma_fence_signal(nv_dma_fence_t *fence) {
#if defined(NV_LINUX_FENCE_H_PRESENT)
return fence_signal(fence);
-#else
+#elif defined(NV_DMA_FENCE_SIGNAL_RETURNS_INT)
return dma_fence_signal(fence);
+#else
+ dma_fence_signal(fence);
+ return 0;
#endif
}
More information about the pkg-nvidia-devel
mailing list