aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-16drm/amdgpu: cleanup amdgpu_fence_wait_empty v2Christian König1-54/+15
Just wait for last fence instead of waiting for the sequence manually. v2: don't use amdgpu_sched_jobs for the mask Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-16drm/amdgpu: keep all fences in an RCU protected array v2Christian König2-3/+31
Just keep all HW fences in a RCU protected array as a first step to replace the wait queue. v2: update commit message, move fixes into separate patch. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-16drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ringChristian König3-4/+12
Make this a parameter instead of using the global variable directly. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-16drm/amdgpu: RCU protected amd_sched_fence_releaseChristian König1-1/+22
Fences must be freed RCU protected, otherwise the reservation_object_*_rcu() functions can run into problems. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-03-16drm/amdgpu: RCU protected amdgpu_fence_releaseChristian König1-1/+22
Fences must be freed RCU protected, otherwise the reservation_object_*_rcu() functions can run into problems. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2016-03-16drm/amdgpu: merge amdgpu_fence_process and _activityChristian König1-19/+5
No need to keep the two separate any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-16drm/amdgpu: cleanup amdgpu_fence_activityChristian König1-32/+3
The comment about the loop counter was never valid, even when you have multiple threads this loop only runs as long as the sequence increases. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-14drm/amdgpu: move fence structure into amdgpu_fence.cChristian König2-26/+25
No need to have that in the header file any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amdgpu: remove amdgpu_fence_wait_nextChristian König2-21/+0
Not used any more. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amdgpu: remove amdgpu_ring_from_fenceChristian König2-25/+0
Not used any more. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amdgpu: stop using the ring index in the SAChristian König2-36/+22
The ring index will always collide as hash into the fence list, so use the context number instead. That can still cause collisions, but they are less likely than using ring indices. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amdgpu: stop waiting on UVD messages before mapping themChristian König1-7/+0
amdgpu_bo_kmap() now always waits for moves to finish. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amdgpu: always wait before kmap a BOChristian König1-5/+11
When a BO is currently moving we otherwise would blindly access the new location without checking. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/radeon: refactor SI tiling table initializationJosh Poimboeuf1-486/+439
Simplify the control flow of si_tiling_mode_table_init() similar to how it was done in gfx_v7_0.c and gfx_v8_0.c. Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/radeon: refactor CIK tiling table initializationJosh Poimboeuf1-1025/+666
Simplify the control flow of cik_tiling_mode_table_init() similar to how it was done in gfx_v7_0.c and gfx_v8_0.c. Acked-by: Christian König <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amdgpu: allow write access to mapped userptrsChristian König1-5/+3
With the updated MMU notifier we should also be able to handle the writeback case correctly. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amd/powerplay: use pp_endian.h for TongaAlex Deucher1-11/+1
Drop local versions of these macros. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amd/powerplay: use pp_endian.h for FijiAlex Deucher1-11/+1
Drop local versions of these macros. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amd/powerplay: add a common pp endian headerAlex Deucher1-0/+38
To replace the duplicated versions of this in all asic variants. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/amd/powerplay: mv avfs status to smumgr.hrezhu2-18/+21
Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-14drm/radeon: rework fbdev handling on chips with no connectorsAlex Deucher2-8/+17
Move all the logic to radeon_fb.c and add checks to functions called frome elsewhere. bug: https://bugzilla.kernel.org/show_bug.cgi?id=112781 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-10drm/amdgpu: split pipeline sync out of SDMA vm_flush() as wellChristian König3-20/+53
Code it similar to how we did it for the gfx and compute engines. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Revert "add mutex for ba_va->valids/invalids"Christian König2-12/+6
Not needed any more because we need to protect the elements on the list anyway. This reverts commit 38bf516c75b4ef0f5c716e05fa9baab7c52d6c39. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Revert "add lock for interval tree in vm"Christian König2-15/+2
Not needed any more because we need to protect the elements on the list anyway. This reverts commit fe237ed7efec8ac147a4572fdf81173a7f8ddda7. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Revert "add spin lock to protect freed list in vm (v3)"Christian König1-13/+3
Not needed any more because we need to protect the elements on the list anyway. This reverts commit dae6ecf9e6c9b677e577826c3ac665c6dd9c490b. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: reserve the PD during unmap and removeChristian König1-10/+24
We not only need to protect the mapping tree and freed list itself, but also the items on those list. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Fix two bugs in amdgpu_vm_bo_split_mappingFelix Kuehling1-2/+2
Off-by-one: last is inclusive, so the maximum is start + max_size - 1 Wrong unit: addr is in bytes, max_size is in pages Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards.Mario Kleiner1-2/+4
As observed on Apple iMac10,1, DCE-3.2, RV-730, link rate of 2.7 Ghz is not selected, because the args.v1.ucConfig flag setting for 2.7 Ghz gets overwritten by a following assignment of the transmitter to use. Move link rate setup a few lines down to fix this. In practice this didn't have any positive or negative effect on display setup on the tested iMac10,1 so i don't know if backporting to stable makes sense or not. Signed-off-by: Mario Kleiner <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-09MAINTAINERS: update radeon entry to include amdgpu as wellAlex Deucher1-1/+3
Both are maintained by same team. Reviewed-by: Christian König <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: disable runtime pm on PX laptops without dGPU power controlAlex Deucher2-5/+11
Some PX laptops don't provide an ACPI method to control dGPU power. On those systems, the driver is responsible for handling the dGPU power state. Disable runtime PM on them until support for this is implemented. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-09drm/radeon: disable runtime pm on PX laptops without dGPU power controlAlex Deucher2-5/+11
Some PX laptops don't provide an ACPI method to control dGPU power. On those systems, the driver is responsible for handling the dGPU power state. Disable runtime PM on them until support for this is implemented. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-08drm/amd/amdgpu: Fix indentation in do_set_base() (DCEv8)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]>
2016-03-08drm/amd/amdgpu: make afmt_init cleanup if alloc fails (DCEv8)Tom St Denis1-2/+12
If the allocation fails free memory and return error code. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Move config init flag to bottom of sw_init (DCEv8)Tom St Denis1-3/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Don't proceed into audio_fini if audio is disabled (DCEv8)Tom St Denis1-0/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Fix identation in do_set_base() (DCEv10)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]>
2016-03-08drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10)Tom St Denis1-2/+12
Make the function free memory and return an error code if the allocation fails. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Move initialized flag to bottom of sw_init (DCEv10)Tom St Denis1-3/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Don't proceed in audio_fini if disabled (DCEv10)Tom St Denis1-0/+3
If audio is disabled we shouldn't proceed into the fini function. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Fix indentation in dce_v11_0_crtc_do_set_base()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]>
2016-03-08drm/amd/amdgpu: Make afmt_init() cleanup if alloc fails (DCEv11)Tom St Denis1-2/+12
Updated DCEv11 afmt_init to cleanup if any kzalloc fails and then return an error code. Don't continue initializing the audio stack in that case. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Move init flag to after init in sw_init() (DCEv11)Tom St Denis1-3/+3
Don't set config_init to true until all config statements pass. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Whitespace typo fix in sw_init (DCEv11)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]>
2016-03-08drm/amd/amdgpu: Don't proceed in audio_fini in DCEv11 if disabledTom St Denis1-0/+3
If amdgpu_audio is disabled then the audio structure is not initialized so we shouldn't read it in the fini function. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6Christian König6-24/+174
That avoids lock inversion between the BO reservation lock and the anon_vma lock. v2: * Changed amdgpu_bo_list_entry.user_pages to an array of pointers * Lock mmap_sem only for get_user_pages * Added invalidation of unbound userpointer BOs * Fixed memory leak and page reference leak v3 (chk): * Revert locking mmap_sem only for_get user_pages * Revert adding invalidation of unbound userpointer BOs * Sanitize and fix error handling v4 (chk): * Init userpages pointer everywhere. * Fix error handling when get_user_pages() fails. * Add invalidation of unbound userpointer BOs again. v5 (chk): * Add maximum number of tries. v6 (chk): * Fix error handling when we run out of tries. Signed-off-by: Christian König <[email protected]> Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> (v4) Acked-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: if a GDS switch is needed emit a pipeline sync as wellChristian König1-10/+12
Otherwise we might change the GDS settings while they are still in use. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: split pipeline sync and vm flushChristian König4-9/+35
This allows us to use the pipeline sync for other tasks as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: switch the GDS only on demand v2Christian König3-2/+53
Switching the GDS space to often seems to be problematic. This patch together with the following can avoid VM faults on context switch. v2: extend commit message a bit Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> (v1)
2016-03-08drm/amdgpu: move the GDS switch into vm flush as wellChristian König3-14/+21
After all it's an operation on the VMID. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: return the common fence from amdgpu_fence_emitChristian König3-19/+19
Try to avoid using the hardware specific fences even more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>