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@wolfpond.org> Co-authored-by: Matthew Dillon <dillon@apollo.backplane.com>
drm: Update to Linux 4.15.18 * Create /dev/dri/renderD* devices Generally handle /dev entries creation as close to Linux as possible. * Add drm master support Sync authentification code with Linux 4.15.18 * handle vm_mm->mmap_sem in ttm page fault operations * Update dma-fence code from OpenBSD * This commit contains sleep/wakeup and other changes from Matthew Dillon <dillon@apollo.backplane.com>
drm: Update to Linux 4.12.14 * Initial Geminilake support * Support improvements and model-specific bug fixes for Broxton, Haswell, Broadwell, Skylake and Kabylake hardware * Various generic i915 bug fixes, including page flipping and memory corruption issues * Minor radeon bug fixes
drm: Replace all Linux spinlocks by lockmgr locks * The DragonFly kernel can sleep in different circumstances than Linux * Linux driver code has not been written to prevent it * Make all Linux spinlock_t spinlocks lockmgr locks and avoid potential problems once and for all
drm: Stop using an embedded struct drm_device in driver softcs * All drm drivers use a struct drm_device record but are free to allocate it by themselves in different ways or let the generic drm subsystem code do it. * This drm_device record can even be part of another data structure, dynamically or statically allocated. * We cannot just assume the length of a drm_device structure in the softc memory block will be enough to store all driver private data. * Make the drm softc the equivalent of a void* pointer and let the upstream code behave as expected on Linux
drm: Update generic, ttm and radeon code to Linux 4.9 * Generally cleanup non driver-specific code and increase its robustness * DisplayPort support improvements * Atomic modesetting improvements * Radeon performance and stability improvements * drm/i915 stays based on Linux 4.7.10 with Linux 4.19 changes for now Reviewed-by: Romick
drm - Refactor task_struct and implement mm_struct * Change td->td_linux_task from an embedded structure to a pointer. * Add p->p_linux_mm to support tracking mm_struct's. * Change the 'current' macro to test td->td_linux_task and call a support function, linux_task_alloc(), if it is NULL. * Implement callbacks from the main kernel for thread exit and process exit to support functions that drop the td_linux_task and p_linux_mm pointers. Initialize and clear these callbacks in the module load/unload in drm_drv.c * Implement required support functions in linux_sched.c
drm/ttm: convert to unified vma offset manager * Add TTM_BO_PRIV_FLAG_ACTIVE. * Changes so we can use more of the linux ttm_bo_vm.c code. Fake struct vm_fault, fake struct vm_operations_struct, and adjust struct vm_area_struct. Also add related flags. The VM interface to DragonFlyBSD is now (mostly) a wrapper around the linux code. * The linux red/black tree code uses some of the DFly RB macros. This means that struct rb_root must be compatible. Add missing fields. This fixes RB_REMOVE breakage due to it trying to iterate rbh_inprog. * Add set_need_resched() (empty) * radeon_bo_is_reserved() is no longer applicable and has been removed, allowing us to avoid implementintg ttm_bo_is_reserved(). Note that linux-current does not have these functions. * Refactor radeon_do_test_moves() so reflect the linux code a bit better. This fixes a few error paths. * radeon_verify_access() remains empty. We need the struct file (which we don't have) to implement it. * Make some adjustments to ttm_mem_type_from_pace() and other API functions which use struct ttm_place instead of uint32_t. This better reflects the linux code and fixes compile-time breakage due to the partial API patch. Make other struct ttm_place adjustments. * bdev->dev_mapping is broken (partial API update in WIP) and is still always NULL because ttm_bo_device_init() does not yet initialize it (needs an argument passed from the chipset code). * refactor ttm_bo_man_get_node() to fix compile issues. * Completely rewrite the DragonFly API interfacing code in ttm_bo_vm.c. Hopefully the fault code is now far, far more robust than it was before. Add debug code to check for duplicate vm_page insertions, in case we hit that panic again (it had problems due to bdev->dev_mapping being NULL before that issue was tracked down).
drm/i915: Update to Linux 4.7.10 * Various bugfixes, including GPU-specific ones on Ironlake and more recent hardware. Runtime power management and atomic modesetting have been specially improved. * Fix Hardware hangs on Ironlake, Sandybridge, Ivybridge, Skylake and Kabylake GPUs * Fix various display flickering issues, including PSR, Broadwell and Display-port specific ones * Kabylake support is no longer considered experimental * Color management has been added for Broadwell, Skylake, Kabylake as well as Cherryview and Broxton GPUs. The intent is to obtain more accurate color representation on various types of panel.