head	1.9;
access;
symbols
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.12
	netbsd-11-base:1.9
	netbsd-10-1-RELEASE:1.9
	perseant-exfatfs-base-20240630:1.9
	perseant-exfatfs:1.9.0.10
	perseant-exfatfs-base:1.9
	netbsd-8-3-RELEASE:1.4
	netbsd-9-4-RELEASE:1.5
	netbsd-10-0-RELEASE:1.9
	netbsd-10-0-RC6:1.9
	netbsd-10-0-RC5:1.9
	netbsd-10-0-RC4:1.9
	netbsd-10-0-RC3:1.9
	netbsd-10-0-RC2:1.9
	thorpej-ifq:1.9.0.8
	thorpej-ifq-base:1.9
	thorpej-altq-separation:1.9.0.6
	thorpej-altq-separation-base:1.9
	netbsd-10-0-RC1:1.9
	netbsd-10:1.9.0.4
	netbsd-10-base:1.9
	bouyer-sunxi-drm:1.9.0.2
	bouyer-sunxi-drm-base:1.9
	netbsd-9-3-RELEASE:1.5
	thorpej-i2c-spi-conf2:1.5.0.26
	thorpej-i2c-spi-conf2-base:1.5
	thorpej-futex2:1.5.0.24
	thorpej-futex2-base:1.5
	thorpej-cfargs2:1.5.0.22
	thorpej-cfargs2-base:1.5
	cjep_sun2x-base1:1.5
	cjep_sun2x:1.5.0.20
	cjep_sun2x-base:1.5
	cjep_staticlib_x-base1:1.5
	netbsd-9-2-RELEASE:1.5
	cjep_staticlib_x:1.5.0.18
	cjep_staticlib_x-base:1.5
	thorpej-i2c-spi-conf:1.5.0.16
	thorpej-i2c-spi-conf-base:1.5
	thorpej-cfargs:1.5.0.14
	thorpej-cfargs-base:1.5
	thorpej-futex:1.5.0.12
	thorpej-futex-base:1.5
	netbsd-9-1-RELEASE:1.5
	bouyer-xenpvh-base2:1.5
	phil-wifi-20200421:1.5
	bouyer-xenpvh-base1:1.5
	phil-wifi-20200411:1.5
	bouyer-xenpvh:1.5.0.10
	bouyer-xenpvh-base:1.5
	is-mlppp:1.5.0.8
	is-mlppp-base:1.5
	phil-wifi-20200406:1.5
	netbsd-8-2-RELEASE:1.4
	ad-namecache-base3:1.5
	netbsd-9-0-RELEASE:1.5
	netbsd-9-0-RC2:1.5
	ad-namecache-base2:1.5
	ad-namecache-base1:1.5
	ad-namecache:1.5.0.6
	ad-namecache-base:1.5
	netbsd-9-0-RC1:1.5
	phil-wifi-20191119:1.5
	netbsd-9:1.5.0.4
	netbsd-9-base:1.5
	phil-wifi-20190609:1.5
	netbsd-8-1-RELEASE:1.4
	netbsd-8-1-RC1:1.4
	isaki-audio2:1.5.0.2
	isaki-audio2-base:1.5
	pgoyette-compat-merge-20190127:1.4.28.1
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.5
	pgoyette-compat-0930:1.5
	pgoyette-compat-0906:1.5
	netbsd-7-2-RELEASE:1.4
	pgoyette-compat-0728:1.4
	netbsd-8-0-RELEASE:1.4
	phil-wifi:1.4.0.30
	phil-wifi-base:1.4
	pgoyette-compat-0625:1.4
	netbsd-8-0-RC2:1.4
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	netbsd-8-0-RC1:1.4
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	netbsd-7-1-2-RELEASE:1.4
	pgoyette-compat:1.4.0.28
	pgoyette-compat-base:1.4
	netbsd-7-1-1-RELEASE:1.4
	tls-maxphys-base-20171202:1.4
	matt-nb8-mediatek:1.4.0.26
	matt-nb8-mediatek-base:1.4
	nick-nhusb-base-20170825:1.4
	perseant-stdc-iso10646:1.4.0.24
	perseant-stdc-iso10646-base:1.4
	netbsd-8:1.4.0.22
	netbsd-8-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.20
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	jdolecek-ncq:1.4.0.18
	jdolecek-ncq-base:1.4
	pgoyette-localcount-20170320:1.4
	netbsd-7-1:1.4.0.16
	netbsd-7-1-RELEASE:1.4
	netbsd-7-1-RC2:1.4
	nick-nhusb-base-20170204:1.4
	netbsd-7-nhusb-base-20170116:1.4
	bouyer-socketcan:1.4.0.14
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	netbsd-7-1-RC1:1.4
	nick-nhusb-base-20161204:1.4
	pgoyette-localcount-20161104:1.4
	netbsd-7-0-2-RELEASE:1.4
	nick-nhusb-base-20161004:1.4
	localcount-20160914:1.4
	netbsd-7-nhusb:1.4.0.12
	netbsd-7-nhusb-base:1.4
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.10
	pgoyette-localcount-base:1.4
	nick-nhusb-base-20160907:1.4
	nick-nhusb-base-20160529:1.4
	netbsd-7-0-1-RELEASE:1.4
	nick-nhusb-base-20160422:1.4
	nick-nhusb-base-20160319:1.4
	nick-nhusb-base-20151226:1.4
	netbsd-7-0:1.4.0.8
	netbsd-7-0-RELEASE:1.4
	nick-nhusb-base-20150921:1.4
	netbsd-7-0-RC3:1.4
	netbsd-7-0-RC2:1.4
	netbsd-7-0-RC1:1.4
	nick-nhusb-base-20150606:1.4
	nick-nhusb-base-20150406:1.4
	nick-nhusb:1.4.0.6
	nick-nhusb-base:1.4
	tls-maxphys-base:1.4
	tls-maxphys:1.4.0.4
	netbsd-7:1.4.0.2
	netbsd-7-base:1.4
	yamt-pagecache:1.3.0.6
	rmind-smpnet-base:1.3
	rmind-smpnet:1.3.0.4
	rmind-smpnet-nbase:1.3
	yamt-pagecache-base9:1.3
	tls-earlyentropy:1.3.0.2
	tls-earlyentropy-base:1.4
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.1
	riastradh-drm2:1.1.0.2;
