2046d46db9
drm/amdgpu: Add a parameter to amdgpu_bo_create()
...
The parameter init_value contains the value to which we initialized
VRAM bo when AMDGPU_GEM_CREATE_VRAM_CLEARED flag is set.
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:45:58 -04:00
fc9c8f5459
drm/amdgpu: add vm_needs_flush parameter to amdgpu_copy_buffer
...
This allows us to flush the system VM here.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
2017-07-14 11:05:57 -04:00
4a9ed1009b
drm/amdgpu: Fix use of interruptible waiting
...
1. The signal interrupt can affect the expected behaviour.
2. There is no good mechanism to handle the corresponding error.
When signal interrupt happens, unpin is not called.
As a result, inside AMDGPU, the statistic of pin size will be wrong.
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:33:07 -04:00
d159f26caa
drm/amdgpu: Real return value can be over-written when clean up
...
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:33:07 -04:00
f54d186700
dma-buf: Rename struct fence to dma_fence
...
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 <chris@chris-wilson.co.uk >
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk >
Acked-by: Sumit Semwal <sumit.semwal@linaro.org >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161025120045.28839-1-chris@chris-wilson.co.uk
2016-10-25 14:40:39 +02:00
e24db98529
drm/amdgpu: add direct submision option for copy_buffer
...
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-22 13:47:18 -04:00
aeba709a15
drm/amd: make some function-local tables static const
...
These tables were initialized on stack on each call, avoid that
and save a little bit of text size.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:20:20 -04:00
72d7668b5b
drm/amdgpu: export reservation_object from dmabuf to ttm (v2)
...
Adds an extra argument to amdgpu_bo_create, which is only used in amdgpu_prime.c.
Port of radeon commit 831b6966a6
.
v2: fix up kfd.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-09-23 17:23:34 -04:00
c7ae72c01b
drm/amdgpu: use IB for copy buffer of eviction
...
This aids handling buffers moves with the scheduler.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian K?nig <christian.koenig@amd.com >
2015-08-26 17:50:42 -04:00
02bc0650bc
drm/amdgpu: remove amdgpu_fence_wait
...
It was just a wrapper for fence_wait anyway.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:51:09 -04:00
d38ceaf99e
drm/amdgpu: add core driver (v4)
...
This adds the non-asic specific core driver code.
v2: remove extra kconfig option
v3: implement minor fixes from Fengguang Wu
v4: fix cast in amdgpu_ucode.c
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-06-03 21:03:15 -04:00