Christian König
a7d64de659
drm/amdgpu: remove adev pointer from struct amdgpu_bo v2
...
It's completely pointless to have two pointers to the
device in the same structure.
v2: rename function to amdgpu_ttm_adev, fix typos
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-10-25 14:38:26 -04:00
Chris Wilson
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
Christian König
9702d40dd3
drm/amdgpu: add AMDGPU_BO_INVALID_OFFSET
...
An invalid offset to be used by custom VRAM/GGT manager when we
don't have an offset for an BO.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:44 -04:00
Junwei Zhang
aa1d562e64
drm/amdgpu: add a new helper to free a BO in kernel allocations
...
Free the BO allocated by amdgpu_bo_create_kernel()
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:26 -04:00
Chunming Zhou
20f4eff1c8
drm/amdgpu: sync bo and shadow V3
...
Use shadow flag to judge which direction to sync.
V2:
Don't need bo pin, so remove it.
V3:
1. Split to two functions, one is backup_to_shadow, another is
restore_from_shadow.
2. Clean up previous shadow direction difinitions.
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
Christian König
cdb7e8f273
drm/amdgpu: add more warning to amdgpu_bo_offset
...
Warn when we try to get the address and the BO isn't locked or reserved.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:17 -04:00
Christian König
7c204889de
drm/amdgpu: add new helper for in kernel allocations
...
We often allocate, pin and map things at the same time in the kernel.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:15 -04:00
Christian König
dfd5e50ea4
drm/ttm: remove use_ticket parameter from ttm_bo_reserve
...
Not used any more.
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:21:21 -04:00
Christian König
418aa0c296
drm/amdgpu: cleanup gem init/finit
...
Remove the double housekeeping and use something sane to
forcefuly delete BOs on unload.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-16 17:46:24 -05:00
Christian König
191caba6cc
drm/amdgpu: add warning to amdgpu_bo_gpu_offset() v2
...
Check if there really is a valid offset for the BO.
v2: user WARN_ON_ONCE
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com > (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-01-08 15:39:28 -05:00
Junwei Zhang
bbf0b34578
drm/amdgpu: remove the unnecessary parameter adev for amdgpu_sa_bo_new()
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-11-16 17:01:32 -05:00
Christian König
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
Chunming Zhou
4ce9891ee1
drm/amdgpu: improve sa_bo->fence by kernel fence
...
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian K?nig <christian.koenig@amd.com >
2015-08-25 10:38:41 -04:00
Chunming Zhou
e40a31159b
drm/amdgpu: use kernel fence diretly in amdgpu_bo_fence
...
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com >
2015-08-17 16:50:50 -04:00
Chunming Zhou
7e5a547f64
drm/amdgpu: implement the allocation range (v3)
...
Pass a ttm_placement pointer to amdgpu_bo_create_restricted
add min_offset to amdgpu_bo_pin_restricted. This makes it
easier to allocate memory with address restrictions. With
this patch we can also enable 2-ended allocation again.
v2: fix rebase conflicts
v3: memset placements before using
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-06-03 21:03:52 -04:00
Alex Deucher
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