Christian König
41cc108b24
drm/amdgpu: fix missing dma_fence_put in error path
...
When the fence can't be added we need to drop the reference.
Suggested-by: Bert Karwatzki <spasswolf@web.de >
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-2-christian.koenig@amd.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com >
2023-01-05 20:34:58 +01:00
Christian König
aab9cf7b69
drm/amdgpu: use scheduler dependencies for VM updates
...
Instead of putting that into the job sync object.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-9-christian.koenig@amd.com
2022-11-03 12:45:20 +01:00
Jingyu Wang and Alex Deucher
826f03b8ac
drm/amdgpu: cleanup coding style in amdgpu_sync.c file
...
This is a patch to the amdgpu_sync.c file that fixes some warnings found by the checkpatch.pl tool
Signed-off-by: Jingyu Wang <jingyuwang_vip@163.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-09-13 14:32:58 -04:00
Dave Airlie
dbe946287e
Merge tag 'amd-drm-next-5.19-2022-04-15' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
...
amd-drm-next-5.19-2022-04-15:
amdgpu:
- USB-C updates
- GPUVM updates
- TMZ fixes for RV
- DCN 3.1 pstate fixes
- Display z state fixes
- RAS fixes
- Misc code cleanups and spelling fixes
- More DC FP rework
- GPUVM TLB handling rework
- Power management sysfs code cleanup
- Add RAS support for VCN
- Backlight fix
- Add unique id support for more asics
- Misc display updates
- SR-IOV fixes
- Extend CG and PG flags to 64 bits
- Enable VCN clk sysfs nodes for navi12
amdkfd:
- Fix IO link cleanup during device removal
- RAS fixes
- Retry fault fixes
- Asynchronously free events
- SVM fixes
radeon:
- Drop some dead code
- Misc code cleanups
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220415135144.5700-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-04-28 14:33:20 +10:00
Christian König
0cc848a75b
dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3
...
Add an usage for submissions independent of implicit sync but still
interesting for memory management.
v2: cleanup the kerneldoc a bit
v3: separate amdgpu changes from this
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-10-christian.koenig@amd.com
2022-04-07 12:53:54 +02:00
Christian König
7bc80a5462
dma-buf: add enum dma_resv_usage v4
...
This change adds the dma_resv_usage enum and allows us to specify why a
dma_resv object is queried for its containing fences.
Additional to that a dma_resv_usage_rw() helper function is added to aid
retrieving the fences for a read or write userspace submission.
This is then deployed to the different query functions of the dma_resv
object and all of their users. When the write paratermer was previously
true we now use DMA_RESV_USAGE_WRITE and DMA_RESV_USAGE_READ otherwise.
v2: add KERNEL/OTHER in separate patch
v3: some kerneldoc suggestions by Daniel
v4: some more kerneldoc suggestions by Daniel, fix missing cases lost in
the rebase pointed out by Bas.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-2-christian.koenig@amd.com
2022-04-07 12:53:53 +02:00
Christian König and Alex Deucher
5255e146c9
drm/amdgpu: rework TLB flushing
...
Instead of tracking the VM updates through the dependencies just use a
sequence counter for page table updates which indicates the need to
flush the TLB.
This reduces the need to flush the TLB drastically.
v2: squash in NULL check fix (Christian)
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-25 12:40:51 -04:00
Christian König and Alex Deucher
e997b82745
drm/amdgpu: simplify VM update tracking a bit
...
Store the 64bit sequence directly. Makes it simpler to use and saves a bit
of fence reference counting overhead.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-25 12:40:26 -04:00
Christian König
e09b9aef68
drm/amdgpu: use dma_fence_chain_contained
...
Instead of manually extracting the fence.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220204100429.2049-7-christian.koenig@amd.com
2022-02-08 09:25:40 +01:00
Christian König
930ca2a7cb
drm/amdgpu: use the new iterator in amdgpu_sync_resv
...
Simplifying the code a bit.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211005113742.1101-12-christian.koenig@amd.com
2021-10-22 14:41:07 +02:00
Christian König
22f0463ae6
drm/amdgpu: unwrap fence chains in the explicit sync fence
...
Unwrap the explicit fence if it is a dma_fence_chain and
sync to the first fence not matching the owner rules.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210614174536.5188-1-christian.koenig@amd.com
2021-06-22 11:05:04 +02:00
Christian König
fb5ce730f2
dma-buf: rename and cleanup dma_resv_get_list v2
...
When the comment needs to state explicitly that this is doesn't get a reference
to the object then the function is named rather badly.
Rename the function and use it in even more places.
v2: use dma_resv_shared_list as new name
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-5-christian.koenig@amd.com
2021-06-06 11:18:19 +02:00
Christian König
6edbd6abb7
dma-buf: rename and cleanup dma_resv_get_excl v3
...
When the comment needs to state explicitly that this
doesn't get a reference to the object then the function
is named rather badly.
Rename the function and use rcu_dereference_check(), this
way it can be used from both rcu as well as lock protected
critical sections.
v2: improve kerneldoc as suggested by Daniel
v3: use dma_resv_excl_fence as function name
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-4-christian.koenig@amd.com
2021-06-06 11:17:58 +02:00
Lee Jones and Alex Deucher
1b4940bc79
drm/amd/amdgpu/amdgpu_sync: Fix misnamed, missing and extra param descriptions
...
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:86: warning: Function parameter or member 'f' not described in 'amdgpu_sync_get_owner'
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:86: warning: Excess function parameter 'fence' description in 'amdgpu_sync_get_owner'
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:182: warning: Excess function parameter 'adev' description in 'amdgpu_sync_vm_fence'
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:203: warning: Function parameter or member 'adev' not described in 'amdgpu_sync_resv'
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Felix Kuehling <Felix.Kuehling@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-13 17:29:46 -05:00
Christian König and Alex Deucher
174b328bc8
drm/amdgpu: remove distinction between explicit and implicit sync (v2)
...
According to Marek a pipeline sync should be inserted for implicit syncs well.
v2: bump the driver version
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-07-01 01:59:22 -04:00
Felix Kuehling and Alex Deucher
b205795677
drm/amdkfd: Add eviction debug messages
...
Use WARN to print messages with backtrace when evictions are triggered.
This can help determine the root cause of evictions and help spot driver
bugs triggering evictions unintentionally, or help with performance tuning
by avoiding conditions that cause evictions in a specific workload.
The messages are controlled by a new module parameter that can be changed
at runtime:
echo Y > /sys/module/amdgpu/parameters/debug_evictions
echo N > /sys/module/amdgpu/parameters/debug_evictions
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Philip Yang <Philip.Yang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-07-01 01:59:21 -04:00
Christian König and Alex Deucher
e208586471
drm/amdgpu: partial revert VM sync changes
...
We still need to add the VM update fences to the root PD.
So make sure to never sync to those implicitely.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-04-28 16:20:30 -04:00
Christian König and Alex Deucher
9f3cc18d19
drm/amdgpu: rework synchronization of VM updates v4
...
If provided we only sync to the BOs reservation
object and no longer to the root PD.
v2: update comment, cleanup amdgpu_bo_sync_wait_resv
v3: use correct reservation object while clearing
v4: fix typo in amdgpu_bo_sync_wait_resv
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-02-04 23:30:39 -05:00
Christian König and Alex Deucher
4939d973b6
drm/amdgpu: simplify and fix amdgpu_sync_resv
...
No matter what we always need to sync to moves.
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-02-04 23:30:39 -05:00
Christian König and Alex Deucher
5d3196605d
drm/amdgpu: rework job synchronization v2
...
For unlocked page table updates we need to be able
to sync to fences of a specific VM.
v2: use SYNC_ALWAYS in the UVD code
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-02-04 23:30:39 -05:00
Christian König and Alex Deucher
90b69cdc5f
drm/amdgpu: stop adding VM updates fences to the resv obj
...
Don't add the VM update fences to the resv object and remove
the handling to stop implicitely syncing to them.
Ongoing updates prevent page tables from being evicted and we manually
block for all updates to complete before releasing PDs and PTS.
This way we can do updates even without the resv obj locked.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-12-09 17:02:15 -05:00
Christian König and Alex Deucher
e095fc17bb
drm/amdgpu: explicitely sync to VM updates v2
...
Allows us to reduce the overhead while syncing to fences a bit.
v2: also drop adev parameter from the functions
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-12-09 17:02:07 -05:00
Christian König
52791eeec1
dma-buf: rename reservation_object to dma_resv
...
Be more consistent with the naming of the other DMA-buf objects.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/323401/
2019-08-13 09:09:30 +02:00
Sam Ravnborg
fdf2f6c56e
drm/amd: drop use of drmP.h in amdgpu/amdgpu*
...
Drop use of drmP.h in all files named amdgpu*
in drm/amd/amdgpu/
Fix fallout.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-10-sam@ravnborg.org
2019-06-10 23:02:48 +02:00
Felix Kuehling and Oded Gabbay
3c728d3aa1
drm/amdgpu: add amdgpu_sync_clone
...
Cloning a sync object is useful for waiting for a sync object
without locking the original structure indefinitely, blocking
other threads.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2018-02-06 20:32:37 -05:00
Felix Kuehling and Oded Gabbay
d8d019ccff
drm/amdgpu: Add KFD eviction fence
...
This fence is used by KFD to keep memory resident while user mode
queues are enabled. Trying to evict memory will trigger the
enable_signaling callback, which starts a KFD eviction, which
involves preempting user mode queues before signaling the fence.
There is one such fence per process.
v2:
* Grab a reference to mm_struct
* Dereference fence after NULL check
* Simplify fence release, no need to signal without anyone waiting
* Added signed-off-by Harish, who is the original author of this code
v3:
* update MAINTAINERS file
* change amd_kfd_ prefix to amdkfd_
* remove useless initialization of variable to NULL
v4:
* set amdkfd_fence_ops to be static
* Suggested by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2018-02-06 20:32:35 -05:00
Lucas Stach and Alex Deucher
1b1f42d8fd
drm: move amd_gpu_scheduler into common location
...
This moves and renames the AMDGPU scheduler to a common location in DRM
in order to facilitate re-use by other drivers. This is mostly a straight
forward rename with no code changes.
One notable exception is the function to_drm_sched_fence(), which is no
longer a inline header function to avoid the need to export the
drm_sched_fence_ops_scheduled and drm_sched_fence_ops_finished structures.
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-07 11:51:56 -05:00
Andrey Grodzovsky and Alex Deucher
54f539086a
drm/amdgpu: Fix amdgpu_sync_add_later to preserve explicit flag.
...
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-07 11:48:56 -05:00
Christian König and Alex Deucher
d4b7648d6d
drm/amdgpu: fix amdgpu_sync_resv v2
...
Fixes a bug introduced by AMDGPU_GEM_CREATE_EXPLICIT_SYNC. We still need
to wait for pipelined moves in the shared fences list.
v2: fix typo
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:48:32 -05:00
Andrey Grodzovsky and Alex Deucher
cebb52b7bc
drm/amdgpu: Get rid of dep_sync as a seperate object.
...
Instead mark fence as explicit in it's amdgpu_sync_entry.
v2:
Fix use after free bug and add new parameter description.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:48:31 -05:00
Andres Rodriguez and Alex Deucher
177ae09b5d
drm/amdgpu: introduce AMDGPU_GEM_CREATE_EXPLICIT_SYNC v2
...
Introduce a flag to signal that access to a BO will be synchronized
through an external mechanism.
Currently all buffers shared between contexts are subject to implicit
synchronization. However, this is only required for protocols that
currently don't support an explicit synchronization mechanism (DRI2/3).
This patch introduces the AMDGPU_GEM_CREATE_EXPLICIT_SYNC, so that
users can specify when it is safe to disable implicit sync.
v2: only disable explicit sync in amdgpu_cs_ioctl
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-09 16:30:19 -04:00
Chunming Zhou and Alex Deucher
7a7c286d07
drm/amdgpu: save list length when fence is signaled
...
update the list first to avoid redundant checks.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-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 >
Cc: stable@vger.kernel.org
2017-08-15 14:10:01 -04:00
Harish Kasiviswanathan and Alex Deucher
a6583af4ae
drm/amdgpu: Add amdgpu_sync_wait
...
v2: Add intr option
Helper function useful for CPU update of VM page tables. Also useful if
kernel have to synchronously wait till VM page tables are updated.
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-09 11:29:46 -04:00
Chris Wilson and Daniel Vetter
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 and Alex Deucher
1fbb2e9299
drm/amdgpu: use a fence array for VMID management
...
Just wait for any fence to become available, instead
of waiting for the last entry of the LRU.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 14:51:23 -04:00
Christian König and Alex Deucher
3542023896
drm/amdgpu: add optional ring to amdgpu_sync_is_idle
...
Check if the sync object is idle depending on the ring a submission works with.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 14:51:21 -04:00
Christian König and Alex Deucher
a7e7a93e57
drm/amdgpu: remove amdgpu_sync_wait
...
Stop hiding bugs, instead print a proper error when the scheduler
doesn't handle all dependencies.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 14:51:21 -04:00
Christian König and Alex Deucher
0e9d239b8d
drm/amdgpu: document amdgpu_sync_get_fence
...
It's not obvious what it should do.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 14:51:19 -04:00
Christian König and Alex Deucher
832a902f94
drm/amdgpu: use a sync object for VMID fences v2
...
v2: rebase & cleanup
This way we can store more than one fence as user for each VMID.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com > (v1)
Reviewed-by: Chunming Zhou <david1.zhou@amd.com > (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:19:16 -04:00
Christian König and Alex Deucher
257bf15a4b
drm/amdgpu: add slap cache for sync objects as well
...
We need them all the time.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2016-03-08 11:01:47 -05:00
Christian König and Alex Deucher
336d1f5efe
drm/amdgpu: remove HW fence owner
...
Not used any more since we now always use the sheduler.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2016-03-08 11:01:47 -05:00
Christian König and Alex Deucher
bcc634f4a8
drm/amdgpu: cleanup the sync code
...
No need for two functions doing the same, remove one and
add comments what those functions actually do.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2016-03-08 11:01:46 -05:00
Christian König and Alex Deucher
8a8f0b48a0
drm/amdgpu: remove adev and fence from amdgpu_sync_free
...
Just leftovers from the semaphores.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:17:17 -05:00
Christian König and Alex Deucher
046c12c67b
drm/amdgpu: remove sync_to from sync obj v2
...
Not needed any more without semaphores.
v2: remove unused variables as well
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:16:52 -05:00
Chunming Zhou and Alex Deucher
be86c606b5
drm/amdgpu: cleanup amdgpu_sync_rings V2
...
No longer needed now that semaphores are gone.
V2: remove the first amdgpu_sync_wait in amdgpu_ib_schedule
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com > (V1)
Reviewed-by: Monk Liu <monk.liu@amd.com > (V2)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:16:50 -05:00
Chunming Zhou and Alex Deucher
2f4b940033
drm/amdgpu: clean up hw semaphore support in driver
...
No longer used.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Monk Liu <monk.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:16:49 -05:00
Chunming Zhou and Alex Deucher
888c9e33e4
drm/amdgpu: fix lost sync_to if scheduler is enabled.
...
when scheduler is enabled, the semaphore isn't used at all.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Cc: stable@vger.kernel.org
2016-01-13 11:39:15 -05:00
Christian König and Alex Deucher
680513cc0a
drm/amdgpu: wait interruptible when semaphores are disabled v2
...
Otherwise debugging locked up processes isn't possible.
v2: rebased
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com > (v1)
2015-11-16 17:01:15 -05:00
Christian König and Alex Deucher
7a91d6cb3c
drm/amdgpu: remove AMDGPU_FENCE_OWNER_MOVE
...
Moves are exclusive operations anyway, just use the undefined owner for those.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-11-04 12:29:23 -05:00
Christian König and Alex Deucher
16545c32a5
drm/amdgpu: use common fence for sync
...
Stop using the driver internal functions.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-10-30 01:57:19 -04:00