locks; strict;
comment	@# @;


1.9
date	2022.07.20.01.11.39;	author riastradh;	state Exp;
branches;
next	1.8;
commitid	dUNWnGJxpmYQszMD;

1.8
date	2022.07.17.15.05.09;	author riastradh;	state Exp;
branches;
next	1.7;
commitid	ftLcbGehvXELagMD;

1.7
date	2022.07.17.14.11.40;	author riastradh;	state Exp;
branches;
next	1.6;
commitid	ZtojdFeOuzZpSfMD;

1.6
date	2021.12.19.11.54.24;	author riastradh;	state Exp;
branches;
next	1.5;
commitid	d7eObF37KhkQRflD;

1.5
date	2018.08.27.13.53.42;	author riastradh;	state Exp;
branches;
next	1.4;
commitid	XZcQgEAPB2IaqLPA;

1.4
date	2014.07.16.20.56.25;	author riastradh;	state Exp;
branches
	1.4.4.1
	1.4.28.1
	1.4.30.1;
next	1.3;
commitid	HSaGIfvEpvYt4EIx;

1.3
date	2014.04.01.15.08.58;	author riastradh;	state Exp;
branches
	1.3.2.1
	1.3.4.1
	1.3.6.1;
next	1.2;
commitid	NDIypNPrys9zyZux;

1.2
date	2014.03.18.18.20.43;	author riastradh;	state Exp;
branches;
next	1.1;
commitid	YersUbOm2SKa4dtx;

1.1
date	2014.03.04.20.45.17;	author riastradh;	state dead;
branches
	1.1.2.1;
next	;
commitid	JIh80eY5xBsJjqrx;

1.4.4.1
date	2014.07.16.20.56.25;	author tls;	state dead;
branches;
next	1.4.4.2;
commitid	jTnpym9Qu0o4R1Nx;

1.4.4.2
date	2014.08.20.00.04.32;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.4.28.1
date	2018.09.06.06.56.43;	author pgoyette;	state Exp;
branches;
next	;
commitid	HCi1bXD317XIK0RA;

1.4.30.1
date	2019.06.10.22.09.21;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.3.2.1
date	2014.08.10.06.56.10;	author tls;	state Exp;
branches;
next	;
commitid	i4aS5ndhchyrCMLx;

1.3.4.1
date	2014.04.01.15.08.58;	author rmind;	state dead;
branches;
next	1.3.4.2;
commitid	mL5ZYSzpqK6QS2Bx;

1.3.4.2
date	2014.05.18.17.46.11;	author rmind;	state Exp;
branches;
next	;
commitid	mL5ZYSzpqK6QS2Bx;

1.3.6.1
date	2014.04.01.15.08.58;	author yamt;	state dead;
branches;
next	1.3.6.2;
commitid	VUUXuyNWnt3AKwBx;

1.3.6.2
date	2014.05.22.11.41.07;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.1.2.1
date	2014.03.04.20.45.17;	author riastradh;	state Exp;
branches;
next	;
commitid	JIh80eY5xBsJjqrx;


desc
@@


