aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2017-09-01drm/amd/amdgpu: Simplify gmc_v9_0_vm_fault_interrupt_state()Tom St Denis1-34/+17
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-01drm/amd/amdgpu: Support full range of GFX ring namesTom St Denis1-1/+4
Right now there's only one but the rest of the code is being setup to support more so might as well fix this up too. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-01drm/amdgpu: fix placement flags in amdgpu_ttm_bindChristian König1-1/+1
Otherwise we lose the NO_EVICT flag and can try to evict pinned BOs. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-01drm/amdgpu: fix moved list handling in the VMChristian König1-3/+6
Only move BOs to the moved/relocated list when they aren't already on a list. This prevents accidential removal from the evicted list. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-01drm/amdgpu: declare the new firmware files needed by polaris asicsEvan Quan1-0/+15
Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Flora Cui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-01drm/amdgpu: handle all fragment sizes v4Roger He1-29/+26
This can improve performance for some cases. v2 (chk): handle all sizes, simplify the patch quite a bit v3 (chk): adjust dw estimation as well v4 (chk): use single loop, make end mask 64bit Signed-off-by: Roger He <[email protected]> Signed-off-by: Christian König <[email protected]> Tested-by: Roger He <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: update to new mmu_notifier semanticJérôme Glisse1-31/+0
Calls to mmu_notifier_invalidate_page() were replaced by calls to mmu_notifier_invalidate_range() and are now bracketed by calls to mmu_notifier_invalidate_range_start()/end() Remove now useless invalidate_page callback. Signed-off-by: Jérôme Glisse <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected] Cc: Felix Kuehling <[email protected]> Cc: Christian König <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andrea Arcangeli <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2017-08-31drm/amd/amdgpu: Simplify gfx_v9_0_wait_for_idle()Tom St Denis1-6/+1
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Fix indentation in gfx_v9_0_mqd_init()Tom St Denis1-2/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_rlc_stop()Tom St Denis1-6/+1
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_dynamic_mg_power_gating()Tom St Denis1-4/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_static_mg_power_gating()Tom St Denis1-4/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_pipeline_powergating()Tom St Denis1-4/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_cg_power_gating()Tom St Denis1-4/+3
Make it consistent in style with the other CG/PG enable functions... Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_cp_power_gating()Tom St Denis1-10/+5
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_sck_slow_down_on_power_down()Tom St Denis1-10/+5
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_sck_slow_down_on_power_up()Tom St Denis1-10/+5
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_enable_save_restore_machine()Tom St Denis1-5/+1
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up gfx_v9_0_ngg_en()Tom St Denis1-17/+9
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amd/amdgpu: Tidy up register list formatting.Tom St Denis1-32/+64
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: bump version for support of local BOsChristian König1-1/+2
Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: add IOCTL interface for per VM BOs v3Christian König4-22/+53
Add the IOCTL interface so that applications can allocate per VM BOs. Still WIP since not all corner cases are tested yet, but this reduces average CS overhead for 10K BOs from 21ms down to 48us. v2: add some extra checks, remove the WIP tag v3: rename new flag to AMDGPU_GEM_CREATE_VM_ALWAYS_VALID Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: add support for per VM BOs v2Christian König3-26/+60
Per VM BOs are handled like VM PDs and PTs. They are always valid and don't need to be specified in the BO lists. v2: validate PDs/PTs first Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: restrict userptr even moreChristian König1-0/+6
Don't allow them to be GEM imported into another process. Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Acked-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: fix new PD update code for Vega10 v2Christian König1-2/+2
We need to refer to the parent instead of the root BO for multi level page tables on Vega10. Also don't set the PDE_PTE bit. v2: Don't set the PDE_PTE bit either. Signed-off-by: Christian König <[email protected]> Reviewed-and-Tested-by: Roger He <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: move hw generation check into amdgpu_doorbell_init v2Christian König1-5/+12
This way we can safely call it on SI as well. v2: fix type in commit message Signed-off-by: Christian König <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: cleanup the VM code a bit moreChristian König1-15/+5
The src isn't used any more after GART hack removal. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-31drm/amdgpu: rework page directory filling v2Christian König2-29/+63
Keep track off relocated PDs/PTs instead of walking and checking all PDs. v2: fix root PD handling Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amd: Remove null check before kfreeHimanshu Jha1-4/+2
Kfree on NULL pointer is a no-op and therefore checking is redundant. Reviewed-by: Christian König <[email protected]> Signed-off-by: Himanshu Jha <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: track evicted page tables v2Christian König5-141/+119
Instead of validating all page tables when one was evicted, track which one needs a validation. v2: simplify amdgpu_vm_ready as well Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: fix comment on amdgpu_bo_vaChristian König1-1/+3
Except for the reference count all other members are protected by the VM PD being reserved. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: add bo_va cleared flag again v2Christian König3-25/+16
We changed this to use an extra list a while back, but for the next series I need a separate flag again. v2: reorder to avoid unlocked list access Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: rework moved handling in the VM v2Christian König2-3/+13
Instead of using the vm_state use a separate flag to note that the BO was moved. v2: reorder patches to avoid temporary lockless access Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amd/amdgpu: Add write() method to VRAM debugfs entry (v2)Tom St Denis1-1/+41
Allows writing data to vram via debugfs. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> (v2): Call get_user before holding spinlock. Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu/gfx9: adjust mqd allocation sizeAlex Deucher1-7/+18
To allocate additional space for the dynamic cu masks. Confirmed with the hw team that we only need 1 dword for the mask. The mask is the same for each SE so you only need 1 dword. Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu/gfx8: apply dynamic cu mask to APUs as wellAlex Deucher1-6/+4
Confirmed with the hw team. It's the same for all asics. Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: cleanup GWS, GDS and OA allocationChristian König1-8/+7
Those are certainly not kernel allocations, instead set the NO_CPU_ACCESS flag. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: fix and cleanup VM ready checkChristian König3-31/+35
Stop checking the mapped BO itself, cause that one is certainly not a page table. Additional to that move the code into amdgpu_vm.c Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: fix amdgpu_vm_bo_map trace pointChristian König1-0/+2
That somehow got lost. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: Move VBIOS version to sysfsKent Russell1-31/+23
sysfs is more stable, and doesn't require root to access Signed-off-by: Kent Russell <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: Add debugfs file for VBIOS and versionKent Russell3-1/+67
Add 2 debugfs files, one that contains the VBIOS version, and one that contains the VBIOS itself. These won't change after initialization, so we can add the VBIOS version when we parse the atombios information. This ensures that we can find out the VBIOS version, even when the dmesg buffer fills up, and makes it easier to associate which VBIOS version is for which GPU on mGPU configurations. Set the size to 20 characters in case of some weird VBIOS version that exceeds the expected 17 character format (3-8-3\0). The VBIOS dump also allows for easy debugging v2: Move to debugfs, clarify commit message, add VBIOS dump file Signed-off-by: Kent Russell <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amd/amdgpu: Use new TTM populate/map helper functionTom St Denis1-31/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amd/amdgpu: Remove AMDGPU tracepoint and use new TTM tracepoint (v2)Tom St Denis2-74/+3
Switches the AMDGPU driver over to the TTM tracepoint and removes our old one. Now you can enable traces before loading the module and trace all mappings. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (v2): Use struct device instead of pci in trace.
2017-08-29drm/amdgpu: support polaris10/11/12 new cp firmwaresEvan Quan1-10/+55
Newer versions of the CP firmware require changes in how the driver initializes the hw block. Change the firmware name for new firmware to maintain compatibility with older kernels. Acked-by: Christian König <[email protected]> Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: remove duplicate return statementColin Ian King1-1/+0
Remove a redundant identical return statement, it has no use. Detected by CoverityScan, CID#1454586 ("Structurally dead code") Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: check memory allocation failureChristophe JAILLET1-0/+3
Check memory allocation failure and return -ENOMEM in such a case. 'num_post_dep_syncobjs' still has to be set to 0 before the test in order to have it initialized if 'amdgpu_cs_parser_fini()' is called to free resources. The calling graph would be, in such a case! failure in amdgpu_cs_process_syncobj_out_dep() ---> error code returned by amdgpu_cs_dependencies() --> amdgpu_cs_parser_fini() is called Reviewed-by: Christian König <[email protected]> Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amd/amdgpu: fix BANK_SELECT on Vega10 (v2)Roger He2-6/+4
BANK_SELECT should always be FRAGMENT_SIZE + 3 due to 8-entry (2^3) per cache line in L2 TLB for Vega10. v2: agd: fix warning Reviewed-by: Christian König <[email protected]> Signed-off-by: Roger He <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: inline amdgpu_ttm_do_bind againChristian König1-27/+18
The function is called only once and doesn't do anything special. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Roger He <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: fix amdgpu_ttm_bindChristian König3-19/+30
Use ttm_bo_mem_space instead of manually allocating GART space. This allows us to evict BOs when there isn't enought GART space any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-08-29drm/amdgpu: remove the GART copy hackChristian König1-17/+5
This isn't used since we don't map evicted BOs to GART any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Roger He <[email protected]> Signed-off-by: Alex Deucher <[email protected]>