ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance. With
this new approach however, we would no longer be able to track active
buffers.
Signed-off-by: Yunxia
ptional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
Reviewed-by: Tvrtko Ursulin
CC: dri-de...@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-gfx@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance. With
this new approach however, we would no longer be able to track active
buffers.
Signed-off-by: Yunxia
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_
having both is better for back-compat. Also re-order the paragraphs to
flow better.
Signed-off-by: Yunxiang Li
Reviewed-by: Tvrtko Ursulin
CC: dri-de...@lists.freedesktop.org
---
Documentation/gpu/drm-usage-stats.rst | 54 +--
1 file changed, 27 insertions(+), 27 del
Add a helper to check if the memory stats is zero, this will be used to
check for memory accounting errors.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
umentation, minor tweaks, and some bug fixes found
during testing
v9: documentation fix as suggested, no functional change
v10: change how gem objects shared via flink is counted, and fix a race
between fdinfo read and buffer move
v11: drop the v10 flink changes and instead hook into gem open/close
Y
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance. With
this new approach however, we would no longer be able to track active
buffers.
Signed-off-by: Yunxia
Add a helper to check if the memory stats is zero, this will be used to
check for memory accounting errors.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
having both is better for back-compat. Also re-order the paragraphs to
flow better.
Signed-off-by: Yunxiang Li
Reviewed-by: Tvrtko Ursulin
CC: dri-de...@lists.freedesktop.org
---
Documentation/gpu/drm-usage-stats.rst | 54 +--
1 file changed, 27 insertions(+), 27 del
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_
o get notified when GEM object is being shared.
Signed-off-by: Yunxiang Li
CC: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/drm_gem.c | 3 +++
drivers/gpu/drm/drm_prime.c | 3 +++
include/drm/drm_gem.h | 12 +++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --
ptional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
Reviewed-by: Tvrtko Ursulin
CC: dri-de...@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-gfx@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/
umentation, minor tweaks, and some bug fixes found
during testing
v9: documentation fix as suggested, no functional change
v10: change how gem objects shared via flink is counted, and fix a race
between fdinfo read and buffer move
Yunxiang Li (6):
drm: add drm_memory_stats_is_zero
drm: make
the KMS node) first and have not yet gone to sleep.
Fixes: cc009e613de6 ("drm/amdkfd: Add KFD support for soc21 v3")
Signed-off-by: Yunxiang Li
---
v3: remove the cleanup in kfd_bind_process_to_device and document why
this issue doesn't always happen
drivers/gpu/drm/amd/amdkfd/kf
Pull out some duplicated dereference chains into variables, and in some
cases grab struct device pointer directly from amdgpu_device instead of
via drm_device.
Signed-off-by: Yunxiang Li
Reviewed-by: Mukul Joshi
---
v3: no change
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 29
y- is legacy, amdgpu only behavior. Re-order the paragraphs to
flow better as well.
Signed-off-by: Yunxiang Li
CC: dri-de...@lists.freedesktop.org
---
Documentation/gpu/drm-usage-stats.rst | 54 +--
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/Documentation/gp
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance. With
this new approach however, we would no longer be able to track active
buffers.
Signed-off-by: Yunxia
Add a helper to check if the memory stats is zero, this will be used to
check for memory accounting errors.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
ptional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
CC: dri-de...@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-gfx@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/drm_file.c
umentation, minor tweaks, and some bug fixes found
during testing
v9: documentation fix as suggested, no functional change
Yunxiang Li (5):
drm: add drm_memory_stats_is_zero
drm: make drm-active- stats optional
Documentation/gpu: Clarify drm memory stats definition
drm/amdgpu: remove unuse
umentation, minor tweaks, and some bug fixes found
during testing
Yunxiang Li (5):
drm: add drm_memory_stats_is_zero
drm: make drm-active- stats optional
Documentation/gpu: Clarify drm memory stats definition
drm/amdgpu: remove unused function parameter
drm/amdgpu: track bo memory stats
Add a helper to check if the memory stats is zero, this will be used to
check for memory accounting errors.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance. With
this new approach however, we would no longer be able to track active
buffers.
Signed-off-by: Yunxia
having both is better for back-compat. Also re-order the paragraphs to
flow better.
Signed-off-by: Yunxiang Li
CC: dri-de...@lists.freedesktop.org
---
Documentation/gpu/drm-usage-stats.rst | 36 ---
1 file changed, 16 insertions(+), 20 deletions(-)
diff --git a/Docume
ptional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
CC: dri-de...@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-gfx@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/drm_file.c
drm-active- optional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
CC: dri-de...@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-gfx@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/drm_file.c
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance. With
this new approach however, we would no longer be able to track active
buffers.
Signed-off-by: Yunxia
n a modern system all of VRAM can be mapped if needed.
v5: rebase on top of the drm_print_memory_stats refactor
v6: split the drm changes into a seperate patch for drm-devel review,
fix handling of drm-total- vs drm-resident- and handle drm-purgable-.
v7: make drm-active- optional
Yunxiang Li
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_
Add a helper to check if the memory stats is zero, this will be used to
check for memory accounting errors.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
The old behavior reports the resident memory usage for this key and the
documentation say so as well. However this was accidentally changed to
include buffers that was evicted.
Fixes: a2529f67e2ed ("drm/amdgpu: Use drm_print_memory_stats helper from
fdinfo")
Signed-off-by: Yunxiang Li
7;t know where would be a good
place to add such info, especially how I could remove a BO's stat when
it's fence is signaled.
Yunxiang Li (5):
drm/amdgpu: remove unused function parameter
drm/amdgpu: make drm-memory-* report resident memory
drm/amdgpu: stop tracking v
Since on modern systems all of vram can be made visible anyways, to
simplify the new implementation, drops tracking how much memory is
visible for now. If this is really needed we can add it back on top of
the new implementation.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
Add a helper to check if the memory stats is zero, this will be used to
check for memory accounting errors.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/drm_file.c | 9 +
include/drm/drm_file.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/drm_file.c b
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 14 +-
drivers/gpu/dr
ision, we track the BOs as they change states. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 14 +-
drivers/gpu/dr
Since on modern systems all of vram can be made visible anyways, to
simplify the new implementation, drops tracking how much memory is
visible for now. If this is really needed we can add it back on top of
the new implementation, or just report all the BOs as visible.
Signed-off-by: Yunxiang Li
The old behavior reports the resident memory usage for this key and the
documentation say so as well. However this was accidentally changed to
include buffers that was evicted.
Fixes: a2529f67e2ed ("drm/amdgpu: Use drm_print_memory_stats helper from
fdinfo")
Signed-off-by: Y
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +-
drivers/gpu/dr
n a modern system all of VRAM can be mapped if needed.
v5: rebase on top of the drm_print_memory_stats refactor
Yunxiang Li (4):
drm/amdgpu: remove unused function parameter
drm/amdgpu: make drm-memory-* report resident memory
drm/amdgpu: stop tracking visible memory stats
drm/amdgpu: track
Pull out some duplicated dereference chains into variables, and in some
cases grab struct device pointer directly from amdgpu_device instead of
via drm_device.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 29
1 file changed, 15 insertions
pm_runtime_resume_and_get helper.
Fixes: cc009e613de6 ("drm/amdkfd: Add KFD support for soc21 v3")
Signed-off-by: Yunxiang Li
---
It is unclear to me if kfd_process_destroy_pdds also have this problem,
or is freeing gtt mem guaranteed to succeed even with the GPU in
suspend.
drivers/gpu/drm/
Pull out some duplicated dereference chains into variables, and in some
cases grab struct device pointer directly from amdgpu_device instead of
via drm_device.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 32 +---
1 file changed, 18 insertions
pm_runtime_resume_and_get helper.
Fixes: cc009e613de6 ("drm/amdkfd: Add KFD support for soc21 v3")
Signed-off-by: Yunxiang Li
---
It is unclear to me if kfd_process_destroy_pdds also have this problem,
or is freeing gtt mem guaranteed to succeed even with the GPU in
suspend.
drivers/gpu/drm/
ision, we track the BOs as they change state. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance.
Signed-off-by: Yunxiang Li
---
v3: add amdgpu_vm_bo_move function instead of changing
amdgpu_vm_bo_inval
ision, we track the BOs as they change state. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance.
Signed-off-by: Yunxiang Li
---
v3: add amdgpu_vm_bo_move function instead of changing
amdgpu_vm_bo_inval
Since on modern systems all of vram can be made visible anyways, to
simplify the new implementation, drops tracking how much memory is
visible for now. If this is still needed we can add it back on top of
the new implementation.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +-
drivers/gpu/dr
Since on modern systems all of vram can be made visible anyways, to
simplify the new implementation, drops tracking how much memory is
visible for now. If this is still needed we can add it back on top of
the new implementation.
Signed-off-by: Yunxiang Li
---
v2: split into two patchs for
ision, we track the BOs as they change state. This way
when the fdinfo is queried we only need to take the status lock and copy
out the usage stats with minimal impact to the runtime performance.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
drivers/gpu/dr
ce on modern systems all of vram can be
visible anyways. Also we do not track "unsharing" a BO, the shared stat
is only decreased when the BO is destroyed.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 26 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu
Which method is used to flush tlb does not depend on whether a reset is
in progress or not. We should skip flush altogether if the GPU will get
reset. So put both path under reset_domain read lock.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: sta...@vger.kernel.org
---
drivers
When amdgpu_gart_invalidate_tlb helper is introduced this part was left
out of the conversion. Avoid the code duplication here.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff
set. If the
on-going reset decided to skip GPU reset we have a bad time, otherwise
the extra reset will get cancelled anyway.
remove_queue_mes forgot to check is_resetting flag compared to the
pre-MES path unmap_queue_cpsch, so it did not block hw access during
reset correctly.
Signed-off-by: Yunxi
We need to take the reset domain lock before flush hdp. We can't put the
lock inside amdgpu_device_flush_hdp itself because it is used during
reset where we already take the write side lock.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 6 +-
1 file chang
Here since we are in reset and takes the reset_domain write side lock
already. We can't use the flush tlb helper which tries to take the read
side.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 +---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +-
drivers/gp
We need to take the reset domain lock before talking to MES. While in
this case we can take the lock inside the mes helper. We can't do so for
most other mes helpers since they are used during reset. So for
consistency sake we add the lock here.
Signed-off-by: Yunxiang Li
---
drivers/gp
ready, so it would be the same as before. But this gets
rid of the hack with reset_domain locking and also let us tell how slow
ready to reset actually is from the host. The ready to reset speed can
be improved later.
Signed-off-by: Yunxiang Li
Acked-by: Christian König
Reviewed-by: Emily Deng
At this point the gart is not set up, there's no point to invalidate tlb
here and it could even be harmful.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/a
Accessing registers via host is missing the check for skip_hw_access and
the lockdep check that comes with it.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd
fence poll if reset is started
Revert "drm/amdgpu: Queue KFD reset workitem in VF FED"
updated:
drm/amdgpu: fix sriov host flr handler
drm/amdgpu: fix missing reset domain locks
Yunxiang Li (9):
drm/amdgpu: add skip_hw_access checks for sriov
drm/amdgpu:
ready, so it would be the same as before. But this gets
rid of the hack with reset_domain locking and also let us know how slow
the reset actually is on the host. The pre-reset speed can thus be
improved later.
Signed-off-by: Yunxiang Li
---
v3: still call amdgpu_virt_fini_data_exchange right away
set. If the
on-going reset decided to skip GPU reset we have a bad time, otherwise
the extra reset will get cancelled anyway.
remove_queue_mes forgot to check is_resetting flag compared to the
pre-MES path unmap_queue_cpsch, so it did not block hw access during
reset correctly.
Signed-off-by: Yunxi
kun Gao (1):
drm/amd/amdgpu: remove unnecessary flush when enable gart
Yunxiang Li (7):
drm/amdgpu: add skip_hw_access checks for sriov
drm/amdgpu: fix sriov host flr handler
drm/amdgpu/kfd: remove is_hws_hang and is_resetting
drm/amdgpu: remove tlb flush in amdgpu_gtt_mgr_recover
drm/a
When amdgpu_gart_invalidate_tlb helper is introduced this part was left
out of the conversion. Avoid the code duplication here.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff
These functions are missing the lock for reset domain.
Signed-off-by: Yunxiang Li
---
v3: only bracket amdgpu_device_flush_hdp with the read lock,
amdgpu_gmc_flush_gpu_tlb already takes the lock
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 6 +-
drivers/gpu/drm/amd/amdkfd
At this point the gart is not set up, there's no point to invalidate tlb
here and it could even be harmful.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/a
Which method is used to flush tlb does not depend on whether a reset is
in progress or not. We should skip flush altogether if the GPU will get
reset. So put both path under reset_domain read lock.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
CC: sta...@vger.kernel.org
---
drivers
Accessing registers via host is missing the check for skip_hw_access and
the lockdep check that comes with it.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd
From: Likun Gao
Remove hdp flush for gc v11/12 when enable gart.
Remove flush tlb for gc v10/11/12 when enable gart.
The flush is done for each GART mapping when it is created.
Signed-off-by: Likun Gao
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu
These functions are missing the lock for reset domain.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c| 8 ++--
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 9 +++--
3
set. If the
on-going reset decided to skip GPU reset we have a bad time, otherwise
the extra reset will get cancelled anyway.
remove_queue_mes forgot to check is_resetting flag compared to the
pre-MES path unmap_queue_cpsch, so it did not block hw access during
reset correctly.
Signed-off-by: Yunxi
At this point the gart is not set up, there's no point to invalidate tlb
here and it could even be harmful.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
b/driver
Which method is used to flush tlb does not depend on whether a reset is
in progress or not. We should skip flush altogether if the GPU will get
reset. So put both path under reset_domain read lock.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 66
This reverts commit 2149ee697a7a3091a16447c647d4a30f7468553a.
The issue is already fixed by
fa5a7f2ccb7e ("drm/amdgpu: Fix two reset triggered in a row")
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
When amdgpu_gart_invalidate_tlb helper is introduced this part was left
out of the conversion. Avoid the code duplication here.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd
If a reset is triggered, there's no point in waiting for the fence back
anymore, it just makes the reset code wait for a long time for the
reset_domain read lock to be dropped.
This also makes our reply to host FLR fast enough so the host doesn't
timeout.
Signed-off-by: Yunxiang Li
--
From: Likun Gao
Remove hdp flush for gc v11/12 when enable gart.
Remove flush tlb for gc v10/11/12 when enable gart.
Signed-off-by: Likun Gao
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 ---
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 3 ---
drivers/gpu/drm/amd
ready, so it would be the same as before. But this gets
rid of the hack with reset_domain locking and also let us know how slow
the reset actually is on the host. The pre-reset speed can thus be
improved later.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2
Accessing registers via host is missing the check for skip_hw_access and
the lockdep check that comes with it.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers
reliable. This series hopes to
address these bugs.
Likun Gao (1):
drm/amd/amdgpu: remove unnecessary flush when enable gart
Yunxiang Li (9):
drm/amdgpu: add skip_hw_access checks for sriov
drm/amdgpu: fix sriov host flr handler
drm/amdgpu: abort fence poll if reset is started
drm/amdgpu
When amdgpu_gart_invalidate_tlb helper is introduced this part was left
out of the conversion. Avoid the code duplication here.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd
At this point the gart is not set up, there's no point to invalidate tlb
here and it could even be harmful.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
b/driver
not take the read
lock and deadlock itself, and normal access should avoid waiting on the
reset to finish and should instead treat the hardware access as failed.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
From: Likun Gao
Remove hdp flush for gc v11/12 when enable gart.
Remove flush tlb for gc v10/11/12 when enable gart.
Signed-off-by: Likun Gao
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 ---
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 3 ---
drivers/gpu/drm/amd
lling amdgpu_device_pre_asic_reset each retry which
properly free the resources from previous try by calling
amdgpu_virt_fini_data_exchange.
Signed-off-by: Yunxiang Li
---
v2: put back release full access and the missed return
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 47 ++
1
reset notification.
Signed-off-by: Yunxiang Li
---
v2: fix typo
v3: pass reset_context directly
v4: clear the flag in case we retry
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 -
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 1 +
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1
This is part of the reset, move it into the reset function.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm/amd/amdgpu
lling amdgpu_device_pre_asic_reset each retry which
properly free the resources from previous try by calling
amdgpu_virt_fini_data_exchange.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 50 ++
1 file changed, 22 insertions(+), 28 deletions(-)
diff --
reset notification.
Signed-off-by: Yunxiang Li
---
v2: fix typo
v3: pass reset_context directly
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 1 +
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 +
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
is supposedly in a good state, any reset scheduled
after this point would be a legitimate reset.
Remove unnecessary and incorrect checks for amdgpu_in_reset that was
kinda serving this purpose.
Signed-off-by: Yunxiang Li
---
v2: instead of adding amdgpu_in_reset check, move when we cancel pending
scheduled after that point would be legitimate.
Remove unnecessary and incorrect checks for amdgpu_in_reset that was
kinda serving this purpose.
Signed-off-by: Yunxiang Li
---
v2: instead of adding amdgpu_in_reset check, move when we cancel pending
resets
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
easier to reason about.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 76 +-
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 67da24e9f0a2
Using the job pointer to check if the FLR comes from the host is wrong,
there are other reset triggers that pass NULL for job. So add a flag
explicitly for host triggered reset.
Signed-off-by: Yunxiang Li
---
v2: fix typo
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
drivers/gpu/drm/amd
Reset request from KFD is missing a check for if a reset is already in
progress, this causes a second reset to be triggered right after the
previous one finishes. Add the check to align with the other reset sources.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2
Using the job pointer to check if the FLR comes from the host is wrong,
there are other reset triggers that pass NULL for job. So add a flag
explicitly for host triggered reset.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
drivers/gpu/drm/amd/amdgpu
1 - 100 of 106 matches
Mail list logo