Makefile revision 1.23
11.23Smrg# $NetBSD: Makefile,v 1.23 2023/09/04 21:45:35 mrg Exp $
21.2Sriastrad
31.2Sriastrad.include "../Makefile.inc"
41.2Sriastrad.include "../drmkms/Makefile.inc"
51.2Sriastrad
61.9SriastradKMOD=	i915drmkms
71.9SriastradIOCONF=	i915drmkms.ioconf
81.9SriastradMKLDSCRIPT=yes
91.2Sriastrad
101.2Sriastrad.PATH:	${S}/external/bsd/drm2/i915drm
111.9Sriastrad
121.2Sriastrad.PATH:	${S}/external/bsd/drm2/dist/drm/i915
131.20Sriastrad.PATH:	${S}/external/bsd/drm2/dist/drm/i915/display
141.20Sriastrad.PATH:	${S}/external/bsd/drm2/dist/drm/i915/gem
151.20Sriastrad.PATH:	${S}/external/bsd/drm2/dist/drm/i915/gt
161.20Sriastrad.PATH:	${S}/external/bsd/drm2/dist/drm/i915/gt/uc
171.2Sriastrad
181.10SriastradCPPFLAGS+=	-I${S}/sys/modules/drmkms
191.10Sriastrad
201.9SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/i915drm
211.9Sriastrad
221.9SriastradCPPFLAGS+=	-I${S}/external/bsd/drm2/dist/drm/i915
231.9Sriastrad
241.9Sriastrad# Substitute for _KERNEL_OPT flags.
251.9SriastradCPPFLAGS+=	-DNACPICA=1
261.9SriastradCPPFLAGS+=	-DNVGA=1
271.9Sriastrad
281.20SriastradCPPFLAGS+=	-DCONFIG_DRM_FBDEV_EMULATION=1
291.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_DEBUG=1 # XXX
301.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_DEBUG_GEM=1 # XXX
311.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_DEBUG_RUNTIME_PM=0
321.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_PREEMPT_TIMEOUT=640
331.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_TIMESLICE_DURATION=1
341.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_ALPHA_SUPPORT=0
351.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_FBDEV=1
361.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_GVT=0
371.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0
381.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_DEBUG_MMIO=1 # XXX
391.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_FORCE_PROBE=0
401.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_SPIN_REQUEST=0
411.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_SW_FENCE_CHECK_DAG=1 # XXX expensive debug option?
421.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 # milliseconds
431.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_STOP_TIMEOUT=100 # milliseconds
441.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_PREEMPT_TIMEOUT=640 # milliseconds
451.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_CAPTURE_ERROR=0
461.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_SELFTEST=0
471.20SriastradCPPFLAGS+=	-DCONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=0
481.20SriastradCPPFLAGS+=	-DCONFIG_PM=1
491.20SriastradCPPFLAGS+=	-DCONFIG_INTEL_MEI_HDCP=0
501.9Sriastrad
511.20Sriastrad# This code comes from the Linux kernel, which assumes signed
521.20Sriastrad# overflow is OK.
531.18SniaCOPTS+=		-fwrapv
541.18Snia
551.20SriastradCWARNFLAGS+=	-Wno-missing-field-initializers
561.20SriastradCWARNFLAGS+=	-Wno-pointer-arith
571.20SriastradCWARNFLAGS+=	-Wno-shadow
581.20Sriastrad
591.23SmrgCOPTS.i915_irq.c+=	${CC_WNO_MAYBE_UNINITIALIZED}
601.20SriastradCOPTS.i915_pci.c+=	${${ACTIVE_CC} == "gcc":? -Wno-override-init :}
611.20SriastradCOPTS.i915_pci.c+=	${${ACTIVE_CC} == "clang":? -Wno-initializer-overrides :}
621.20SriastradCOPTS.i915_sw_fence.c+=	${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
631.23SmrgCOPTS.intel_ddi.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
641.21SlukemCOPTS.intel_ddi.c+=	${CC_WNO_MAYBE_UNINITIALIZED}
651.21SlukemCOPTS.intel_display.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
661.23SmrgCOPTS.intel_display_power.c+=	${${ACTIVE_CC} == "gcc":? -Wno-array-bounds :}
671.23SmrgCOPTS.intel_dp.c+=	${CC_WNO_STRINGOP_OVERREAD}
681.20SriastradCOPTS.intel_guc_submission.c+=	${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
691.20SriastradCOPTS.intel_hdmi.c+=	${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
701.23SmrgCOPTS.intel_pm.c+=	${CC_WNO_STRINGOP_OVERREAD} ${CC_WNO_STRINGOP_OVERFLOW}
711.21SlukemCOPTS.intel_sdvo.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
721.23SmrgCOPTS.intel_sprite.c+=	${CC_WNO_MAYBE_UNINITIALIZED}
731.9Sriastrad
741.9Sriastrad# NetBSD additions.
751.9SriastradSRCS+=	i915_module.c
761.20SriastradSRCS+=	i915_pci_autoconf.c
771.20SriastradSRCS+=	intelfb.c
781.9Sriastrad
791.20Sriastrad# Local overrides.
801.20SriastradSRCS+=	i915_gem_userptr.c
811.20SriastradSRCS+=	i915_gemfs.c
821.20SriastradSRCS+=	i915_switcheroo.c
831.20SriastradSRCS+=	i915_sysfs.c
841.20SriastradSRCS+=	i915_trace_points.c
851.20SriastradSRCS+=	icl_dsi.c
861.20SriastradSRCS+=	intel_dsi_dcs_backlight.c
871.20SriastradSRCS+=	intel_gtt_subr.c
881.20SriastradSRCS+=	intel_guc_log.c
891.20SriastradSRCS+=	intel_lpe_audio.c
901.20SriastradSRCS+=	intel_region_lmem.c
911.20SriastradSRCS+=	vlv_dsi.c
921.2Sriastrad
931.9Sriastrad# Upstream sources.
941.20Sriastrad#
951.20Sriastrad# sed -E -e 's,^(#?)file	.*/([^ 	]*).*,\1SRCS+=	\2,g'
961.2SriastradSRCS+=	dvo_ch7017.c
971.2SriastradSRCS+=	dvo_ch7xxx.c
981.2SriastradSRCS+=	dvo_ivch.c
991.2SriastradSRCS+=	dvo_ns2501.c
1001.2SriastradSRCS+=	dvo_sil164.c
1011.2SriastradSRCS+=	dvo_tfp410.c
1021.20Sriastrad#SRCS+=	icl_dsi.c
1031.5SnonakaSRCS+=	intel_acpi.c
1041.9SriastradSRCS+=	intel_atomic.c
1051.9SriastradSRCS+=	intel_atomic_plane.c
1061.9SriastradSRCS+=	intel_audio.c
1071.2SriastradSRCS+=	intel_bios.c
1081.20SriastradSRCS+=	intel_bw.c
1091.20SriastradSRCS+=	intel_cdclk.c
1101.20SriastradSRCS+=	intel_color.c
1111.20SriastradSRCS+=	intel_combo_phy.c
1121.20SriastradSRCS+=	intel_connector.c
1131.2SriastradSRCS+=	intel_crt.c
1141.2SriastradSRCS+=	intel_ddi.c
1151.2SriastradSRCS+=	intel_display.c
1161.20SriastradSRCS+=	intel_display_power.c
1171.2SriastradSRCS+=	intel_dp.c
1181.20SriastradSRCS+=	intel_dp_aux_backlight.c
1191.20SriastradSRCS+=	intel_dp_link_training.c
1201.9SriastradSRCS+=	intel_dp_mst.c
1211.20SriastradSRCS+=	intel_dpio_phy.c
1221.20SriastradSRCS+=	intel_dpll_mgr.c
1231.20SriastradSRCS+=	intel_dsb.c
1241.20Sriastrad#SRCS+=	intel_dsi.c
1251.20Sriastrad#SRCS+=	intel_dsi_dcs_backlight.c
1261.20Sriastrad#SRCS+=	intel_dsi_vbt.c
1271.2SriastradSRCS+=	intel_dvo.c
1281.9SriastradSRCS+=	intel_fbc.c
1291.3SriastradSRCS+=	intel_fbdev.c
1301.9SriastradSRCS+=	intel_fifo_underrun.c
1311.9SriastradSRCS+=	intel_frontbuffer.c
1321.20SriastradSRCS+=	intel_gmbus.c
1331.20SriastradSRCS+=	intel_hdcp.c
1341.2SriastradSRCS+=	intel_hdmi.c
1351.9SriastradSRCS+=	intel_hotplug.c
1361.20Sriastrad#SRCS+=	intel_lpe_audio.c
1371.20SriastradSRCS+=	intel_lspcon.c
1381.2SriastradSRCS+=	intel_lvds.c
1391.5SnonakaSRCS+=	intel_opregion.c
1401.2SriastradSRCS+=	intel_overlay.c
1411.2SriastradSRCS+=	intel_panel.c
1421.9SriastradSRCS+=	intel_psr.c
1431.20SriastradSRCS+=	intel_quirks.c
1441.2SriastradSRCS+=	intel_sdvo.c
1451.2SriastradSRCS+=	intel_sprite.c
1461.20SriastradSRCS+=	intel_tc.c
1471.2SriastradSRCS+=	intel_tv.c
1481.20SriastradSRCS+=	intel_vdsc.c
1491.20SriastradSRCS+=	intel_vga.c
1501.20Sriastrad#SRCS+=	vlv_dsi.c
1511.20Sriastrad#SRCS+=	vlv_dsi_pll.c
1521.20SriastradSRCS+=	i915_gem_busy.c
1531.20SriastradSRCS+=	i915_gem_clflush.c
1541.20Sriastrad#SRCS+=	i915_gem_client_blt.c
1551.20SriastradSRCS+=	i915_gem_context.c
1561.20SriastradSRCS+=	i915_gem_dmabuf.c
1571.20SriastradSRCS+=	i915_gem_domain.c
1581.20SriastradSRCS+=	i915_gem_execbuffer.c
1591.20SriastradSRCS+=	i915_gem_fence.c
1601.20SriastradSRCS+=	i915_gem_internal.c
1611.20SriastradSRCS+=	i915_gem_lmem.c
1621.20SriastradSRCS+=	i915_gem_mman.c
1631.20SriastradSRCS+=	i915_gem_object.c
1641.20SriastradSRCS+=	i915_gem_object_blt.c
1651.20SriastradSRCS+=	i915_gem_pages.c
1661.20SriastradSRCS+=	i915_gem_phys.c
1671.20SriastradSRCS+=	i915_gem_pm.c
1681.20SriastradSRCS+=	i915_gem_region.c
1691.20SriastradSRCS+=	i915_gem_shmem.c
1701.20SriastradSRCS+=	i915_gem_shrinker.c
1711.20SriastradSRCS+=	i915_gem_stolen.c
1721.20SriastradSRCS+=	i915_gem_throttle.c
1731.20SriastradSRCS+=	i915_gem_tiling.c
1741.20Sriastrad#SRCS+=	i915_gem_userptr.c
1751.20SriastradSRCS+=	i915_gem_wait.c
1761.20Sriastrad#SRCS+=	i915_gemfs.c
1771.20Sriastrad#SRCS+=	debugfs_engines.c
1781.20Sriastrad#SRCS+=	debugfs_gt.c
1791.20Sriastrad#SRCS+=	debugfs_gt_pm.c
1801.20SriastradSRCS+=	gen6_ppgtt.c
1811.20SriastradSRCS+=	gen6_renderstate.c
1821.20SriastradSRCS+=	gen7_renderstate.c
1831.20SriastradSRCS+=	gen8_ppgtt.c
1841.20SriastradSRCS+=	gen8_renderstate.c
1851.20SriastradSRCS+=	gen9_renderstate.c
1861.20SriastradSRCS+=	intel_breadcrumbs.c
1871.20SriastradSRCS+=	intel_context.c
1881.20SriastradSRCS+=	intel_engine_cs.c
1891.20SriastradSRCS+=	intel_engine_heartbeat.c
1901.20SriastradSRCS+=	intel_engine_pm.c
1911.20SriastradSRCS+=	intel_engine_pool.c
1921.20SriastradSRCS+=	intel_engine_user.c
1931.20SriastradSRCS+=	intel_ggtt.c
1941.20SriastradSRCS+=	intel_gt.c
1951.20SriastradSRCS+=	intel_gt_irq.c
1961.20SriastradSRCS+=	intel_gt_pm.c
1971.20SriastradSRCS+=	intel_gt_pm_irq.c
1981.20SriastradSRCS+=	intel_gt_requests.c
1991.20SriastradSRCS+=	intel_gtt.c
2001.20SriastradSRCS+=	intel_llc.c
2011.20SriastradSRCS+=	intel_lrc.c
2021.20SriastradSRCS+=	intel_mocs.c
2031.20SriastradSRCS+=	intel_ppgtt.c
2041.20SriastradSRCS+=	intel_rc6.c
2051.20SriastradSRCS+=	intel_renderstate.c
2061.20SriastradSRCS+=	intel_reset.c
2071.20SriastradSRCS+=	intel_ring.c
2081.20SriastradSRCS+=	intel_ring_submission.c
2091.20SriastradSRCS+=	intel_rps.c
2101.20SriastradSRCS+=	intel_sseu.c
2111.20SriastradSRCS+=	intel_timeline.c
2121.20SriastradSRCS+=	intel_workarounds.c
2131.20SriastradSRCS+=	intel_guc.c
2141.20SriastradSRCS+=	intel_guc_ads.c
2151.20SriastradSRCS+=	intel_guc_ct.c
2161.20SriastradSRCS+=	intel_guc_fw.c
2171.20Sriastrad#SRCS+=	intel_guc_log.c
2181.20SriastradSRCS+=	intel_guc_submission.c
2191.20SriastradSRCS+=	intel_huc.c
2201.20SriastradSRCS+=	intel_huc_fw.c
2211.20SriastradSRCS+=	intel_uc.c
2221.20SriastradSRCS+=	intel_uc_fw.c
2231.20SriastradSRCS+=	i915_active.c
2241.20SriastradSRCS+=	i915_buddy.c
2251.20SriastradSRCS+=	i915_cmd_parser.c
2261.20SriastradSRCS+=	i915_drv.c
2271.20SriastradSRCS+=	i915_gem.c
2281.20SriastradSRCS+=	i915_gem_evict.c
2291.20SriastradSRCS+=	i915_gem_fence_reg.c
2301.20SriastradSRCS+=	i915_gem_gtt.c
2311.20SriastradSRCS+=	i915_getparam.c
2321.20SriastradSRCS+=	i915_globals.c
2331.20SriastradSRCS+=	i915_irq.c
2341.20SriastradSRCS+=	i915_memcpy.c
2351.20Sriastrad#SRCS+=	i915_mm.c
2361.20SriastradSRCS+=	i915_params.c
2371.20SriastradSRCS+=	i915_pci.c
2381.20SriastradSRCS+=	i915_perf.c
2391.20SriastradSRCS+=	i915_query.c
2401.20SriastradSRCS+=	i915_request.c
2411.20SriastradSRCS+=	i915_scatterlist.c
2421.20SriastradSRCS+=	i915_scheduler.c
2431.20SriastradSRCS+=	i915_suspend.c
2441.20SriastradSRCS+=	i915_sw_fence.c
2451.20SriastradSRCS+=	i915_sw_fence_work.c
2461.20Sriastrad#SRCS+=	i915_switcheroo.c
2471.20SriastradSRCS+=	i915_syncmap.c
2481.20Sriastrad#SRCS+=	i915_sysfs.c
2491.20Sriastrad#SRCS+=	i915_trace_points.c
2501.20SriastradSRCS+=	i915_user_extensions.c
2511.20SriastradSRCS+=	i915_utils.c
2521.20SriastradSRCS+=	i915_vgpu.c
2531.20SriastradSRCS+=	i915_vma.c
2541.20SriastradSRCS+=	intel_csr.c
2551.20SriastradSRCS+=	intel_device_info.c
2561.20SriastradSRCS+=	intel_memory_region.c
2571.20SriastradSRCS+=	intel_pch.c
2581.20SriastradSRCS+=	intel_pm.c
2591.20Sriastrad#SRCS+=	intel_region_lmem.c
2601.20SriastradSRCS+=	intel_runtime_pm.c
2611.20SriastradSRCS+=	intel_sideband.c
2621.3SriastradSRCS+=	intel_uncore.c
2631.20SriastradSRCS+=	intel_wakeref.c
2641.20SriastradSRCS+=	intel_wopcm.c
2651.20Sriastrad#SRCS+=	i915_oa_bdw.c
2661.20Sriastrad#SRCS+=	i915_oa_bxt.c
2671.20Sriastrad#SRCS+=	i915_oa_cflgt2.c
2681.20Sriastrad#SRCS+=	i915_oa_cflgt3.c
2691.20Sriastrad#SRCS+=	i915_oa_chv.c
2701.20Sriastrad#SRCS+=	i915_oa_cnl.c
2711.20Sriastrad#SRCS+=	i915_oa_glk.c
2721.20Sriastrad#SRCS+=	i915_oa_hsw.c
2731.20Sriastrad#SRCS+=	i915_oa_icl.c
2741.20Sriastrad#SRCS+=	i915_oa_kblgt2.c
2751.20Sriastrad#SRCS+=	i915_oa_kblgt3.c
2761.20Sriastrad#SRCS+=	i915_oa_sklgt2.c
2771.20Sriastrad#SRCS+=	i915_oa_sklgt3.c
2781.20Sriastrad#SRCS+=	i915_oa_sklgt4.c
2791.20Sriastrad#SRCS+=	i915_oa_tgl.c
2801.2Sriastrad
2811.13SrinWARNS=	3
2821.13Srin
2831.2Sriastrad.include <bsd.kmodule.mk>
284