aboutsummaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_execbuf_util.h
AgeCommit message (Collapse)AuthorFilesLines
2020-09-17drm/ttm: remove superflous extern attribute from funcsChristian König1-11/+8
Extern is the default attribute for functions anyway. Signed-off-by: Christian König <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/390972/
2019-10-25drm/ttm: always keep BOs on the LRUChristian König1-1/+1
This allows blocking for BOs to become available in the memory management. Amdgpu is doing this for quite a while now during CS. Now apply the new behavior to all drivers using TTM. Signed-off-by: Christian König <[email protected]> Acked-by: Thomas Hellstrom <[email protected]> Link: https://patchwork.freedesktop.org/patch/332878/
2019-05-31drm/ttm: Make LRU removal optional v2Christian König1-1/+2
We are already doing this for DMA-buf imports and also for amdgpu VM BOs for quite a while now. If this doesn't run into any problems we are probably going to stop removing BOs from the LRU altogether. v2: drop BUG_ON from ttm_bo_add_to_lru Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Tested-by: Pierre-Eric Pelloux-Prayer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-12-07drm/ttm: allow reserving more than one shared slot v3Christian König1-2/+2
Let's support simultaneous submissions to multiple engines. v2: rename the field to num_shared and fix up all users v3: rebased Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-05-16drm/ttm: fix include notation and remove -Iinclude/drm flagMasahiro Yamada1-1/+2
For the C file, include <drm/*.h> instead of relative path from include/drm. For headers in include/drm/ttm, simplify the <tty/*.h> with "*.h". This allows us to remove the -Iinclude/drm compiler flag from drivers/gpu/drm/ttm/Makefile (and from other drivers' Makefiles). Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-25dma-buf: Rename struct fence to dma_fenceChris Wilson1-1/+1
I plan to usurp the short name of struct fence for a core kernel struct, and so I need to rename the specialised fence/timeline for DMA operations to make room. A consensus was reached in https://lists.freedesktop.org/archives/dri-devel/2016-July/113083.html that making clear this fence applies to DMA operations was a good thing. Since then the patch has grown a bit as usage increases, so hopefully it remains a good thing! (v2...: rebase, rerun spatch) v3: Compile on msm, spotted a manual fixup that I broke. v4: Try again for msm, sorry Daniel coccinelle script: @@ @@ - struct fence + struct dma_fence @@ @@ - struct fence_ops + struct dma_fence_ops @@ @@ - struct fence_cb + struct dma_fence_cb @@ @@ - struct fence_array + struct dma_fence_array @@ @@ - enum fence_flag_bits + enum dma_fence_flag_bits @@ @@ ( - fence_init + dma_fence_init | - fence_release + dma_fence_release | - fence_free + dma_fence_free | - fence_get + dma_fence_get | - fence_get_rcu + dma_fence_get_rcu | - fence_put + dma_fence_put | - fence_signal + dma_fence_signal | - fence_signal_locked + dma_fence_signal_locked | - fence_default_wait + dma_fence_default_wait | - fence_add_callback + dma_fence_add_callback | - fence_remove_callback + dma_fence_remove_callback | - fence_enable_sw_signaling + dma_fence_enable_sw_signaling | - fence_is_signaled_locked + dma_fence_is_signaled_locked | - fence_is_signaled + dma_fence_is_signaled | - fence_is_later + dma_fence_is_later | - fence_later + dma_fence_later | - fence_wait_timeout + dma_fence_wait_timeout | - fence_wait_any_timeout + dma_fence_wait_any_timeout | - fence_wait + dma_fence_wait | - fence_context_alloc + dma_fence_context_alloc | - fence_array_create + dma_fence_array_create | - to_fence_array + to_dma_fence_array | - fence_is_array + dma_fence_is_array | - trace_fence_emit + trace_dma_fence_emit | - FENCE_TRACE + DMA_FENCE_TRACE | - FENCE_WARN + DMA_FENCE_WARN | - FENCE_ERR + DMA_FENCE_ERR ) ( ... ) Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Gustavo Padovan <[email protected]> Acked-by: Sumit Semwal <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2014-12-03drm/ttm: optionally move duplicates to a separate listChristian König1-1/+8
This patch adds an optional list_head parameter to ttm_eu_reserve_buffers. If specified duplicates in the execbuf list are no longer reported as errors, but moved to this list instead. Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-09-11drm/ttm: allow fence to be added as sharedChristian König1-0/+2
This patch adds a new flag to the ttm_validate_buffer list to add the fence as shared to the reservation object. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-09-02drm/ttm: flip the switch, and convert to dma_fenceMaarten Lankhorst1-7/+3
Signed-off-by: Maarten Lankhorst <[email protected]>
2014-09-01drm/ttm: kill off some members to ttm_validate_bufferMaarten Lankhorst1-3/+0
This reorders the list to keep track of what buffers are reserved, so previous members are always unreserved. This gets rid of some bookkeeping that's no longer needed, while simplifying the code some. Signed-off-by: Maarten Lankhorst <[email protected]>
2014-09-01drm/ttm: add interruptible parameter to ttm_eu_reserve_buffersMaarten Lankhorst1-4/+5
It seems some drivers really want this as a parameter, like vmwgfx. Signed-off-by: Maarten Lankhorst <[email protected]>
2013-11-18drm/ttm: Allow execbuf util reserves without ticketThomas Hellstrom1-1/+2
If no reservation ticket is given to the execbuf reservation utilities, try reservation with non-blocking semantics. This is intended for eviction paths that use the execbuf reservation utilities for convenience rather than for deadlock avoidance. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
2013-06-28drm/ttm: convert to the reservation apiMaarten Lankhorst1-1/+0
Now that the code is compatible in semantics, flip the switch. Use ww_mutex instead of the homegrown implementation. ww_mutex uses -EDEADLK to signal that the caller has to back off, and -EALREADY to indicate this buffer is already held by the caller. ttm used -EAGAIN and -EDEADLK for those, respectively. So some changes were needed to handle this correctly. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-06-28drm/ttm: make ttm reservation calls behave like reservation callsMaarten Lankhorst1-3/+10
This commit converts the source of the val_seq counter to the ww_mutex api. The reservation objects are converted later, because there is still a lockdep splat in nouveau that has to resolved first. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-11-20drm/ttm: remove sync_obj_arg memberMaarten Lankhorst1-3/+0
vmwgfx was its only user and always sets it to the same.. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-By: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel ↵David Howells1-1/+1
system headers Convert #include "..." to #include <path/...> in kernel system headers. Signed-off-by: David Howells <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>
2010-11-22drm/ttm/vmwgfx: Have TTM manage the validation sequence.Thomas Hellstrom1-2/+1
Rather than having the driver supply the validation sequence, leave that responsibility to TTM. This saves some confusion and a function argument. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm: Improved fencing of buffer object listsThomas Hellstrom1-0/+2
Drastically reduce the number of spin lock / unlock operations by performing unreserving and fencing under global locks. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm: Add a bo list reserve fastpath (v2)Dave Airlie1-1/+5
Makes it possible to reserve a list of buffer objects with a single spin lock / unlock if there is no contention. Should improve cpu usage on SMP kernels. v2: Initialize private list members on reserve and don't call ttm_bo_list_ref_sub() with zero put_count. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-12-07drm/ttm: Add TTM execbuf utilities.Thomas Hellstrom1-0/+107
Utilities to reserve, unreserve and fence a list of TTM buffer objects in a deadlock-safe manner. Used by the vmwgfx driver. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>