git: drm/amdgpu: Port to DragonFly
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Nov 3 09:49:04 PDT 2021
commit 789731325bde747251c28a37e0a00ed4efb88c46
Author: Sergey Zigachev <s.zi at outlook.com>
Date: Wed Nov 3 15:34:41 2021 +0500
drm/amdgpu: Port to DragonFly
* This commit does not build as it requires ttm changes from
the corresponding commit
Amdgpu driver changes:
* Builds with CONFIG_DRM_AMD_DC and CONFIG_DRM_AMD_DC_DCN1_0 defined
* Support for older GPUs (SI, CIK) is not implemented
* Several functions for display core module require msse and
mhard-float gcc flags to be set; and they require special
treatment from kernel by utilizing kernel_fpu_begin/kernel_fpu_end
functions
* It is required that tunable set amdgpu_hw_i2c=1 to work around
panic during module load
* Thunderbolt support is disabled
* Amdgpu trace infrastructure replaced by a stub
Drm changes:
* register_framebuffer is called at the later stage, after crtcs
were properly initialized
* drm_close implemented
* drm_connector_update_edid_property implemented
* Fix drm device stays locked in case of an error or module shutdown
* Imported drm gem framebuffer helper functions
* Fixed null pointer deref in the drm mmap ioctl
* Imported atomic64_inc and atomic_long_* functions from Linux
* Imported bitmap_complement function from Linux
* Imported kfifo struct from Linux
* Implemented dma fence array properly
* Imported rb_root_cached struct from Linux
* Implemented several dma fence functions
Co-authored-by: François Tigeot <ftigeot at wolfpond.org>
Co-authored-by: Matthew Dillon <dillon at apollo.backplane.com>
Summary of changes:
sys/dev/drm/amd/amdgpu/Makefile | 225 +++++++++-
sys/dev/drm/amd/amdgpu/amdgpu.h | 56 ++-
sys/dev/drm/amd/amdgpu/amdgpu_acpi.c | 213 ++++-----
sys/dev/drm/amd/amdgpu/amdgpu_amdkfd.c | 9 +-
sys/dev/drm/amd/amdgpu/amdgpu_amdkfd.h | 4 +-
sys/dev/drm/amd/amdgpu/amdgpu_atombios.c | 12 +-
sys/dev/drm/amd/amdgpu/amdgpu_atombios.h | 5 -
sys/dev/drm/amd/amdgpu/amdgpu_bios.c | 94 ++--
sys/dev/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_cgs.c | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c | 11 +-
sys/dev/drm/amd/amdgpu/amdgpu_cs.c | 12 +-
sys/dev/drm/amd/amdgpu/amdgpu_ctx.c | 10 +-
sys/dev/drm/amd/amdgpu/amdgpu_device.c | 148 ++++--
sys/dev/drm/amd/amdgpu/amdgpu_dpm.h | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_drv.c | 96 +++-
sys/dev/drm/amd/amdgpu/amdgpu_encoders.c | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_fb.c | 31 +-
sys/dev/drm/amd/amdgpu/amdgpu_fence.c | 13 +-
sys/dev/drm/amd/amdgpu/amdgpu_gem.c | 18 +-
sys/dev/drm/amd/amdgpu/amdgpu_gfx.c | 18 +-
sys/dev/drm/amd/amdgpu/amdgpu_gmc.h | 4 +-
sys/dev/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 +-
sys/dev/drm/amd/amdgpu/amdgpu_i2c.c | 4 +-
sys/dev/drm/amd/amdgpu/amdgpu_ids.c | 8 +-
sys/dev/drm/amd/amdgpu/amdgpu_ids.h | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_ih.c | 4 +-
sys/dev/drm/amd/amdgpu/amdgpu_irq.c | 31 +-
sys/dev/drm/amd/amdgpu/amdgpu_kms.c | 28 +-
sys/dev/drm/amd/amdgpu/amdgpu_mn.c | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_mode.h | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_object.c | 9 +-
sys/dev/drm/amd/amdgpu/amdgpu_pm.c | 73 ++-
sys/dev/drm/amd/amdgpu/amdgpu_prime.c | 10 +
sys/dev/drm/amd/amdgpu/amdgpu_psp.c | 26 +-
sys/dev/drm/amd/amdgpu/amdgpu_queue_mgr.c | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_ring.c | 6 +-
sys/dev/drm/amd/amdgpu/amdgpu_ring.h | 6 +-
sys/dev/drm/amd/amdgpu/amdgpu_sa.c | 24 +-
sys/dev/drm/amd/amdgpu/amdgpu_sched.c | 7 +
sys/dev/drm/amd/amdgpu/amdgpu_trace.h | 495 ++-------------------
sys/dev/drm/amd/amdgpu/amdgpu_ttm.c | 26 +-
sys/dev/drm/amd/amdgpu/amdgpu_ttm.h | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_ucode.c | 6 +-
sys/dev/drm/amd/amdgpu/amdgpu_uvd.c | 14 +-
sys/dev/drm/amd/amdgpu/amdgpu_vce.c | 18 +-
sys/dev/drm/amd/amdgpu/amdgpu_vce.h | 4 +-
sys/dev/drm/amd/amdgpu/amdgpu_vcn.c | 6 +-
sys/dev/drm/amd/amdgpu/amdgpu_virt.c | 21 +-
sys/dev/drm/amd/amdgpu/amdgpu_virt.h | 2 +-
sys/dev/drm/amd/amdgpu/amdgpu_vm.c | 166 +++++--
sys/dev/drm/amd/amdgpu/amdgpu_vram_mgr.c | 6 +-
sys/dev/drm/amd/amdgpu/atom.c | 1 -
sys/dev/drm/amd/amdgpu/atom.h | 2 +-
sys/dev/drm/amd/amdgpu/atombios_encoders.c | 82 +++-
sys/dev/drm/amd/amdgpu/dce_v10_0.c | 2 +-
sys/dev/drm/amd/amdgpu/dce_v11_0.c | 2 +-
sys/dev/drm/amd/amdgpu/dce_virtual.c | 2 +-
sys/dev/drm/amd/amdgpu/gfx_v8_0.c | 37 +-
sys/dev/drm/amd/amdgpu/gfx_v9_0.c | 43 +-
sys/dev/drm/amd/amdgpu/gmc_v7_0.c | 9 +
sys/dev/drm/amd/amdgpu/gmc_v8_0.c | 9 +
sys/dev/drm/amd/amdgpu/gmc_v9_0.c | 10 +-
sys/dev/drm/amd/amdgpu/psp_v10_0.c | 4 +-
sys/dev/drm/amd/amdgpu/psp_v3_1.c | 4 +-
sys/dev/drm/amd/amdgpu/sdma_v2_4.c | 4 +-
sys/dev/drm/amd/amdgpu/sdma_v3_0.c | 4 +-
sys/dev/drm/amd/amdgpu/sdma_v4_0.c | 4 +-
sys/dev/drm/amd/amdgpu/soc15.c | 6 +-
sys/dev/drm/amd/amdgpu/uvd_v5_0.c | 4 +-
sys/dev/drm/amd/amdgpu/uvd_v6_0.c | 10 +-
sys/dev/drm/amd/amdgpu/uvd_v7_0.c | 14 +-
sys/dev/drm/amd/amdgpu/vce_v3_0.c | 2 +-
sys/dev/drm/amd/amdgpu/vce_v4_0.c | 8 +-
sys/dev/drm/amd/amdgpu/vcn_v1_0.c | 16 +-
sys/dev/drm/amd/amdgpu/vega10_ih.c | 17 +-
sys/dev/drm/amd/amdgpu/vi.c | 2 +
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 +-
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 +-
.../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 3 +
sys/dev/drm/amd/display/dc/basics/conversion.c | 2 +
sys/dev/drm/amd/display/dc/basics/vector.c | 3 +-
sys/dev/drm/amd/display/dc/bios/bios_parser.c | 2 +
sys/dev/drm/amd/display/dc/calcs/bw_fixed.c | 3 +-
sys/dev/drm/amd/display/dc/calcs/dcn_calcs.c | 1 +
sys/dev/drm/amd/display/dc/core/dc_debug.c | 8 +-
sys/dev/drm/amd/display/dc/core/dc_hw_sequencer.c | 2 +
sys/dev/drm/amd/display/dc/core/dc_link_ddc.c | 2 +
sys/dev/drm/amd/display/dc/core/dc_surface.c | 6 +-
sys/dev/drm/amd/display/dc/dc_helper.c | 58 ++-
sys/dev/drm/amd/display/dc/dc_stream.h | 13 -
sys/dev/drm/amd/display/dc/dce/dce_aux.c | 2 +
sys/dev/drm/amd/display/dc/dce/dce_dmcu.c | 1 +
.../drm/amd/display/dc/dce100/dce100_resource.c | 9 +
.../drm/amd/display/dc/dce110/dce110_compressor.c | 7 +-
.../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +
.../amd/display/dc/dce110/dce110_hw_sequencer.h | 2 -
.../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 10 +
.../drm/amd/display/dc/dce110/dce110_resource.c | 6 +
.../drm/amd/display/dc/dce112/dce112_resource.c | 10 +
.../amd/display/dc/dce120/dce120_hw_sequencer.c | 2 +
.../drm/amd/display/dc/dce120/dce120_resource.c | 7 +-
.../display/dc/dce120/dce120_timing_generator.c | 35 +-
.../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 2 +
sys/dev/drm/amd/display/dc/dce80/dce80_resource.c | 8 +
sys/dev/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 +
sys/dev/drm/amd/display/dc/dcn10/dcn10_dpp.h | 2 -
sys/dev/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 4 +
.../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +
sys/dev/drm/amd/display/dc/dcn10/dcn10_opp.c | 2 +
sys/dev/drm/amd/display/dc/dcn10/dcn10_resource.c | 5 +
.../display/dc/gpio/diagnostics/hw_factory_diag.c | 2 +
.../dc/gpio/diagnostics/hw_translate_diag.c | 2 +
sys/dev/drm/amd/display/dc/gpio/hw_factory.h | 3 +
.../amd/display/dc/i2caux/dce100/i2caux_dce100.c | 2 +
.../amd/display/dc/i2caux/dce120/i2caux_dce120.c | 2 +
.../display/dc/i2caux/dce80/i2c_sw_engine_dce80.c | 2 +
.../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c | 2 +
sys/dev/drm/amd/display/dc/i2caux/i2caux.h | 3 -
sys/dev/drm/amd/display/dc/inc/bw_fixed.h | 3 +-
.../amd/display/dc/irq/dcn10/irq_service_dcn10.c | 1 +
sys/dev/drm/amd/display/dc/irq/irq_service.c | 1 +
sys/dev/drm/amd/display/include/logger_types.h | 16 +-
.../drm/amd/display/modules/color/color_gamma.c | 28 +-
sys/dev/drm/amd/powerplay/amd_powerplay.c | 4 +-
sys/dev/drm/amd/powerplay/hwmgr/ppatomctrl.c | 1 +
sys/dev/drm/amd/powerplay/hwmgr/ppevvmath.h | 19 +-
sys/dev/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 +
sys/dev/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 2 +
sys/dev/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 +-
sys/dev/drm/amd/powerplay/hwmgr/vega10_powertune.c | 4 +
.../amd/powerplay/hwmgr/vega10_processpptables.c | 1 +
sys/dev/drm/amd/powerplay/hwmgr/vega10_thermal.c | 2 +
sys/dev/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 +
.../amd/powerplay/hwmgr/vega12_processpptables.c | 3 +-
sys/dev/drm/amd/powerplay/hwmgr/vega12_thermal.c | 2 +
sys/dev/drm/amd/powerplay/inc/hwmgr.h | 2 +-
sys/dev/drm/amd/powerplay/smumgr/ci_smumgr.c | 1 +
sys/dev/drm/amd/powerplay/smumgr/iceland_smumgr.c | 1 +
.../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 +
sys/dev/drm/amd/powerplay/smumgr/smu10_smumgr.c | 10 +-
sys/dev/drm/amd/powerplay/smumgr/smu7_smumgr.c | 10 +-
sys/dev/drm/amd/powerplay/smumgr/smu8_smumgr.c | 12 +-
sys/dev/drm/amd/powerplay/smumgr/smu9_smumgr.c | 5 +
sys/dev/drm/amd/powerplay/smumgr/tonga_smumgr.c | 1 +
sys/dev/drm/amd/powerplay/smumgr/vega10_smumgr.c | 28 +-
sys/dev/drm/amd/powerplay/smumgr/vega12_smumgr.c | 28 +-
sys/dev/drm/amd/powerplay/smumgr/vegam_smumgr.c | 1 +
sys/dev/drm/drm/Makefile | 4 +
sys/dev/drm/drm_auth.c | 2 -
sys/dev/drm/drm_connector.c | 52 +++
sys/dev/drm/drm_dragonfly.c | 1 +
sys/dev/drm/drm_drv.c | 10 +-
sys/dev/drm/drm_fb_helper.c | 39 +-
sys/dev/drm/drm_file.c | 91 ++++
sys/dev/drm/drm_gem_framebuffer_helper.c | 328 ++++++++++++++
sys/dev/drm/drm_ioctl.c | 4 +
sys/dev/drm/drm_scatter.c | 4 +-
sys/dev/drm/drm_vm.c | 12 +-
sys/dev/drm/include/asm-generic/atomic-long.h | 30 ++
sys/dev/drm/include/asm/atomic64_64.h | 9 +
sys/dev/drm/include/drm/drmP.h | 2 +-
sys/dev/drm/include/drm/drm_atomic.h | 22 +
sys/dev/drm/include/drm/drm_connector.h | 15 +
sys/dev/drm/include/drm/drm_fb_helper.h | 6 +
.../drm/include/drm/drm_gem_framebuffer_helper.h | 40 ++
sys/dev/drm/include/drm/gpu_scheduler.h | 6 +-
sys/dev/drm/include/linux/bitmap.h | 11 +
sys/dev/drm/include/linux/dma-fence-array.h | 62 ++-
sys/dev/drm/include/linux/dma-fence.h | 3 +
sys/dev/drm/include/linux/ioport.h | 1 +
sys/dev/drm/include/linux/kernel.h | 3 +
sys/dev/drm/include/linux/kfifo.h | 34 ++
sys/dev/drm/include/linux/list.h | 3 +
sys/dev/drm/include/linux/mm.h | 14 +
sys/dev/drm/include/linux/module.h | 4 +
sys/dev/drm/include/linux/pci.h | 103 ++++-
sys/dev/drm/include/linux/pfn_t.h | 2 +
sys/dev/drm/include/linux/preempt.h | 2 +
sys/dev/drm/include/linux/printk.h | 2 +
sys/dev/drm/include/linux/rbtree.h | 23 +
sys/dev/drm/include/linux/sched.h | 4 +-
sys/dev/drm/include/linux/wait.h | 4 +-
sys/dev/drm/include/uapi/linux/pci.h | 2 +
sys/dev/drm/include/uapi/linux/pci_regs.h | 7 +-
sys/dev/drm/kconfig.h | 6 +
sys/dev/drm/linux_compat.c | 10 +
sys/dev/drm/linux_dma.c | 2 +-
sys/dev/drm/linux_fence-array.c | 194 ++++++++
sys/dev/drm/linux_fence.c | 90 +++-
sys/dev/drm/linux_reservation.c | 9 +-
sys/dev/drm/linux_shmem.c | 62 +++
sys/dev/drm/linux_vmalloc.c | 4 +-
sys/dev/drm/scheduler/gpu_scheduler.c | 34 +-
sys/dev/drm/scheduler/gpu_scheduler_trace.h | 93 ++--
sys/dev/drm/scheduler/sched_fence.c | 4 +-
199 files changed, 3041 insertions(+), 1215 deletions(-)
create mode 100644 sys/dev/drm/drm_gem_framebuffer_helper.c
create mode 100644 sys/dev/drm/include/drm/drm_gem_framebuffer_helper.h
create mode 100644 sys/dev/drm/linux_fence-array.c
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/789731325bde747251c28a37e0a00ed4efb88c46
--
DragonFly BSD source repository
More information about the Commits
mailing list