Module Name:    src
Committed By:   riastradh
Date:           Tue Sep  5 20:15:10 UTC 2023

Modified Files:
        src/sys/external/bsd/drm2/drm: drm_module.c
        src/sys/external/bsd/drm2/pci: files.drmkms_pci

Log Message:
drm: Fix conditionals around drmkms_pci and agp.

Kernel should build now with all pci drm drivers stripped out but
DRM_LEGACY still enabled.  (Might not be very useful, but it'll
build.  Maybe we should also have DRM_LEGACY_PCI so those drivers can
be modloaded later.)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/external/bsd/drm2/drm/drm_module.c
cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/drm2/pci/files.drmkms_pci

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/drm/drm_module.c
diff -u src/sys/external/bsd/drm2/drm/drm_module.c:1.31 src/sys/external/bsd/drm2/drm/drm_module.c:1.32
--- src/sys/external/bsd/drm2/drm/drm_module.c:1.31	Tue Jul 19 22:24:47 2022
+++ src/sys/external/bsd/drm2/drm/drm_module.c	Tue Sep  5 20:15:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_module.c,v 1.31 2022/07/19 22:24:47 riastradh Exp $	*/
+/*	$NetBSD: drm_module.c,v 1.32 2023/09/05 20:15:10 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.31 2022/07/19 22:24:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.32 2023/09/05 20:15:10 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/condvar.h>
@@ -89,6 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: drm_module.c
  */
 #if defined(__powerpc__) || defined(__i386__) || defined(__x86_64__)
 #include "agp.h"
+#include "drmkms_pci.h"
 #endif
 
 /*
@@ -114,7 +115,7 @@ drm_init(void)
 	drm_core_init_complete = true;
 
 	drm_agp_hooks_init();
-#if NAGP > 0
+#if NDRMKMS_PCI > 0 && NAGP > 0
 	extern int drmkms_agp_guarantee_initialized(void);
 	error = drmkms_agp_guarantee_initialized();
 	if (error) {

Index: src/sys/external/bsd/drm2/pci/files.drmkms_pci
diff -u src/sys/external/bsd/drm2/pci/files.drmkms_pci:1.17 src/sys/external/bsd/drm2/pci/files.drmkms_pci:1.18
--- src/sys/external/bsd/drm2/pci/files.drmkms_pci:1.17	Tue Jul 19 23:19:07 2022
+++ src/sys/external/bsd/drm2/pci/files.drmkms_pci	Tue Sep  5 20:15:10 2023
@@ -1,11 +1,11 @@
-#	$NetBSD: files.drmkms_pci,v 1.17 2022/07/19 23:19:07 riastradh Exp $
+#	$NetBSD: files.drmkms_pci,v 1.18 2023/09/05 20:15:10 riastradh Exp $
 
 define	drmkms_pci: drmkms
 
 makeoptions	drmkms_pci	"CPPFLAGS.drmkms_pci"+="${CPPFLAGS.drmkms}"
 
 #file	external/bsd/drm2/dist/drm/ati_pcigart.c	drmkms_pci
-file	external/bsd/drm2/dist/drm/drm_agpsupport.c	drmkms_pci & agp
+file	external/bsd/drm2/dist/drm/drm_agpsupport.c	drmkms_pci & agp	needs-flag
 file	external/bsd/drm2/pci/drm_pci.c			drmkms_pci
 file	external/bsd/drm2/pci/drm_pci_module.c		drmkms_pci
 

Reply via email to