1# $NetBSD: files.drmkms,v 1.83 2022/07/28 21:52:36 riastradh Exp $ 2 3version 20180827 4 5include "external/bsd/drm2/linux/files.drmkms_linux" 6 7# i2c code is not separated out, but it is marked so that it could be 8# if we wanted. Not clear that this provides as much advantage as 9# separating out PCI code, which will be necessary for, e.g., PCIless 10# ARM SoC graphics drivers. 11define drmkms_i2c: drmkms_linux 12 13define drmkms: drmkms_linux, drmkms_i2c, linux, sysmon_power 14 15# This code comes from the Linux kernel, which assumes signed 16# overflow is OK. 17makeoptions drmkms "COPTS.drmkms"+="-fwrapv" 18 19# Overrides first. 20makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include" 21makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include/drm" 22 23makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/common/include" 24 25# Then upstream. 26makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include" 27makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/drm" 28makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/uapi" 29 30makeoptions drmkms "CPPFLAGS.drmkms"+="-D__KERNEL__" 31 32ifdef i386 33makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86" 34makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_PAT" 35elifdef amd64 36makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86" 37makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_64" 38makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_PAT" 39elifdef arm 40makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM" 41elifdef aarch64 42makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM64" 43elifdef alpha 44makeoptions drmkms "CPPFLAGS.drmkms"+="-Ualpha" 45endif 46 47makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE=0" 48makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0" 49makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_DRM_FBDEV_EMULATION=1" 50makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_DRM_FBDEV_OVERALLOC=100" 51makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_FB=0" 52makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_LOCKDEP=0" 53makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_PCI=1" 54 55makeoptions drmkms "CWARNFLAGS.drmkms"+="-Wno-missing-field-initializers" 56 57# NetBSD additions. 58file external/bsd/drm2/drm/drm_agp_hook.c drmkms 59file external/bsd/drm2/drm/drm_cdevsw.c drmkms 60file external/bsd/drm2/drm/drm_gem_vm.c drmkms 61file external/bsd/drm2/drm/drm_module.c drmkms 62file external/bsd/drm2/drm/drm_stub.c !drmkms & !drmbase 63file external/bsd/drm2/drm/drm_sysctl.c drmkms 64 65# pci bus ids -- doesn't depend on all of pci, just the header files 66file external/bsd/drm2/pci/drm_pci_busid.c drmkms 67 68# Generic, unaccelerated kms framebuffer. 69define drmfb: genfb 70file external/bsd/drm2/drm/drmfb.c drmfb 71 72makeoptions drmfb "CPPFLAGS.drmfb"+="${CPPFLAGS.drmkms}" 73 74include "external/bsd/drm2/ttm/files.ttm" 75 76makeoptions drmkms "CWARNFLAGS.drm_atomic_helper.c"+="-Wno-shadow" 77makeoptions drmkms "CWARNFLAGS.drm_bufs.c"+="-Wno-pointer-arith" 78makeoptions drmkms "CWARNFLAGS.drm_crtc.c"+="-Wno-missing-field-initializers" 79makeoptions drmkms "CWARNFLAGS.drm_crtc.c"+="-Wno-pointer-arith" 80makeoptions drmkms "CWARNFLAGS.drm_crtc.c"+="-Wno-shadow" 81makeoptions drmkms "CWARNFLAGS.drm_client_modeset.c"+="-Wno-shadow" 82makeoptions drmkms "CWARNFLAGS.drm_dp_helper.c"+="-Wno-pointer-arith" 83makeoptions drmkms "CWARNFLAGS.drm_fb_helper.c"+="-Wno-shadow" 84makeoptions drmkms "CWARNFLAGS.drm_edid.c"+="-Wno-shadow" 85makeoptions drmkms "CWARNFLAGS.drm_ioctl.c"+="-Wno-shadow" 86makeoptions drmkms "CWARNFLAGS.drm_mm.c"+="${${ACTIVE_CC} == clang :? -Wno-unused-function :}" 87makeoptions drmkms "CWARNFLAGS.drm_modes.c"+="-Wno-shadow" 88 89# Legacy user-mode setting -- for the following legacy drivers: 90# 91# mach64* 92# mga* 93# savage* 94# sis* 95# tdfx* 96# via 97# 98# * not yet adapted to current drm code base 99# 100define drmums: drmkms 101makeoptions drmums "CPPFLAGS.drmkms"+="-DCONFIG_DRM_LEGACY" 102makeoptions drmums "CPPFLAGS.drmums"+="${CPPFLAGS.drmkms}" 103file external/bsd/drm2/dist/drm/drm_bufs.c drmums 104file external/bsd/drm2/dist/drm/drm_context.c drmums 105file external/bsd/drm2/dist/drm/drm_dma.c drmums 106file external/bsd/drm2/dist/drm/drm_legacy_misc.c drmums 107file external/bsd/drm2/drm/drm_lock.c drmums 108file external/bsd/drm2/drm/drm_scatter.c drmums 109 110# Set `options DRM_LEGACY' to allow loading modules requiring drmums 111# even if none are statically linked into the kernel. 112defflag DRM_LEGACY: drmums 113 114# GPU scheduler 115define drmkms_sched: drmkms 116makeoptions drmkms_sched "CPPFLAGS.drmkms_sched"+="${CPPFLAGS.drmkms}" 117 118file external/bsd/drm2/dist/drm/scheduler/sched_entity.c drmkms_sched 119file external/bsd/drm2/dist/drm/scheduler/sched_fence.c drmkms_sched 120file external/bsd/drm2/dist/drm/scheduler/sched_main.c drmkms_sched 121 122# Generated from drm2netbsd. 123#file external/bsd/drm2/dist/drm/drm_agpsupport.c drmkms # drmkms_pci 124file external/bsd/drm2/dist/drm/drm_atomic.c drmkms 125file external/bsd/drm2/dist/drm/drm_atomic_helper.c drmkms 126file external/bsd/drm2/dist/drm/drm_atomic_state_helper.c drmkms 127file external/bsd/drm2/dist/drm/drm_atomic_uapi.c drmkms 128file external/bsd/drm2/dist/drm/drm_auth.c drmkms 129file external/bsd/drm2/dist/drm/drm_blend.c drmkms 130file external/bsd/drm2/dist/drm/drm_bridge.c drmkms 131file external/bsd/drm2/drm/drm_cache.c drmkms 132file external/bsd/drm2/drm/drm_client.c drmkms 133file external/bsd/drm2/dist/drm/drm_client_modeset.c drmkms 134file external/bsd/drm2/dist/drm/drm_color_mgmt.c drmkms 135file external/bsd/drm2/dist/drm/drm_connector.c drmkms 136file external/bsd/drm2/dist/drm/drm_crtc.c drmkms 137file external/bsd/drm2/dist/drm/drm_crtc_helper.c drmkms 138file external/bsd/drm2/dist/drm/drm_damage_helper.c drmkms 139file external/bsd/drm2/dist/drm/drm_dp_dual_mode_helper.c drmkms 140file external/bsd/drm2/dist/drm/drm_dp_helper.c drmkms 141file external/bsd/drm2/dist/drm/drm_dp_mst_topology.c drmkms 142file external/bsd/drm2/dist/drm/drm_drv.c drmkms 143file external/bsd/drm2/dist/drm/drm_dsc.c drmkms 144file external/bsd/drm2/dist/drm/drm_dumb_buffers.c drmkms 145file external/bsd/drm2/dist/drm/drm_edid.c drmkms 146file external/bsd/drm2/dist/drm/drm_encoder.c drmkms 147file external/bsd/drm2/i2c/drm_encoder_slave.c drmkms 148file external/bsd/drm2/dist/drm/drm_fb_helper.c drmkms 149file external/bsd/drm2/dist/drm/drm_file.c drmkms 150file external/bsd/drm2/dist/drm/drm_flip_work.c drmkms 151#file external/bsd/drm2/dist/drm/drm_format_helper.c drmkms 152file external/bsd/drm2/dist/drm/drm_fourcc.c drmkms 153file external/bsd/drm2/dist/drm/drm_framebuffer.c drmkms 154file external/bsd/drm2/dist/drm/drm_gem.c drmkms 155file external/bsd/drm2/drm/drm_gem_cma_helper.c drmkms 156file external/bsd/drm2/drm/drm_gem_framebuffer_helper.c drmkms 157file external/bsd/drm2/dist/drm/drm_hashtab.c drmkms 158file external/bsd/drm2/drm/drm_hdcp.c drmkms 159file external/bsd/drm2/dist/drm/drm_ioctl.c drmkms 160file external/bsd/drm2/dist/drm/drm_irq.c drmkms 161#file external/bsd/drm2/dist/drm/drm_kms_helper_common.c drmkms 162file external/bsd/drm2/drm/drm_lease.c drmkms 163file external/bsd/drm2/drm/drm_memory.c drmkms 164file external/bsd/drm2/dist/drm/drm_mm.c drmkms 165file external/bsd/drm2/dist/drm/drm_mode_config.c drmkms 166file external/bsd/drm2/dist/drm/drm_mode_object.c drmkms 167file external/bsd/drm2/dist/drm/drm_modes.c drmkms 168file external/bsd/drm2/dist/drm/drm_modeset_helper.c drmkms 169file external/bsd/drm2/dist/drm/drm_modeset_lock.c drmkms 170file external/bsd/drm2/dist/drm/drm_panel.c drmkms 171file external/bsd/drm2/dist/drm/drm_panel_orientation_quirks.c drmkms 172#file external/bsd/drm2/dist/drm/drm_pci.c drmkms # drmkms_pci 173file external/bsd/drm2/dist/drm/drm_plane.c drmkms 174file external/bsd/drm2/dist/drm/drm_plane_helper.c drmkms 175file external/bsd/drm2/dist/drm/drm_prime.c drmkms 176file external/bsd/drm2/dist/drm/drm_print.c drmkms 177file external/bsd/drm2/dist/drm/drm_probe_helper.c drmkms 178file external/bsd/drm2/dist/drm/drm_property.c drmkms 179file external/bsd/drm2/dist/drm/drm_rect.c drmkms 180file external/bsd/drm2/dist/drm/drm_scdc_helper.c drmkms 181file external/bsd/drm2/dist/drm/drm_self_refresh_helper.c drmkms 182#file external/bsd/drm2/dist/drm/drm_simple_kms_helper.c drmkms 183file external/bsd/drm2/dist/drm/drm_syncobj.c drmkms 184file external/bsd/drm2/drm/drm_sysfs.c drmkms 185file external/bsd/drm2/dist/drm/drm_trace_points.c drmkms 186file external/bsd/drm2/dist/drm/drm_vblank.c drmkms 187file external/bsd/drm2/drm/drm_vm.c drmkms 188file external/bsd/drm2/drm/drm_vma_manager.c drmkms 189file external/bsd/drm2/drm/drm_writeback.c drmkms 190