aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2015-09-02drm/amdgpu: use PT for VM sync on unmapChristian König1-13/+6
Instead of the array which is used for ID management. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-09-02drm/amdgpu: make wait_event uninterruptible in push_jobChunming Zhou1-4/+3
with interruptible, the push_job maybe return -ERESTARTSYS, then result in push_job error. E.g. bug trace: [ 181.618860] *****amdgpu_copy_buffer:fence->seq:0x0000000048d8758b, contxt:1207959552, ref:683967304, r:-512 [ 181.618929] BUG: unable to handle kernel paging request at ffffffff811aa266 [ 181.625887] IP: [<ffffffff81548ffc>] reservation_object_add_excl_fence+0x3c/0x120 ... [ 181.859767] [<ffffffff811aa266>] ? unmap_mapping_range+0x66/0x110 [ 181.865928] [<ffffffffc0608ac1>] ttm_bo_move_accel_cleanup+0x41/0x3c0 [ttm] [ 181.872971] [<ffffffffc062d382>] amdgpu_move_blit.isra.18+0x122/0x150 [amdgpu] [ 181.880254] [<ffffffff811aa266>] ? unmap_mapping_range+0x66/0x110 [ 181.886420] [<ffffffffc062d709>] amdgpu_bo_move+0xa9/0x200 [amdgpu] [ 181.892753] [<ffffffffc0606e8d>] ttm_bo_handle_move_mem+0x26d/0x5c0 [ttm] Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-09-02drm/amdgpu: fix amdgpu_bo_unreserve order in GEM_OP IOCTL v2Christian König1-1/+4
No copy_(to|from)_user while BO is reserved. v2: handle default path as well Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-09-02drm/amdgpu: partially revert "modify amdgpu_fence_wait_any() to ↵Christian König3-43/+16
amdgpu_fence_wait_multiple()" v2 That isn't used any more. v2: rebase Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: re-work sync_resvChunming Zhou1-6/+18
sync_resv is to handle both amdgpu_fence and sched_fence. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-09-02drm/amdgpu/atom: Send out the full AUX addressAlex Deucher1-1/+2
AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits. Port of: drm/radeon/atom: Send out the full AUX address to amdgpu Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2015-08-30amdkfd: use <linux/mman.h> instead of <uapi/asm-generic/mman-common.h>Christoph Hellwig2-2/+2
The latter is a default version of <asm/mman.h> and not for driver use. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-08-28drm/amdgpu: use IB for fill_buffer instead of direct commandChunming Zhou4-20/+20
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-28drm/amdgpu: stop trying to suspend UVD sessions v2Christian König2-24/+19
Saving the current UVD state on suspend and restoring it on resume just doesn't work reliable. Just close cleanup all sessions on suspend. Ported from radeon commit "12e49feadff6d7b7ebbe852b36943a71524d8d34". v2: rebased Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1)
2015-08-28drm/amdgpu: add scheduler dependency callback v2Christian König5-0/+55
This way the scheduler doesn't wait in it's work thread any more. v2: fix race conditions Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-28drm/amdgpu: let the scheduler work more with jobs v2Christian König1-24/+37
v2: fix another race condition Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-26drm/amdgpu: fix wait queue handling in the schedulerChristian König2-10/+10
Freeing up a queue after signalling it isn't race free. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-26drm/amdgpu: remove extra parameters from scheduler callbacksChristian König3-14/+8
Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-26drm/amdgpu: wake up scheduler only when neccessaryChristian König1-1/+12
Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-26drm/amdgpu: remove entity idle timeout v2Christian König2-17/+7
Removing the entity from scheduling can deadlock the whole system. Wait forever till the remaining IBs are scheduled. v2: fix comment as well Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> (v1)
2015-08-26drm/amdgpu: fix postclose orderChristian König1-2/+2
The context needs to finish before everything else. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-26drm/amdgpu: use IB for copy buffer of evictionChunming Zhou8-79/+81
This aids handling buffers moves with the scheduler. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-26drm/amdgpu: adjust the judgement of removing fence callbackJunwei Zhang1-1/+1
The fence in the array may be skipped if wait_all is false, thus the related callback is not initialized with list head. So removing this kind callback will cause NULL pointer reference. Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-25drm/amdgpu: fix no sync_wait in copy_bufferChunming Zhou1-1/+7
when eviction is happening, if don't handle dependency, then the fence could be dead off. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-25drm/amdgpu: fix last_vm_update fence is not effetive for sched fenceChunming Zhou4-18/+58
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-25drm/amdgpu: add priv data to schedChunming Zhou3-3/+7
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-25drm/amdgpu: add owner for sched fenceChunming Zhou6-8/+10
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-25drm/amdgpu: remove entity reference from sched fenceChristian König4-14/+8
Entity don't live as long as scheduler fences. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: fix and cleanup amd_sched_entity_push_jobChristian König4-38/+48
Calling schedule() is probably the worse things we can do. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: remove amdgpu_bo_list_cloneChristian König2-35/+0
Not used any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: remove the context from amdgpu_jobChristian König3-12/+1
Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: remove unused parameters to amd_sched_createChristian König3-27/+11
Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: remove sched_lockChristian König2-4/+0
It isn't protecting anything. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: remove prepare_job callbackChristian König2-9/+2
Not used any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: cleanup a scheduler function nameChristian König1-3/+3
Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: reorder scheduler functionsChristian König1-28/+28
Keep run queue, entity and scheduler handling together. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: fix scheduler thread creation error checkingChristian König1-7/+6
Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: fix entity wakeup race conditionChristian König2-23/+21
That actually didn't worked at all. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: cleanup entity pickingChristian König1-6/+10
Cleanup function name, stop checking scheduler ready twice, but check if kernel thread should stop instead. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: remove some more unused entity members v2Christian König2-11/+3
None of them are used any more. v2: fix type in error message Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: fix user fences when scheduler is enabledChristian König1-0/+2
Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-25drm/amdgpu: fix fence wait in sync_fence, instead should be in sync_ringsChristian König3-3/+61
Signed-off-by: Christian König <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-25drm/amdgpu: rework scheduler submission handling.Christian König2-37/+11
Remove active_hw_rq and it's protecting queue_lock, they are unused. User 32bit atomic for hw_rq_count, 64bits for counting to three is a bit overkill. Cleanup the function name and remove incorrect comments. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-25drm/amdgpu: remove v_seq handling from the scheduler v2Christian König9-57/+21
Simply not used any more. Only keep 32bit atomic for fence sequence numbering. v2: trivial rebase Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Jammy Zhou <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> (v1)
2015-08-25drm/amdgpu: improve sa_bo->fence by kernel fenceChunming Zhou8-34/+58
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-25drm/amdgpu: modify amdgpu_fence_wait_any() to amdgpu_fence_wait_multiple()Junwei Zhang3-22/+69
Rename the function and update the related code with this modified function. Add the new parameter of bool wait_all. If wait_all is true, it will return when all fences are signaled or timeout. If wait_all is false, it will return when any fence is signaled or timeout. Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Monk Liu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-25drm/amdgpu: fix IH ring allocation for bus addresses (v2)Alex Deucher1-13/+7
Use pci_alloc_consistent rather than kzalloc since we need 256 byte aligned memory for the ring buffer. v2: fix copy paste typo in free function noticed by Jammy. bug: https://bugs.freedesktop.org/show_bug.cgi?id=91749 Reviewed-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2015-08-21drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcdAlex Deucher1-0/+5
This is a port of: DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd to amdgpu. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2015-08-20drm/amdgpu: fix CS error handling v2Christian König1-41/+26
Stop double freeing the the BO list by pulling the content of amdgpu_cs_parser_prepare_job() into the IOCTL function again. v2: better commit message Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> (v1) Reviewed-by: Alex Deucher <[email protected]>
2015-08-20drm/amdgpu: fix zeroing all IB fields manually v2Christian König7-18/+6
The problem now is that we don't necessarily call amdgpu_ib_get() in some error paths and so work with uninitialized data. Better require that the memory is already zeroed. v2: better commit message Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> (v1) Reviewed-by: Alex Deucher <[email protected]>
2015-08-20drm/amdgpu: free the job immediately after dispatching itChristian König1-4/+3
Fixes a whole bunch of lockdep warnings. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-20drm/amdgpu: use a spinlock instead of a mutex for the rqChristian König2-33/+18
More appropriate and fixes some nasty lockdep warnings. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-20drm/amdgpu: don't need to use bo_list_clone any moreChunming Zhou1-21/+4
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-20drm/amdgpu: some clean up for cs_ioctlChunming Zhou2-36/+1
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
2015-08-20drm/amdgpu: prepare job should be common code pathChunming Zhou1-6/+4
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>