1.9
log
@drm: Undefine `alpha' in the module build too.
@
text
@# $NetBSD: Makefile.inc,v 1.8 2022/07/17 15:05:09 riastradh Exp $

# Common makefile cruft for drm2 code.

# XXX All the -D crap needs to go in a header file instead so changing
# it correctly triggers rebuilds.

COPTS+=		-fwrapv

# Overrides first.
CPPFLAGS+=	-I${S}/external/bsd/drm2/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/include/drm

CPPFLAGS+=	-I${S}/external/bsd/common/include

# Then upstream.
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include/drm
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include/uapi

CPPFLAGS+=	-D__KERNEL__

.if ${MACHINE_ARCH} == "i386"
CPPFLAGS+=	-DCONFIG_X86
CPPFLAGS+=	-DCONFIG_X86_PAT
.elif ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-DCONFIG_X86
CPPFLAGS+=	-DCONFIG_X86_64
CPPFLAGS+=	-DCONFIG_X86_PAT
.elif ${MACHINE} == "evbarm"
CPPFLAGS+=	-DCONFIG_ARM
.elif ${MACHINE_ARCH} == "aarch64"
CPPFLAGS+=	-DCONFIG_ARM64
.elif ${MACHINE_ARCH} == "alpha"
CPPFLAGS+=	-Ualpha
.endif

CPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE=0
CPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0
CPPFLAGS+=	-DCONFIG_DRM_FBDEV_EMULATION=1
CPPFLAGS+=	-DCONFIG_DRM_FBDEV_OVERALLOC=100
CPPFLAGS+=	-DCONFIG_FB=0
CPPFLAGS+=	-DCONFIG_LOCKDEP=0
CPPFLAGS+=	-DCONFIG_PCI=1

CWARNFLAGS+=	-Wno-missing-field-initializers

# Needed for drmums modules.
CPPFLAGS+=	-DCONFIG_DRM_LEGACY

# XXX Is this the right place to set this?
CPPFLAGS+=	-DDIAGNOSTIC
@


1.8
log
@drm: Sync module/drmkms/Makefile with files.drmkms.

Unconditionally include legacy APIs for viadrmums.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.7 2022/07/17 14:11:40 riastradh Exp $
d34 2
@


1.7
log
@drm: Dust off module build a little.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.6 2021/12/19 11:54:24 riastradh Exp $
d46 3
@


1.6
log
@drm: Sync (device-independent) drmkms*.kmod makefiles.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.5 2018/08/27 13:53:42 riastradh Exp $
d33 1
a33 1
CPPFLAGS+=	-DCONFIG_AARCH64
d38 2
a39 2
CPPFLAGS+=	-DCONFIG_DRM_FBDEV_EMULATION=0
CPPFLAGS+=	-DCONFIG_DRM_FBDEV_OVERALLOC=1000
@


1.5
log
@Make drmkms.kmod build again on amd64.
@
text
@d1 1
a1 1
# $NetBSD$
d8 2
d12 1
d19 1
a19 1
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/uapi
d21 1
a21 5
# Must come last because some header file names are repeated in
# dist/drm (I'm looking ta you, drm_legacy.h), while others sometimes
# explicitly write <uapi/...>.  (Maybe that should have been imported
# under dist/include/uapi rather than dist/uapi.)
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist
d23 12
a34 2
# XXX Should probably be in a header file.  opt_drmkms.h?
CPPFLAGS+=	-D__KERNEL__
d39 1
d41 4
@


1.4
log
@Make it build and boot on my test machines.

Screen blanks on boot on the Ivy Bridge system with

   DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK.  Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.3 2014/04/01 15:08:58 riastradh Exp $
d8 1
d10 4
a13 1
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist
d17 8
a24 1
CPPFLAGS+=	-I${S}/external/bsd/common/include
d27 5
a33 5

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-DCONFIG_MTRR
CPPFLAGS+=	-DCONFIG_X86
.endif
@


1.4.30.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.5 2018/08/27 13:53:42 riastradh Exp $
a7 1
# Overrides first.
d9 1
a9 4

CPPFLAGS+=	-I${S}/external/bsd/common/include

# Then upstream.
d13 1
a13 8

# Must come last because some header file names are repeated in
# dist/drm (I'm looking ta you, drm_legacy.h), while others sometimes
# explicitly write <uapi/...>.  (Maybe that should have been imported
# under dist/include/uapi rather than dist/uapi.)
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist

# XXX Should probably be in a header file.  opt_drmkms.h?
a15 5
CPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE=0
CPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0
CPPFLAGS+=	-DCONFIG_DRM_FBDEV_EMULATION=0
CPPFLAGS+=	-DCONFIG_FB=0

d18 5
@


1.4.28.1
log
@Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.5 2018/08/27 13:53:42 riastradh Exp $
a7 1
# Overrides first.
d9 1
a9 4

CPPFLAGS+=	-I${S}/external/bsd/common/include

# Then upstream.
d13 1
a13 8

# Must come last because some header file names are repeated in
# dist/drm (I'm looking ta you, drm_legacy.h), while others sometimes
# explicitly write <uapi/...>.  (Maybe that should have been imported
# under dist/include/uapi rather than dist/uapi.)
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist

# XXX Should probably be in a header file.  opt_drmkms.h?
a15 5
CPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE=0
CPPFLAGS+=	-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0
CPPFLAGS+=	-DCONFIG_DRM_FBDEV_EMULATION=0
CPPFLAGS+=	-DCONFIG_FB=0

d18 5
@


1.4.4.1
log
@file Makefile.inc was added on branch tls-maxphys on 2014-08-20 00:04:32 +0000
@
text
@d1 22
@


1.4.4.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a0 22
# $NetBSD$

# Common makefile cruft for drm2 code.

# XXX All the -D crap needs to go in a header file instead so changing
# it correctly triggers rebuilds.

CPPFLAGS+=	-I${S}/external/bsd/drm2/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include/drm
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/uapi
CPPFLAGS+=	-I${S}/external/bsd/common/include
CPPFLAGS+=	-D__KERNEL__

# XXX Is this the right place to set this?
CPPFLAGS+=	-DDIAGNOSTIC

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-DCONFIG_MTRR
CPPFLAGS+=	-DCONFIG_X86
.endif
@


1.3
log
@Make drmkms find header files from sys/external/bsd/common.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.2 2014/03/18 18:20:43 riastradh Exp $
d9 3
a12 1
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
a21 1
CPPFLAGS+=	-DMTRR
@


1.3.2.1
log
@Rebase.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.4 2014/07/16 20:56:25 riastradh Exp $
d9 1
a9 1
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist
a10 2
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include/drm
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/uapi
d20 1
@


1.3.6.1
log
@file Makefile.inc was added on branch yamt-pagecache on 2014-05-22 11:41:07 +0000
@
text
@d1 21
@


1.3.6.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@a0 21
# $NetBSD$

# Common makefile cruft for drm2 code.

# XXX All the -D crap needs to go in a header file instead so changing
# it correctly triggers rebuilds.

CPPFLAGS+=	-I${S}/external/bsd/drm2/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/uapi
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
CPPFLAGS+=	-I${S}/external/bsd/common/include
CPPFLAGS+=	-D__KERNEL__

# XXX Is this the right place to set this?
CPPFLAGS+=	-DDIAGNOSTIC

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-DCONFIG_MTRR
CPPFLAGS+=	-DCONFIG_X86
CPPFLAGS+=	-DMTRR
.endif
@


1.3.4.1
log
@file Makefile.inc was added on branch rmind-smpnet on 2014-05-18 17:46:11 +0000
@
text
@d1 21
@


1.3.4.2
log
@sync with head
@
text
@a0 21
# $NetBSD$

# Common makefile cruft for drm2 code.

# XXX All the -D crap needs to go in a header file instead so changing
# it correctly triggers rebuilds.

CPPFLAGS+=	-I${S}/external/bsd/drm2/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/uapi
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
CPPFLAGS+=	-I${S}/external/bsd/common/include
CPPFLAGS+=	-D__KERNEL__

# XXX Is this the right place to set this?
CPPFLAGS+=	-DDIAGNOSTIC

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-DCONFIG_MTRR
CPPFLAGS+=	-DCONFIG_X86
CPPFLAGS+=	-DMTRR
.endif
@


1.2
log
@Merge riastradh-drm2 to HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.1.2.1 2014/03/04 20:45:17 riastradh Exp $
d11 1
@


1.1
log
@file Makefile.inc was initially added on branch riastradh-drm2.
@
text
@d1 20
@


1.1.2.1
log
@Rework drm2 configuration and modularization.

- Split drm2.kmod into drmkms_linux, drmkms, drmkms_pci.
- Split up drmkms-related files.* similarly.
- Make drm_agp_* routines hooks that the drmkms_pci module installs.
- Reuse drm device major 180 for (old) drm and drmkms.

Now old drm and new drmkms can coexist happily in the same tree, with
or without PCI, and require no changes to userland.
@
text
@a0 20
# $NetBSD$

# Common makefile cruft for drm2 code.

# XXX All the -D crap needs to go in a header file instead so changing
# it correctly triggers rebuilds.

CPPFLAGS+=	-I${S}/external/bsd/drm2/include
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/uapi
CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/include
CPPFLAGS+=	-D__KERNEL__

# XXX Is this the right place to set this?
CPPFLAGS+=	-DDIAGNOSTIC

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-DCONFIG_MTRR
CPPFLAGS+=	-DCONFIG_X86
CPPFLAGS+=	-DMTRR
.endif
@

