Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graphics/nvidia-drm-510-kmod: Fix compilation with the v550 NVidia dr…
…iver Differential Revision: https://reviews.freebsd.org/D44305
- Loading branch information
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
graphics/nvidia-drm-510-kmod/files/extra-patch-conftest.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- conftest.sh.orig 2024-03-14 18:29:50 UTC | ||
+++ conftest.sh | ||
@@ -2627,7 +2627,7 @@ compile_test() { | ||
#include <linux/mm.h> | ||
long get_user_pages(unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas) { | ||
return 0; | ||
@@ -2655,7 +2655,7 @@ compile_test() { | ||
struct mm_struct *mm, | ||
unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas) { | ||
return 0; | ||
@@ -2679,7 +2679,7 @@ compile_test() { | ||
#include <linux/mm.h> | ||
long get_user_pages(unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages) { | ||
return 0; | ||
}" > conftest$$.c | ||
@@ -2852,7 +2852,7 @@ compile_test() { | ||
struct mm_struct *mm, | ||
unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas, | ||
int *locked) { | ||
@@ -2877,7 +2877,7 @@ compile_test() { | ||
long get_user_pages_remote(struct mm_struct *mm, | ||
unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas, | ||
int *locked) { | ||
@@ -2901,7 +2901,7 @@ compile_test() { | ||
long get_user_pages_remote(struct mm_struct *mm, | ||
unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
int *locked) { | ||
return 0; | ||
@@ -2969,7 +2969,7 @@ compile_test() { | ||
#include <linux/mm.h> | ||
long pin_user_pages(unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas) { | ||
return 0; | ||
@@ -3055,7 +3055,7 @@ compile_test() { | ||
struct mm_struct *mm, | ||
unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas, | ||
int *locked) { | ||
@@ -3077,7 +3077,7 @@ compile_test() { | ||
long pin_user_pages_remote(struct mm_struct *mm, | ||
unsigned long start, | ||
unsigned long nr_pages, | ||
- unsigned int gup_flags, | ||
+ int gup_flags, | ||
struct page **pages, | ||
struct vm_area_struct **vmas, | ||
int *locked) { |
14 changes: 14 additions & 0 deletions
14
graphics/nvidia-drm-510-kmod/files/patch-nvidia-drm-conftest.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- nvidia-drm-conftest.h.orig 2024-03-11 17:52:16 UTC | ||
+++ nvidia-drm-conftest.h | ||
@@ -122,11 +122,9 @@ | ||
*/ | ||
#define drm_atomic_state_free drm_atomic_state_put | ||
|
||
-#if __FreeBSD_version < 1300000 | ||
/* redefine LIST_HEAD_INIT to the linux version */ | ||
#include <linux/list.h> | ||
#define LIST_HEAD_INIT(name) LINUX_LIST_HEAD_INIT(name) | ||
-#endif | ||
|
||
/* | ||
* FreeBSD currently has only vmf_insert_pfn_prot defined, and it has a |