From nobody Sat Mar 16 01:49:05 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TxPDK66Btz5DQxl; Sat, 16 Mar 2024 01:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TxPDK4Pb2z4mHG; Sat, 16 Mar 2024 01:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710553745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GVFnAlNuji1uFqrObKAM54EUbQiTOrDvixlv5DFUrNY=; b=Nn4ufFjVzAU9eSTWz7hVaaKFao6zB5N6FFP0VoI/KmTr5mgTtOh7QNcRKl3zttM9uG6nUp nWXXATQ7h8+Y9rwe0aI0AGbaddqV1CcDyXRezBIjUSDSRKV8hunA+Dp+eQ5riR+CSyDnme LNrNdnLW9yaxl08z2XgETO644xsGuomnpKzw4+eloIFFehOzV7560WNNoiQ5LPi3Ci+eHP QfAZ+BhjnPtNO/yg+RHpE4To5Nm7/RgYvtLRoDbFrk1TvbEkQY74Zf+FpLcdAY/Myah6a0 udosd/qEbex1G8h7tjl5LnczeaCwXD7dFE5C54XJ0S/T3MEDDZsJsGUBv0Owhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710553745; a=rsa-sha256; cv=none; b=xhsFiCDZBsQmxLZJG/c8zn3xq9pfhLVVEeAzRhb1auF4OHqrOHSYlc8s/JGFSjaP4eLQXN 73cWrqrkVR+A+Cxfrk7ecGh2Y/Ox6v0IDz5A+JWz7Cg1emmzDWDWw7poDzKoi38qeYSMFP AAb9i8yByda7qKduvm0pUFJC73aRVS1TKbXEn3j8vJ0s7995SzkKKlzboxbY73zKG/SN/X S/kcHljld3hsp2TGYW0mXf9Y+3wre55BD1F+uSAz3dPaTxIjzxgjvqvlvufqmrVPhUJCrf JC8jx0fU9d2kFKJnu5xWLGiWP75NkivR9e00zMrj0csDnV8AWiHnFGeWmPwwpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710553745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GVFnAlNuji1uFqrObKAM54EUbQiTOrDvixlv5DFUrNY=; b=gLYk/D9hzyfc/2HBnpqsFiADRi64opVV6DXisb5B85USNEX2x6Vx1SUg/lDkPW1U39fI82 AkyvgSgBt0MFsIjvPYhLnWiSf7x9mYCzAwDa8AQEmc8uzjEchvm/4kvoscYzkW9XRAFrM4 pC5Z951I9L/+8T0BIaSmeLuIQTZxJK/FfM0eNpL78WOe6THumlPwjWXdelukgVXTBRwfg6 8o8jDnNohAnjTUguq2rAeAJuXJJf+pfSPFWfm1kkfH0P3lZHEU8n1B1XnJrmm/LMUmw+WW phsuL4hFUeDK8NO7X0zl3OAxLLumOmReIeWkCtf9JNa/k8EVy+qFZurgLjZgTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TxPDK3kJgzbYW; Sat, 16 Mar 2024 01:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42G1n5Gx093730; Sat, 16 Mar 2024 01:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42G1n52Q093727; Sat, 16 Mar 2024 01:49:05 GMT (envelope-from git) Date: Sat, 16 Mar 2024 01:49:05 GMT Message-Id: <202403160149.42G1n52Q093727@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: a9f65f905038 - main - graphics/nvidia-drm-510-kmod: Fix compilation with the v550 NVidia driver List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9f65f9050383d817ee3aa652bfdb07119647e7b Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=a9f65f9050383d817ee3aa652bfdb07119647e7b commit a9f65f9050383d817ee3aa652bfdb07119647e7b Author: Austin Shafer AuthorDate: 2024-03-16 01:22:52 +0000 Commit: Gleb Popov CommitDate: 2024-03-16 01:47:15 +0000 graphics/nvidia-drm-510-kmod: Fix compilation with the v550 NVidia driver Differential Revision: https://reviews.freebsd.org/D44305 --- graphics/nvidia-drm-510-kmod/Makefile | 6 ++ .../files/extra-patch-conftest.sh | 83 ++++++++++++++++++++++ .../files/patch-nvidia-drm-conftest.h | 14 ++++ 3 files changed, 103 insertions(+) diff --git a/graphics/nvidia-drm-510-kmod/Makefile b/graphics/nvidia-drm-510-kmod/Makefile index 329241a95ff5..ae46d3bf2289 100644 --- a/graphics/nvidia-drm-510-kmod/Makefile +++ b/graphics/nvidia-drm-510-kmod/Makefile @@ -6,5 +6,11 @@ CONFLICTS_INSTALL= nvidia-drm-515-kmod nvidia-drm-61-kmod .include "${.CURDIR}/../drm-510-kmod/Makefile.version" .include "${.CURDIR}/../nvidia-drm-kmod/Makefile.common" +.include + +# handle incorrect get_user_pages definitions in 13.2 +.if ${OSVERSION} < 1303000 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-conftest.sh +.endif .include diff --git a/graphics/nvidia-drm-510-kmod/files/extra-patch-conftest.sh b/graphics/nvidia-drm-510-kmod/files/extra-patch-conftest.sh new file mode 100644 index 000000000000..794b0a6647ae --- /dev/null +++ b/graphics/nvidia-drm-510-kmod/files/extra-patch-conftest.sh @@ -0,0 +1,83 @@ +--- conftest.sh.orig 2024-03-14 18:29:50 UTC ++++ conftest.sh +@@ -2627,7 +2627,7 @@ compile_test() { + #include + 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 + 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 + 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) { diff --git a/graphics/nvidia-drm-510-kmod/files/patch-nvidia-drm-conftest.h b/graphics/nvidia-drm-510-kmod/files/patch-nvidia-drm-conftest.h new file mode 100644 index 000000000000..f91a1595cda2 --- /dev/null +++ b/graphics/nvidia-drm-510-kmod/files/patch-nvidia-drm-conftest.h @@ -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 + #define LIST_HEAD_INIT(name) LINUX_LIST_HEAD_INIT(name) +-#endif + + /* + * FreeBSD currently has only vmf_insert_pfn_prot defined, and it has a