Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/modules/i915drmkms drm: Dust off module build a little.
details: https://anonhg.NetBSD.org/src/rev/a5b13f28d378
branches: trunk
changeset: 368537:a5b13f28d378
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Jul 17 14:11:40 2022 +0000
description:
drm: Dust off module build a little.
diffstat:
sys/external/bsd/drm2/drm/drm_module.c | 8 +-
sys/modules/drmkms/Makefile | 4 +-
sys/modules/drmkms/Makefile.inc | 8 +-
sys/modules/drmkms_linux/Makefile | 4 +-
sys/modules/i915drmkms/Makefile | 276 +++++++++++++++++++++++++-------
5 files changed, 224 insertions(+), 76 deletions(-)
diffs (truncated from 435 to 300 lines):
diff -r b345c5abd769 -r a5b13f28d378 sys/external/bsd/drm2/drm/drm_module.c
--- a/sys/external/bsd/drm2/drm/drm_module.c Sun Jul 17 14:11:18 2022 +0000
+++ b/sys/external/bsd/drm2/drm/drm_module.c Sun Jul 17 14:11:40 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_module.c,v 1.29 2021/12/31 17:22:45 riastradh Exp $ */
+/* $NetBSD: drm_module.c,v 1.30 2022/07/17 14:11:40 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.29 2021/12/31 17:22:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.30 2022/07/17 14:11:40 riastradh Exp $");
#include <sys/types.h>
#include <sys/condvar.h>
@@ -206,9 +206,7 @@
case MODULE_CMD_FINI:
#ifdef _MODULE
- error = devsw_detach(NULL, &drm_cdevsw);
- if (error)
- return error;
+ devsw_detach(NULL, &drm_cdevsw);
#endif
drm_fini();
return 0;
diff -r b345c5abd769 -r a5b13f28d378 sys/modules/drmkms/Makefile
--- a/sys/modules/drmkms/Makefile Sun Jul 17 14:11:18 2022 +0000
+++ b/sys/modules/drmkms/Makefile Sun Jul 17 14:11:40 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2021/12/19 11:54:24 riastradh Exp $
+# $NetBSD: Makefile,v 1.16 2022/07/17 14:11:40 riastradh Exp $
.include "../Makefile.inc"
.include "Makefile.inc"
@@ -41,9 +41,9 @@
COPTS.drm_client_modeset.c+= -Wno-shadow
COPTS.drm_dp_helper.c+= -Wno-pointer-arith
COPTS.drm_fb_helper.c+= -Wno-shadow
-COPTS.drm_edid.c+= -Wno-error=attributes
COPTS.drm_edid.c+= -Wno-shadow
COPTS.drm_ioctl.c+= -Wno-shadow
+COPTS.drm_mm.c+= ${${ACTIVE_CC} == clang :? -Wno-unused-function :}
COPTS.drm_modes.c+= -Wno-shadow
# Upstream source files.
diff -r b345c5abd769 -r a5b13f28d378 sys/modules/drmkms/Makefile.inc
--- a/sys/modules/drmkms/Makefile.inc Sun Jul 17 14:11:18 2022 +0000
+++ b/sys/modules/drmkms/Makefile.inc Sun Jul 17 14:11:40 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.6 2021/12/19 11:54:24 riastradh Exp $
+# $NetBSD: Makefile.inc,v 1.7 2022/07/17 14:11:40 riastradh Exp $
# Common makefile cruft for drm2 code.
@@ -30,13 +30,13 @@
.elif ${MACHINE} == "evbarm"
CPPFLAGS+= -DCONFIG_ARM
.elif ${MACHINE_ARCH} == "aarch64"
-CPPFLAGS+= -DCONFIG_AARCH64
+CPPFLAGS+= -DCONFIG_ARM64
.endif
CPPFLAGS+= -DCONFIG_BACKLIGHT_CLASS_DEVICE=0
CPPFLAGS+= -DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0
-CPPFLAGS+= -DCONFIG_DRM_FBDEV_EMULATION=0
-CPPFLAGS+= -DCONFIG_DRM_FBDEV_OVERALLOC=1000
+CPPFLAGS+= -DCONFIG_DRM_FBDEV_EMULATION=1
+CPPFLAGS+= -DCONFIG_DRM_FBDEV_OVERALLOC=100
CPPFLAGS+= -DCONFIG_FB=0
CPPFLAGS+= -DCONFIG_LOCKDEP=0
CPPFLAGS+= -DCONFIG_PCI=1
diff -r b345c5abd769 -r a5b13f28d378 sys/modules/drmkms_linux/Makefile
--- a/sys/modules/drmkms_linux/Makefile Sun Jul 17 14:11:18 2022 +0000
+++ b/sys/modules/drmkms_linux/Makefile Sun Jul 17 14:11:40 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2021/12/19 11:54:24 riastradh Exp $
+# $NetBSD: Makefile,v 1.15 2022/07/17 14:11:40 riastradh Exp $
#
# At some point this needs to turn into linux.kmod and a proper home for it
@@ -46,7 +46,7 @@
SRCS+= linux_pci.c
SRCS+= linux_radixtree.c
SRCS+= linux_rwsem.c
-SRCS+= linux_sg.c
+SRCS+= linux_sgt.c
SRCS+= linux_stop_machine.c
SRCS+= linux_sync_file.c
SRCS+= linux_wait_bit.c
diff -r b345c5abd769 -r a5b13f28d378 sys/modules/i915drmkms/Makefile
--- a/sys/modules/i915drmkms/Makefile Sun Jul 17 14:11:18 2022 +0000
+++ b/sys/modules/i915drmkms/Makefile Sun Jul 17 14:11:40 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2021/12/19 01:03:42 riastradh Exp $
+# $NetBSD: Makefile,v 1.20 2022/07/17 14:11:40 riastradh Exp $
.include "../Makefile.inc"
.include "../drmkms/Makefile.inc"
@@ -10,6 +10,10 @@
.PATH: ${S}/external/bsd/drm2/i915drm
.PATH: ${S}/external/bsd/drm2/dist/drm/i915
+.PATH: ${S}/external/bsd/drm2/dist/drm/i915/display
+.PATH: ${S}/external/bsd/drm2/dist/drm/i915/gem
+.PATH: ${S}/external/bsd/drm2/dist/drm/i915/gt
+.PATH: ${S}/external/bsd/drm2/dist/drm/i915/gt/uc
CPPFLAGS+= -I${S}/sys/modules/drmkms
@@ -17,113 +21,259 @@
CPPFLAGS+= -I${S}/external/bsd/drm2/dist/drm/i915
-CPPFLAGS+= -DCONFIG_DRM_I915_FBDEV=1
-CPPFLAGS+= -DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0
-
# Substitute for _KERNEL_OPT flags.
CPPFLAGS+= -DNACPICA=1
CPPFLAGS+= -DNVGA=1
-CWARNFLAGS+= -Wno-shadow
-CWARNFLAGS+= -Wno-pointer-arith
-CWARNFLAGS.clang+= -Wno-error=enum-conversion
-CWARNFLAGS.clang+= -Wno-error=unused-function
+CPPFLAGS+= -DCONFIG_DRM_FBDEV_EMULATION=1
+CPPFLAGS+= -DCONFIG_DRM_I915_DEBUG=1 # XXX
+CPPFLAGS+= -DCONFIG_DRM_I915_DEBUG_GEM=1 # XXX
+CPPFLAGS+= -DCONFIG_DRM_I915_DEBUG_RUNTIME_PM=0
+CPPFLAGS+= -DCONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CPPFLAGS+= -DCONFIG_DRM_I915_TIMESLICE_DURATION=1
+CPPFLAGS+= -DCONFIG_DRM_I915_ALPHA_SUPPORT=0
+CPPFLAGS+= -DCONFIG_DRM_I915_FBDEV=1
+CPPFLAGS+= -DCONFIG_DRM_I915_GVT=0
+CPPFLAGS+= -DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0
+CPPFLAGS+= -DCONFIG_DRM_I915_DEBUG_MMIO=1 # XXX
+CPPFLAGS+= -DCONFIG_DRM_I915_FORCE_PROBE=0
+CPPFLAGS+= -DCONFIG_DRM_I915_SPIN_REQUEST=0
+CPPFLAGS+= -DCONFIG_DRM_I915_SW_FENCE_CHECK_DAG=1 # XXX expensive debug option?
+CPPFLAGS+= -DCONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 # milliseconds
+CPPFLAGS+= -DCONFIG_DRM_I915_STOP_TIMEOUT=100 # milliseconds
+CPPFLAGS+= -DCONFIG_DRM_I915_PREEMPT_TIMEOUT=640 # milliseconds
+CPPFLAGS+= -DCONFIG_DRM_I915_CAPTURE_ERROR=0
+CPPFLAGS+= -DCONFIG_DRM_I915_SELFTEST=0
+CPPFLAGS+= -DCONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=0
+CPPFLAGS+= -DCONFIG_PM=1
+CPPFLAGS+= -DCONFIG_INTEL_MEI_HDCP=0
-# Code imported from Linux - expects signed overflow to be OK.
+# This code comes from the Linux kernel, which assumes signed
+# overflow is OK.
COPTS+= -fwrapv
-COPTS.i915_drv.c+= ${${ACTIVE_CC} == "gcc":? -Wno-override-init :}
-COPTS.i915_drv.c+= ${${ACTIVE_CC} == "clang":? -Wno-initializer-overrides :}
+CWARNFLAGS+= -Wno-missing-field-initializers
+CWARNFLAGS+= -Wno-pointer-arith
+CWARNFLAGS+= -Wno-shadow
+
+COPTS.i915_pci.c+= ${${ACTIVE_CC} == "gcc":? -Wno-override-init :}
+COPTS.i915_pci.c+= ${${ACTIVE_CC} == "clang":? -Wno-initializer-overrides :}
+COPTS.i915_sw_fence.c+= ${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
+COPTS.intel_sprite.c+= ${${ACTIVE_CC} == "gcc":? -Wno-maybe-uninitialized :}
+COPTS.intel_ddi.c+= ${GCC_NO_MAYBE_UNINITIALIZED}
+COPTS.intel_ddi.c+= ${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.intel_display.c+= ${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.intel_guc_submission.c+= ${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
+COPTS.intel_hdmi.c+= ${${ACTIVE_CC} == "clang":? -Wno-unused-function :}
+COPTS.intel_sdvo.c+= ${GCC_NO_IMPLICIT_FALLTHRU}
# NetBSD additions.
SRCS+= i915_module.c
-SRCS+= i915_pci.c
-SRCS+= intel_gtt.c
-
-# wsconsole framebuffer.
+SRCS+= i915_pci_autoconf.c
SRCS+= intelfb.c
+# Local overrides.
+SRCS+= i915_gem_userptr.c
+SRCS+= i915_gemfs.c
+SRCS+= i915_switcheroo.c
+SRCS+= i915_sysfs.c
+SRCS+= i915_trace_points.c
+SRCS+= icl_dsi.c
+SRCS+= intel_dsi_dcs_backlight.c
+SRCS+= intel_gtt_subr.c
+SRCS+= intel_guc_log.c
+SRCS+= intel_lpe_audio.c
+SRCS+= intel_region_lmem.c
+SRCS+= vlv_dsi.c
+
# Upstream sources.
+#
+# sed -E -e 's,^(#?)file .*/([^ ]*).*,\1SRCS+= \2,g'
SRCS+= dvo_ch7017.c
SRCS+= dvo_ch7xxx.c
SRCS+= dvo_ivch.c
SRCS+= dvo_ns2501.c
SRCS+= dvo_sil164.c
SRCS+= dvo_tfp410.c
-SRCS+= i915_cmd_parser.c
-SRCS+= i915_dma.c
-SRCS+= i915_drv.c
-SRCS+= i915_gem.c
-SRCS+= i915_gem_batch_pool.c
-SRCS+= i915_gem_context.c
-SRCS+= i915_gem_debug.c
-#SRCS+= i915_gem_dmabuf.c # XXX drm prime
-SRCS+= i915_gem_evict.c
-SRCS+= i915_gem_execbuffer.c
-SRCS+= i915_gem_fence.c
-SRCS+= i915_gem_gtt.c
-SRCS+= i915_gem_render_state.c
-SRCS+= i915_gem_shrinker.c
-SRCS+= i915_gem_stolen.c
-SRCS+= i915_gem_tiling.c
-SRCS+= i915_gem_userptr.c
-SRCS+= i915_gpu_error.c
-SRCS+= i915_guc_submission.c
-SRCS+= i915_irq.c
-SRCS+= i915_params.c
-SRCS+= i915_suspend.c
-SRCS+= i915_sysfs.c
-SRCS+= i915_trace_points.c
-SRCS+= i915_vgpu.c
+#SRCS+= icl_dsi.c
SRCS+= intel_acpi.c
SRCS+= intel_atomic.c
SRCS+= intel_atomic_plane.c
SRCS+= intel_audio.c
SRCS+= intel_bios.c
+SRCS+= intel_bw.c
+SRCS+= intel_cdclk.c
+SRCS+= intel_color.c
+SRCS+= intel_combo_phy.c
+SRCS+= intel_connector.c
SRCS+= intel_crt.c
SRCS+= intel_ddi.c
SRCS+= intel_display.c
+SRCS+= intel_display_power.c
SRCS+= intel_dp.c
+SRCS+= intel_dp_aux_backlight.c
+SRCS+= intel_dp_link_training.c
SRCS+= intel_dp_mst.c
-SRCS+= intel_dsi.c
-#SRCS+= intel_dsi_panel_vbt.c
-#SRCS+= intel_dsi_pll.c
+SRCS+= intel_dpio_phy.c
+SRCS+= intel_dpll_mgr.c
+SRCS+= intel_dsb.c
+#SRCS+= intel_dsi.c
+#SRCS+= intel_dsi_dcs_backlight.c
+#SRCS+= intel_dsi_vbt.c
SRCS+= intel_dvo.c
SRCS+= intel_fbc.c
SRCS+= intel_fbdev.c
SRCS+= intel_fifo_underrun.c
SRCS+= intel_frontbuffer.c
-SRCS+= intel_guc_loader.c
+SRCS+= intel_gmbus.c
+SRCS+= intel_hdcp.c
SRCS+= intel_hdmi.c
SRCS+= intel_hotplug.c
-SRCS+= intel_i2c.c
-SRCS+= intel_lrc.c
+#SRCS+= intel_lpe_audio.c
+SRCS+= intel_lspcon.c
SRCS+= intel_lvds.c
-SRCS+= intel_mocs.c
-SRCS+= intel_modes.c
SRCS+= intel_opregion.c
SRCS+= intel_overlay.c
SRCS+= intel_panel.c
+SRCS+= intel_psr.c
+SRCS+= intel_quirks.c
+SRCS+= intel_sdvo.c
+SRCS+= intel_sprite.c
+SRCS+= intel_tc.c
+SRCS+= intel_tv.c
+SRCS+= intel_vdsc.c
+SRCS+= intel_vga.c
+#SRCS+= vlv_dsi.c
+#SRCS+= vlv_dsi_pll.c
+SRCS+= i915_gem_busy.c
+SRCS+= i915_gem_clflush.c
+#SRCS+= i915_gem_client_blt.c
+SRCS+= i915_gem_context.c
+SRCS+= i915_gem_dmabuf.c
+SRCS+= i915_gem_domain.c
+SRCS+= i915_gem_execbuffer.c
+SRCS+= i915_gem_fence.c
+SRCS+= i915_gem_internal.c
+SRCS+= i915_gem_lmem.c
+SRCS+= i915_gem_mman.c
+SRCS+= i915_gem_object.c
Home |
Main Index |
Thread Index |
Old Index