aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2016-02-19Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie56-4285/+3212
into drm-next First radeon and amdgpu pull request for 4.6. Highlights: - ACP support for APUs with i2s audio - CS ioctl optimizations - GPU scheduler optimizations - GPUVM optimizations - Initial GPU reset support (not enabled yet) - New powerplay sysfs interface for manually selecting clocks - Powerplay fixes - Virtualization fixes - Removal of hw semaphore support - Lots of other misc fixes and cleanups * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: (118 commits) drm/amdgpu: Don't call interval_tree_remove in amdgpu_mn_destroy drm/amdgpu: Fix race condition in amdgpu_mn_unregister drm/amdgpu: cleanup gem init/finit drm/amdgpu: rework GEM info printing drm/amdgpu: print the GPU offset as well in gem_info drm/amdgpu: optionally print the pin count in gem_info as well drm/amdgpu: print the BO size only once in amdgpu_gem_info drm/amdgpu: print pid as integer drm/amdgpu: remove page flip work queue v3 drm/amdgpu: stop blocking for page filp fences drm/amdgpu: stop calling amdgpu_gpu_reset from the flip code drm/amdgpu: remove fence reset detection leftovers drm/amdgpu: Fix race condition in MMU notifier release drm/radeon: Fix WARN_ON if DRM_DP_AUX_CHARDEV is enabled drm/amdgpu/vi: move uvd tiling config setup into uvd code drm/amdgpu/vi: move sdma tiling config setup into sdma code drm/amdgpu/cik: move uvd tiling config setup into uvd code drm/amdgpu/cik: move sdma tiling config setup into sdma code drm/amdgpu/gfx7: rework gpu_init() drm/amdgpu/gfx: clean up harvest configuration (v2) ...
2016-02-17drm/amdgpu: Don't call interval_tree_remove in amdgpu_mn_destroyFelix Kuehling1-1/+0
rbtree_postorder_for_each_entry_safe can skip over some entries if the tree is rebalanced in interval_tree_remove. interval_tree_remove is also redundant when the tree is just about to be freed. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-02-17drm/amdgpu: Fix race condition in amdgpu_mn_unregisterFelix Kuehling1-10/+13
Exchange locking order of adev->mn_lock and mm_sem, so that rmn->mm->mmap_sem can be taken safely, protected by adev->mn_lock, when amdgpu_mn_destroy runs concurrently. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-02-16drm/amdgpu: cleanup gem init/finitChristian König8-58/+23
Remove the double housekeeping and use something sane to forcefuly delete BOs on unload. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: rework GEM info printingChristian König2-34/+61
Print BOs grouped per client. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: print the GPU offset as well in gem_infoChristian König1-2/+3
To easily find which memory is used. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: optionally print the pin count in gem_info as wellChristian König1-1/+7
Usefull when debugging page flipping. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: print the BO size only once in amdgpu_gem_infoChristian König1-3/+2
Splitting it into KB/MB is just confusing. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: print pid as integerChristian König1-2/+2
Not sure why somebody thought that this is a long. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: remove page flip work queue v3Christian König5-13/+4
Just use the system queue now that we don't block any more. v2: handle DAL as well. v3: agd: split DAL changes out Signed-off-by: Christian König <[email protected]> Reviewed-by: Mykola Lysenko <[email protected]> Acked-by: Alex Deucher <[email protected]> (v1)
2016-02-16drm/amdgpu: stop blocking for page filp fencesChristian König2-16/+28
Just register an callback and reschedule the work item if necessary. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: stop calling amdgpu_gpu_reset from the flip codeChristian König1-9/+1
We don't return -EDEADLK any more. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: remove fence reset detection leftoversChristian König1-10/+4
wait_event() never returns before the fence was signaled. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
2016-02-16drm/amdgpu: Fix race condition in MMU notifier releaseFelix Kuehling1-1/+1
The release notifier can get called a second time from mmu_notifier_unregister depending on a race between __mmu_notifier_release and amdgpu_mn_destroy. Use mmu_notifier_unregister_no_release to avoid this. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]>
2016-02-16drm/amdgpu: use post-decrement in error handlingRasmus Villemoes1-1/+1
We need to use post-decrement to get the pci_map_page undone also for i==0, and to avoid some very unpleasant behaviour if pci_map_page failed already at i==0. Reviewed-by: Christian König <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-16drm/amdgpu: removed optional dummy encoder mode_fixup function.Carlos Palminha3-24/+0
mode_fixup function for encoder drivers became optional with patch http://patchwork.freedesktop.org/patch/msgid/[email protected] This patch set nukes all the dummy mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/8c4710ee930d2ab3a505b8d3cd724f4f4c79b3df.1455540137.git.palminha@synopsys.com
2016-02-16mm/gup: Switch all callers of get_user_pages() to not pass tsk/mmDave Hansen1-2/+1
We will soon modify the vanilla get_user_pages() so it can no longer be used on mm/tasks other than 'current/current->mm', which is by far the most common way it is called. For now, we allow the old-style calls, but warn when they are used. (implemented in previous patch) This patch switches all callers of: get_user_pages() get_user_pages_unlocked() get_user_pages_locked() to stop passing tsk/mm so they will no longer see the warnings. Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Srikar Dronamraju <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-02-12drm/amdgpu/vi: move uvd tiling config setup into uvd codeAlex Deucher3-12/+20
Split uvd and gfx programming. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/vi: move sdma tiling config setup into sdma codeAlex Deucher3-8/+10
Split sdma and gfx programming. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/cik: move uvd tiling config setup into uvd codeAlex Deucher2-11/+11
Split uvd and gfx programming. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/cik: move sdma tiling config setup into sdma codeAlex Deucher2-6/+5
Split sdma and gfx programming. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/gfx7: rework gpu_init()Alex Deucher1-176/+182
Split the sw and hw parts into separate functions. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/gfx: clean up harvest configuration (v2)Alex Deucher4-180/+82
Read back harvest configuration from registers and simplify calculations. No need to program the raster config registers. These are programmed as golden registers and the user mode drivers program them as well. v2: rebase on Tom's patches Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: fix coding style in amdgpu_ctx.cChristian König1-16/+15
Don't use pointer arithmetic and fix the indentation. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: nuke the kernel contextChristian König4-29/+7
Not used any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: use separate scheduler entity for VCE submissionsChristian König2-1/+16
This allows us to remove the kernel context and use a better priority for the submissions. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: use separate scheduler entity for UVD submissionsChristian König2-1/+15
This allows us to remove the kernel context and use a better priority for the submissions. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: use separate scheduler entitiy for buffer movesChristian König2-1/+20
This allows us to remove the global kernel context. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: use SDMA round robin for VM updates v3Christian König6-11/+43
Distribute the load on both rings. v2: use a loop for the initialization v3: agd: rebase on upstream Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: remove is_pte_ringChristian König4-4/+0
Not used for anything. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: use per VM entity for page table updates (v2)Christian König6-22/+51
Updates from different VMs can be processed independently. v2: agd: rebase on upstream Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu: remove the userptr rmn->lockChristian König1-20/+12
Avoid a lock inversion problem by just using the mmap_sem to protect the entries of the intervall tree. Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]>
2016-02-12drm/amdgpu/gfx7: Fix whitespaceTom St Denis1-1/+1
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/gfx7: Simplify wptr/rptr functionsTom St Denis1-19/+4
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/gfx7: LOC reduction in gfx_v7_0_setup_rbTom St Denis1-7/+2
Reduce for loop with bitmask to simple complement and mask Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/gfx7: Simplify bitmask creationTom St Denis1-7/+1
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-12drm/amdgpu/gfx7: Reduce linecount in table initTom St Denis1-820/+525
Replaces switch statements with direct assignments to reduce line count significantly. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: Move MMIO flip out of spinlocked regionVitaly Prosyak1-3/+3
Prior actual MMIO flip we need to acquire DAL mutex to guard our target state which get modified on reset mode. Assign page flip status before actual flip to handle the possible race condition with interrupt. Signed-off-by: Vitaly Prosyak <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: Don't crash system if we can't get crtcHarry Wentland1-0/+6
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: move sync into job objectChristian König13-38/+46
No need to keep that for every IB. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: send VCE IB tests directly to the ring againChristian König2-8/+22
We need the IB test for GPU resets as well and the scheduler should be stoped then. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: send UVD IB tests directly to the ring againChristian König5-15/+25
We need the IB test for GPU resets as well and the scheduler should be stoped then. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: rename amdgpu_sched.c to amdgpu_job.cChristian König2-5/+5
That's probably a better matching name. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: cleanup in kernel job submissionChristian König7-204/+111
Add a job_alloc_with_ib helper and proper job submission. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: send SDMA/GFX IB tests directly to the ring againChristian König5-18/+6
There is no point in sending them through the scheduler. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: directly return fence from ib_scheduleChristian König3-8/+12
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: move ring from IBs into jobChristian König14-44/+45
We can't submit to multiple rings at the same time anyway. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: make pad_ib a ring function v3Christian König14-18/+41
The padding depends on the firmware version and we need that for BO moves as well, not only for VM updates. v2: new approach of making pad_ib a ring function v3: fix typo in macro name Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: cleanup user fence handling in the CSChristian König2-17/+13
Don't keep that around twice. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: add proper job alloc/free functionsChristian König6-55/+69
And use them in the CS instead of allocating IBs and jobs separately. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>