summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-10winsys/amdgpu: add VCN JPEG to no user fence groupLeo Liu1-1/+2
There is no user fence for JPEG, the bug triggering kernel WARN_ON(flags & AMDGPU_FENCE_FLAG_64BIT) Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit ceba9ff2948d7efa57d7035c7717f046303e7c64)
2019-04-23winsys/amdgpu: clean up and remove nonsensical assertionMarek Olšák1-2/+1
The assertion considers max_dw from the current IB in the chain, but big_ib_buffer is a buffer for the next IB, which can be smaller. Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-04-23winsys/amdgpu: enable chaining for compute IBsMarek Olšák1-6/+6
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-04-23winsys/amdgpu: reorder chunks, make BO_HANDLES first, IB and FENCE lastMarek Olšák1-19/+17
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-04-23winsys/amdgpu: make IBs writable and expose their addressMarek Olšák1-1/+3
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-02-11winsys/amdgpu: cs_check_space sets the minimum IB size for future IBsMarek Olšák1-2/+16
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-02-11winsys/amdgpu: clean up IB buffer size computationMarek Olšák1-8/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-02-11winsys/amdgpu: remove occurence of INDIRECT_BUFFER_CONSTMarek Olšák1-2/+1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-02-11winsys/amdgpu: use a separate fence list for syncobjsMarek Olšák1-17/+14
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-02-11winsys/amdgpu: unify fence list codeMarek Olšák1-52/+34
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-02-11winsys/amdgpu: don't drop manually added fence dependenciesMarek Olšák1-2/+0
wow, it's hard to believe that fence and syncobjs dependencies were ignored. Cc: 18.3 19.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2019-01-30winsys/amdgpu: remove amdgpu_drm.h definitionsMarek Olšák1-8/+0
trivial
2019-01-22winsys/amdgpu: rename rfence, rsrc, rdst -> afence, asrc, adstMarek Olšák1-18/+18
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-01-22winsys/amdgpu: use the new BO list APIMarek Olšák1-49/+25
2018-11-28winsys/amdgpu: add amdgpu_winsys_bo::lockNicolai Hähnle1-5/+5
We'll use it in the upcoming mapping change. Sparse buffers have always had one. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-11-09radeonsi: stop command submission with PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET onlyMarek Olšák1-2/+4
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-10-23winsys/amdgpu: add vcn jpeg cs supportBoyuan Zhang1-0/+12
Add vcn jpeg cs support, align cs by no-op. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2018-08-03winsys/amdgpu: pass the BO list via the CS ioctl on DRM >= 3.27.0Marek Olšák1-4/+50
2018-07-16winsys/amdgpu: clean up error handling in amdgpu_cs_submit_ibMarek Olšák1-9/+8
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-07-16radeonsi: rework RADEON_PRIO flags to be <= 31Marek Olšák1-3/+3
This decreases sizeof(struct amdgpu_cs_buffer) from 24 to 16 bytes. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-07-16winsys/amdgpu: use alloca when using global_bo_listMarek Olšák1-9/+1
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-07-16winsys/amdgpu: remove label bo_list_errorMarek Olšák1-12/+16
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-07-16winsys/amdgpu: always update gfx_bo_list_counterMarek Olšák1-3/+3
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-07-16winsys/amdgpu: make amdgpu_cs_context::flags & handles localMarek Olšák1-18/+5
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-06-19amd,radeonsi: rename radeon_winsys_cs -> radeon_cmdbufMarek Olšák1-13/+13
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-16winsys/amdgpu: always set AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATEMarek Olšák1-10/+26
There is a kernel patch that adds the new flag. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Benedikt Schemmer <ben@besd.de> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2018-03-08winsys/amdgpu: pad compute IBsMarek Olšák1-1/+3
v2: pad with PKT2 NOPs on SI Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-03-08radeonsi: align command buffer starting address to fix some Raven hangsMarek Olšák1-2/+3
Cc: 17.3 18.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-02-21winsys/amdgpu:add uvd hevc enc support in amdgpu csJames Zhu1-0/+6
Support UVD HEVC encode in amdgpu cs Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
2018-01-30winsys/amdgpu: add support for syncobj signaling v3Andres Rodriguez1-1/+82
Add the ability to signal a syncobj when a cs completes execution. v2: corresponding changes for gallium fence->semaphore rename v3: s/semaphore/fence for pipe objects Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-01-26winsys/amdgpu: fix assertion failure with UVD and VCE ringsMarek Olšák1-2/+1
Cc: 18.0 <mesa-stable@lists.freedesktop.org>
2018-01-26radeonsi: Export signalled sync file instead of -1.Bas Nieuwenhuizen1-0/+22
-1 is considered an error for EGL_ANDROID_native_fence_sync, so we need to actually create a sync file. Fixes: f536f45250 "radeonsi: implement sync_file import/export" Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-06winsys/amdgpu: make IBs use read-only memoryMarek Olšák1-0/+1
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-29r300,r600,radeonsi: replace RADEON_FLUSH_* with PIPE_FLUSH_*Marek Olšák1-1/+1
and handle PIPE_FLUSH_HINT_FINISH in r300. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-17winsys/amdgpu: add vcn enc cs supportBoyuan Zhang1-1/+6
New cs support is needed for vcn encode Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-11-09winsys/amdgpu: handle cs_add_fence_dependency for deferred/unsubmitted fencesNicolai Hähnle1-8/+13
The idea is to fix the following interleaving of operations that can arise from deferred fences: Thread 1 / Context 1 Thread 2 / Context 2 -------------------- -------------------- f = deferred flush <------- application-side synchronization -------> fence_server_sync(f) ... flush() flush() We will now stall in fence_server_sync until the flush of context 1 has completed. This scenario was unlikely to occur previously, because applications seem to be doing Thread 1 / Context 1 Thread 2 / Context 2 -------------------- -------------------- f = glFenceSync() glFlush() <------- application-side synchronization -------> glWaitSync(f) ... and indeed they probably *have* to use this ordering to avoid deadlocks in the GLX model, where all GL operations conceptually go through a single connection to the X server. However, it's less clear whether applications have to do this with other WSI (i.e. EGL). Besides, even this sequence of GL commands can be translated into the Gallium-level sequence outlined above when Gallium threading and asynchronous flushes are used. So it makes sense to be more robust. As a side effect, we no longer busy-wait on submission_in_progress. We won't enable asynchronous flushes on radeon, but add a cs_add_fence_dependency stub anyway to document the potential issue. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09util: move os_time.[ch] to src/utilNicolai Hähnle1-1/+2
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09amdgpu: use simple mtxTimothy Arceri1-10/+10
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-02radeonsi: remove 'Authors:' commentsMarek Olšák1-4/+0
It's inaccurate. Instead, see the copyright and use "git log" and "git blame" to know the authorship. Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-01Revert "winsys/amdgpu: Add R600_DEBUG flag to reserve VMID per ctx."Marek Olšák1-8/+0
This reverts commit f03b7c9ad92c1656a221297819fbc6d065cc0af7. The libdrm interface is wrong.
2017-10-31winsys/amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.Andrey Grodzovsky1-0/+8
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-10-17radeonsi: add GFX-IB-size query to the HUDMarek Olšák1-0/+1
It shows the sum of all IBs per frame. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-10-17winsys/amdgpu: disable CPU caching for GFX & SDMA IBsMarek Olšák1-4/+9
This should decrease IB fetch latency. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-10-17winsys/amdgpu: don't do read-modify-write on command buffersMarek Olšák1-4/+15
i.e. don't use |= Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-10-12winsys/amdgpu: implement sync_file import/exportMarek Olšák1-5/+110
syncobj is used internally for interactions with command submission. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-09-11winsys/amdgpu: use the new raw CS APIMarek Olšák1-75/+90
This also cleans things up. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-09-11radeonsi: implement pipe_context::fence_server_syncMarek Olšák1-0/+16
This will be more useful once we have sync_file support. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-09-11winsys/amdgpu: factor out some fence dependency code into separate functionsMarek Olšák1-21/+34
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-09-11winsys/amdgpu: rename fence_dependency functionsMarek Olšák1-12/+12
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-09-11winsys/amdgpu: don't allow interprocess resource sharing for IBsMarek Olšák1-1/+2
Now we should get IB submissions with bo_list == NULL when DRI buffers aren't referenced. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>