aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2015-09-23drm/amdgpu: fix the UVD suspend sequence orderLeo Liu3-6/+6
Fixes suspend issues with UVD. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2015-09-23drm/amdgpu: make UVD handle checking more strictLeo Liu1-27/+41
Invalid messages can crash the hw otherwise Ported from radeon commit a1b403da70e038ca6c6c6fe434d1d873546873a3 Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2015-09-23drm/amdgpu: Disable UVD PGLeo Liu1-1/+2
This causes problems with multiple suspend/resume cycles. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2015-09-23drm/amdgpu: more scheduler cleanups v2Christian König11-76/+87
Embed the scheduler into the ring structure instead of allocating it. Use the ring name directly instead of the id. v2: rebased, whitespace cleanup Signed-off-by: Christian König <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Chunming Zhou<[email protected]>
2015-09-23drm/amdgpu: cleanup fence queue init v2Christian König2-2/+2
Move the fence related stuff into amdgpu_fence.c v2: rework commit message, cause this is actually not a bug Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou<[email protected]> Reviewed-by: Junwei Zhang <[email protected]>
2015-09-23drm/amdgpu: rename fence->scheduler to sched v2Christian König10-22/+22
Just to be consistent with the other members. v2: rename the ring member as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> (v1) Reviewed-by: Chunming Zhou<[email protected]>
2015-09-23drm/amdgpu: cleanup entity initChristian König3-19/+25
Reorder the fields and properly return the kfifo_alloc error code. Signed-off-by: Christian König <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Chunming Zhou<[email protected]>
2015-09-23drm/amdgpu: refine the scheduler job type conversionJunwei Zhang3-4/+6
Use container_of rather than casting. Reviewed-by: Christian König <[email protected]> Reviewed-by: David Zhou <[email protected]> Signed-off-by: Junwei Zhang <[email protected]>
2015-09-23drm/amdgpu: refine the job naming for amdgpu_job and amdgpu_sched_jobJunwei Zhang8-69/+71
Use consistent naming across functions. Reviewed-by: Christian König <[email protected]> Reviewed-by: David Zhou <[email protected]> Signed-off-by: Junwei Zhang <[email protected]>
2015-09-23drm/amdgpu: use only one reservation object for each VM v2Christian König2-30/+9
Reduces the locking and fencing overhead. v2: add comment why we need the duplicates list in the GEM op. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-09-23drm/amdgpu: validate duplicates in the CS as wellChristian König1-14/+20
This allows for multiple BOs to have the same reservation object. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-23drm/amdgpu: export reservation_object from dmabuf to ttm (v2)Christian König24-52/+70
Adds an extra argument to amdgpu_bo_create, which is only used in amdgpu_prime.c. Port of radeon commit 831b6966a60fe72d85ae3576056b4e4e0775b112. v2: fix up kfd. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-23drm/amdgpu: fix overflow on 32bit systemsChristian König1-1/+1
mem->start is a long, so this can overflow on 32bit systems. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Cc: [email protected]
2015-09-23drm/amdgpu: remove process_job callback from the schedulerChristian König3-24/+7
Just free the resources immediately after submitting the job. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-09-23drm/amdgpu: move scheduler fence callback into fence v2Christian König2-11/+12
And call the processed callback directly after submitting the job. v2: split adding error handling into separate patch. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-09-23drm/amdgpu: signal scheduler fence when hw submission fails v3Christian König1-0/+3
Otherwise the resource blocked by it will never be reclaimed. v2: add DRM_ERROR. v3: fix typo in commit message Signed-off-by: Christian König <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Chunming Zhou<[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-09-23drm/amdgpu: add tracepoint for scheduler (v2)Chunming Zhou2-1/+45
track sched job status like the length of job queue and hw job queue. v2: fix build after rebase Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-09-23drm/amdgpu: use write confirm for vm_flush()Christian König1-1/+2
Make sure the CP waits for the write to be confirmed before invalidating. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-23drm/amdgpu: execution barrier after fence v2Anatoli Antonovitch1-0/+12
Insert wait for reg mem after EOP to fix potential issue with vm context switch v2: move wait to vm_flush() use equal instead of greater than. Signed-off-by: Anatoli Antonovitch <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-23drm/amdgpu: add option to disable semaphoresChristian König3-1/+21
Provide module parameter to enable/disable them. Still enabled by default. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-05Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie22-52/+127
into drm-next A few more fixes for amdgpu from the last few days: - Fix several copy paste typos - Resume from suspend fixes for VCE - Fix the GPU scheduler warning in kfifo_out - Re-enable GPUVM fault interrupts which were inadvertently disabled - GPUVM page table hang fix when paging * 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: rename gmc_v8_0_init_compute_vmid drm/amdgpu: fix vce3 instance handling drm/amdgpu: remove ib test for the second VCE Ring drm/amdgpu: properly enable VM fault interrupts drm/amdgpu: fix warning in scheduler drm/amdgpu: fix buffer placement under memory pressure drm/amdgpu/cz: fix cz_dpm_update_low_memory_pstate logic drm/amdgpu: fix typo in dce11 watermark setup drm/amdgpu: fix typo in dce10 watermark setup drm/amdgpu: use top down allocation for non-CPU accessible vram drm/amdgpu: be explicit about cpu vram access for driver BOs (v2)
2015-09-04drm/amdgpu: rename gmc_v8_0_init_compute_vmidAlex Deucher1-3/+3
It should be gfx_v8_0_init_compute_vmid since it's part of the gfx block. Acked-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-04drm/amdgpu: fix vce3 instance handlingAlex Deucher1-6/+42
Need to properly handle the instances for the idle checks and soft reset. Acked-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-04drm/amdgpu: remove ib test for the second VCE RingLeo Liu1-0/+4
it seems the VCE ring 1 ib test not reliable, remove it for now. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-and-Reviewed-by: Sonny Jiang <[email protected]>
2015-09-04drm/amdgpu: properly enable VM fault interruptsChristian König2-15/+18
This fixes not printing VM faults. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-04drm/amdgpu: fix warning in schedulerAlex Deucher1-2/+3
This should never happen so warn when the count does not equal the expected size. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-04Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie25-153/+338
into drm-next More fixes for radeon and amdgpu for 4.3: - Send full DP aux address fixes for radeon and amdgpu - Fix an HDMI display regression for pre-DCE5 parts - UVD suspend fixes for amdgpu - Add an rs480 suspend quirk - Fix bo reserve handling in amdgpu GEM_OP ioctl - GPU scheduler fixes - SDMA optimizations - MEC fix for Fiji * 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: (21 commits) drm/amdgpu: set MEC doorbell range for Fiji drm/amdgpu: implement burst NOP for SDMA drm/amdgpu: add insert_nop ring func and default implementation drm/amdgpu: add amdgpu_get_sdma_instance helper function drm/amdgpu: add AMDGPU_MAX_SDMA_INSTANCES drm/amdgpu: add burst_nop flag for sdma drm/amdgpu: add count field for the SDMA NOP packet v2 drm/amdgpu: use PT for VM sync on unmap drm/amdgpu: make wait_event uninterruptible in push_job drm/amdgpu: fix amdgpu_bo_unreserve order in GEM_OP IOCTL v2 drm/amdgpu: partially revert "modify amdgpu_fence_wait_any() to amdgpu_fence_wait_multiple()" v2 Add radeon suspend/resume quirk for HP Compaq dc5750. drm/amdgpu: re-work sync_resv drm/amdgpu/atom: Send out the full AUX address drm/radeon/native: Send out the full AUX address drm/radeon/atom: Send out the full AUX address drm/amdgpu: use IB for fill_buffer instead of direct command drm/amdgpu: stop trying to suspend UVD sessions v2 drm/amdgpu: add scheduler dependency callback v2 drm/amdgpu: let the scheduler work more with jobs v2 ...
2015-09-03drm/amdgpu: fix buffer placement under memory pressureChristian König1-1/+1
Some buffers (UVD/VM page tables) must be placed in VRAM, but the byte restriction for moving buffers didn't took this into account. Port of radeon commit 4b09556660bfe1b43d72ca858524c6baf2c6cb1d. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-09-03drm/amdgpu/cz: fix cz_dpm_update_low_memory_pstate logicAlex Deucher1-2/+2
The logic was reversed. This feature is not enabled at the moment, but fix it now for the future. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-03drm/amdgpu: fix typo in dce11 watermark setupAlex Deucher1-1/+1
Using the wrong watermwark value for the secondary watermark. Copy paste typo. Noticed by Mykola. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2015-09-03drm/amdgpu: fix typo in dce10 watermark setupAlex Deucher1-1/+1
Using the wrong watermwark value for the secondary watermark. Copy paste typo. Noticed by Mykola. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2015-09-03drm/amdgpu: use top down allocation for non-CPU accessible vramAlex Deucher1-1/+1
Should help avoid fragmentation of vram due to CPU access requirements. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-03drm/amdgpu: be explicit about cpu vram access for driver BOs (v2)Alex Deucher12-20/+51
For kernel driver BOs, be explicit about whether we need vram access up front. This avoids unecessary migrations and avoids using visible vram for buffers were it's not needed. v2: line wrap fixes Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: set MEC doorbell range for FijiJammy Zhou1-1/+2
Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: implement burst NOP for SDMAJammy Zhou3-15/+86
Customize the insert_nop func for SDMA rings, and use burst NOP for ring/IB submissions in other places as well Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: add insert_nop ring func and default implementationJammy Zhou12-3/+36
The insert_nop function is added to amdgpu_ring_funcs structure as well as the default implementation Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: add amdgpu_get_sdma_instance helper functionJammy Zhou1-0/+15
This function is added to map the ring to sdma instance Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: add AMDGPU_MAX_SDMA_INSTANCESJammy Zhou1-1/+4
Remove the hardcoded usage Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: add burst_nop flag for sdmaJammy Zhou4-0/+7
The burst NOP is supported for SDMA when feature_version is >= 20. Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-09-02drm/amdgpu: add count field for the SDMA NOP packet v2Jammy Zhou3-0/+11
This is added to support the burst NOP v2: squash the typo fix Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
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]>