diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-08-28 10:18:00 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-08-28 10:18:00 +0000 |
commit | 643e8a8d7412654fad92f18485171b0ace6da791 (patch) | |
tree | 3d8dc383842d3d36fb036412f881eeb7ec3c5297 | |
parent | b0f06aa9fda008c15e37a3a987dd5095a011b525 (diff) |
Build and enable amdgpu(4) on arm64. The DCN1.0 support has been made
optional and will only be compiled for amd64/i386. Apparently this is
only needed on Raven Ridge APUs.
ok jsg@, patrick@, deraadt@
-rw-r--r-- | sys/arch/arm64/conf/GENERIC | 5 | ||||
-rw-r--r-- | sys/arch/arm64/conf/Makefile.arm64 | 17 | ||||
-rw-r--r-- | sys/dev/pci/drm/files.drm | 52 | ||||
-rw-r--r-- | sys/dev/pci/drm/include/generated/autoconf.h | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/include/linux/pci.h | 6 |
5 files changed, 50 insertions, 32 deletions
diff --git a/sys/arch/arm64/conf/GENERIC b/sys/arch/arm64/conf/GENERIC index 04309e03b6b..f79274cd8f6 100644 --- a/sys/arch/arm64/conf/GENERIC +++ b/sys/arch/arm64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.116 2019/08/28 07:12:37 kettenis Exp $ +# $OpenBSD: GENERIC,v 1.117 2019/08/28 10:17:59 kettenis Exp $ # # GENERIC machine description file # @@ -110,6 +110,9 @@ wsdisplay* at simplefb? radeondrm* at pci? drm* at radeondrm? wsdisplay* at radeondrm? +amdgpu* at pci? +drm* at amdgpu? +wsdisplay* at amdgpu? # iMX imxccm* at fdt? early 1 diff --git a/sys/arch/arm64/conf/Makefile.arm64 b/sys/arch/arm64/conf/Makefile.arm64 index efa5e9fbbdb..4ff3740a8a5 100644 --- a/sys/arch/arm64/conf/Makefile.arm64 +++ b/sys/arch/arm64/conf/Makefile.arm64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.arm64,v 1.33 2019/06/21 15:34:06 deraadt Exp $ +# $OpenBSD: Makefile.arm64,v 1.34 2019/08/28 10:17:59 kettenis Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -23,7 +23,20 @@ _archdir?= $S/arch/${_arch} INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch \ -I$S/dev/pci/drm/include \ - -I$S/dev/pci/drm/include/uapi + -I$S/dev/pci/drm/include/uapi \ + -I$S/dev/pci/drm/amd/include/asic_reg \ + -I$S/dev/pci/drm/amd/include \ + -I$S/dev/pci/drm/amd/amdgpu \ + -I$S/dev/pci/drm/amd/display \ + -I$S/dev/pci/drm/amd/display/include \ + -I$S/dev/pci/drm/amd/display/dc \ + -I$S/dev/pci/drm/amd/display/amdgpu_dm \ + -I$S/dev/pci/drm/amd/powerplay/inc \ + -I$S/dev/pci/drm/amd/powerplay/smumgr \ + -I$S/dev/pci/drm/amd/powerplay/hwmgr \ + -I$S/dev/pci/drm/amd/display/dc/inc \ + -I$S/dev/pci/drm/amd/display/dc/inc/hw \ + -I$S/dev/pci/drm/amd/display/modules/inc CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-uninitialized -Wno-pointer-sign \ diff --git a/sys/dev/pci/drm/files.drm b/sys/dev/pci/drm/files.drm index c1b59918ed5..3a9312d5def 100644 --- a/sys/dev/pci/drm/files.drm +++ b/sys/dev/pci/drm/files.drm @@ -1,5 +1,5 @@ # $NetBSD: files.drm,v 1.2 2007/03/28 11:29:37 jmcneill Exp $ -# $OpenBSD: files.drm,v 1.46 2019/08/18 13:11:47 kettenis Exp $ +# $OpenBSD: files.drm,v 1.47 2019/08/28 10:17:59 kettenis Exp $ # direct rendering modules define drmbase {[primary = -1]} @@ -376,9 +376,9 @@ file dev/pci/drm/amd/display/dc/bios/dce80/command_table_helper_dce80.c amddal file dev/pci/drm/amd/display/dc/calcs/bw_fixed.c amddal file dev/pci/drm/amd/display/dc/calcs/custom_float.c amddal file dev/pci/drm/amd/display/dc/calcs/dce_calcs.c amddal -file dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c amddal -file dev/pci/drm/amd/display/dc/calcs/dcn_calc_math.c amddal -file dev/pci/drm/amd/display/dc/calcs/dcn_calcs.c amddal +file dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c amddal & bios +file dev/pci/drm/amd/display/dc/calcs/dcn_calc_math.c amddal & bios +file dev/pci/drm/amd/display/dc/calcs/dcn_calcs.c amddal & bios file dev/pci/drm/amd/display/dc/core/amdgpu_dc.c amddal file dev/pci/drm/amd/display/dc/core/dc_debug.c amddal file dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c amddal @@ -426,32 +426,32 @@ file dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c amddal file dev/pci/drm/amd/display/dc/dce80/dce80_hw_sequencer.c amddal file dev/pci/drm/amd/display/dc/dce80/dce80_resource.c amddal file dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_hubbub.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_hubp.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_link_encoder.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_mpc.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_opp.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_optc.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_resource.c amddal -file dev/pci/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c amddal -file dev/pci/drm/amd/display/dc/dml/display_mode_lib.c amddal -file dev/pci/drm/amd/display/dc/dml/display_rq_dlg_helpers.c amddal -file dev/pci/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c amddal -file dev/pci/drm/amd/display/dc/dml/dml_common_defs.c amddal +file dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_hubbub.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_hubp.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_link_encoder.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_mpc.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_opp.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_optc.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_resource.c amddal & bios +file dev/pci/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c amddal & bios +file dev/pci/drm/amd/display/dc/dml/display_mode_lib.c amddal & bios +file dev/pci/drm/amd/display/dc/dml/display_rq_dlg_helpers.c amddal & bios +file dev/pci/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c amddal & bios +file dev/pci/drm/amd/display/dc/dml/dml_common_defs.c amddal & bios file dev/pci/drm/amd/display/dc/gpio/dce110/hw_factory_dce110.c amddal file dev/pci/drm/amd/display/dc/gpio/dce110/hw_translate_dce110.c amddal file dev/pci/drm/amd/display/dc/gpio/dce120/hw_factory_dce120.c amddal file dev/pci/drm/amd/display/dc/gpio/dce120/hw_translate_dce120.c amddal file dev/pci/drm/amd/display/dc/gpio/dce80/hw_factory_dce80.c amddal file dev/pci/drm/amd/display/dc/gpio/dce80/hw_translate_dce80.c amddal -file dev/pci/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c amddal -file dev/pci/drm/amd/display/dc/gpio/dcn10/hw_translate_dcn10.c amddal +file dev/pci/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c amddal & bios +file dev/pci/drm/amd/display/dc/gpio/dcn10/hw_translate_dcn10.c amddal & bios file dev/pci/drm/amd/display/dc/gpio/diagnostics/hw_factory_diag.c amddal file dev/pci/drm/amd/display/dc/gpio/diagnostics/hw_translate_diag.c amddal file dev/pci/drm/amd/display/dc/gpio/gpio_base.c amddal @@ -472,7 +472,7 @@ file dev/pci/drm/amd/display/dc/i2caux/dce120/i2caux_dce120.c amddal file dev/pci/drm/amd/display/dc/i2caux/dce80/i2c_hw_engine_dce80.c amddal file dev/pci/drm/amd/display/dc/i2caux/dce80/i2c_sw_engine_dce80.c amddal file dev/pci/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c amddal -file dev/pci/drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c amddal +file dev/pci/drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c amddal & bios file dev/pci/drm/amd/display/dc/i2caux/diagnostics/i2caux_diag.c amddal file dev/pci/drm/amd/display/dc/i2caux/engine_base.c amddal file dev/pci/drm/amd/display/dc/i2caux/i2c_engine.c amddal @@ -483,7 +483,7 @@ file dev/pci/drm/amd/display/dc/i2caux/i2caux.c amddal file dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c amddal file dev/pci/drm/amd/display/dc/irq/dce120/irq_service_dce120.c amddal file dev/pci/drm/amd/display/dc/irq/dce80/irq_service_dce80.c amddal -file dev/pci/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c amddal +file dev/pci/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c amddal & bios file dev/pci/drm/amd/display/dc/irq/irq_service.c amddal file dev/pci/drm/amd/display/dc/virtual/virtual_link_encoder.c amddal file dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.c amddal diff --git a/sys/dev/pci/drm/include/generated/autoconf.h b/sys/dev/pci/drm/include/generated/autoconf.h index d6bec05d76d..be8d046c856 100644 --- a/sys/dev/pci/drm/include/generated/autoconf.h +++ b/sys/dev/pci/drm/include/generated/autoconf.h @@ -14,7 +14,9 @@ #define CONFIG_DRM_I915_SW_FENCE_CHECK_DAG 0 #define CONFIG_PM 0 #define CONFIG_DRM_AMD_DC 1 +#if defined(__amd64__) || defined(__i386__) #define CONFIG_DRM_AMD_DC_DCN1_0 1 +#endif #if 0 #define CONFIG_DRM_AMDGPU_CIK 1 #define CONFIG_DRM_AMDGPU_SI 1 diff --git a/sys/dev/pci/drm/include/linux/pci.h b/sys/dev/pci/drm/include/linux/pci.h index 635463a40a3..4ec8881f8ca 100644 --- a/sys/dev/pci/drm/include/linux/pci.h +++ b/sys/dev/pci/drm/include/linux/pci.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.h,v 1.3 2019/08/18 13:11:47 kettenis Exp $ */ +/* $OpenBSD: pci.h,v 1.4 2019/08/28 10:17:59 kettenis Exp $ */ /* * Copyright (c) 2015 Mark Kettenis * @@ -290,7 +290,7 @@ pci_get_class(pcireg_t class, struct pci_dev *pdev) #define PCI_CLASS_DISPLAY_OTHER \ (PCI_CLASS_DISPLAY | PCI_SUBCLASS_DISPLAY_MISC) -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || defined(__arm64__) || defined(__i386__) #define PCI_DMA_BIDIRECTIONAL 0 @@ -314,6 +314,6 @@ pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr) #define pci_set_dma_mask(x, y) 0 #define pci_set_consistent_dma_mask(x, y) 0 -#endif /* defined(__amd64__) || defined(__i386__) */ +#endif /* defined(__amd64__) || defined(__arm64__) || defined(__i386__) */ #endif |