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-devel@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-devel@lists.freedesktop.org
---
Documentation/gpu/drm-usage-stats.rst | 54 +--
1 file changed, 27 insertions(+), 27 del
ptional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
Reviewed-by: Tvrtko Ursulin
CC: dri-devel@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/
o get notified when GEM object is being shared.
Signed-off-by: Yunxiang Li
CC: dri-devel@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-devel@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/
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-devel@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-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
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-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
y- is legacy, amdgpu only behavior. Re-order the paragraphs to
flow better as well.
Signed-off-by: Yunxiang Li
CC: dri-devel@lists.freedesktop.org
---
Documentation/gpu/drm-usage-stats.rst | 54 +--
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/Documentation/gp
ptional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
CC: dri-devel@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/drm_file.c
having both is better for back-compat. Also re-order the paragraphs to
flow better.
Signed-off-by: Yunxiang Li
CC: dri-devel@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-devel@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/drm_file.c
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-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
drm-active- optional to enable amdgpu to switch to the second
method.
Signed-off-by: Yunxiang Li
CC: dri-devel@lists.freedesktop.org
CC: intel-...@lists.freedesktop.org
CC: amd-...@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 +
drivers/gpu/drm/drm_file.c
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-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_file.c | 10 ++
include/drm/drm_file.h | 1 +
2 files
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
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
---
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
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.
Signed-off-by: Yunxiang Li
Reviewed-by: Christian König
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
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
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 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
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
Reading fence timestamp always need to check the corresponding flag bit
before to make sure the write is actually visible, otherwise we can read
garbage here.
Fixes: 1774baa64f93 ("drm/scheduler: Change scheduled fence track v2")
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm
. This fixes issue where ttm_bo_mem_space's reserve is
ignored in various amdgpu ioctl paths, and was causing soft-lockup when
VRAM is exhausted.
v2: try to avoid memory corruption if possible.
Signed-off-by: Yunxiang Li
---
v3: fix typo
drivers/dma-buf/dma-resv.c
. This fixes issue where ttm_bo_mem_space's reserve is
ignored in various amdgpu ioctl paths, and was causing soft-lockup when
VRAM is exhausted.
v2: try to avoid memory corruption if possible.
Signed-off-by: Yunxiang Li
---
drivers/dma-buf/dma-resv.c
ng v5")
Signed-off-by: Yunxiang Li
---
v2: style cleanup
drivers/gpu/drm/ttm/ttm_resource.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c
b/drivers/gpu/drm/ttm/ttm_resource.c
index 7333f7a87a2f..e51dbc7a2d53 100644
--- a/drivers/g
check are now stricter and need to be enabled all the time.
This fixes issue where ttm_bo_mem_space's reserve is ignored in various
amdgpu ioctl paths, and was causing fence lost leading to soft-lockup
when VRAM is exhausted.
Signed-off-by: Yunxiang Li
---
drivers/dma-buf/dma-resv.c
When amdgpu_bo_fence is converted to dma_resv_add_fence, the reserve was
removed in that process, so putting it back.
Fixes: 4247084057cf ("drm/amdgpu: use DMA_RESV_USAGE_BOOKKEEP v2")
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 4
1 file
When running multiple graphical application and vram is saturated, the
excessive swapping triggers the BUG_ON() in dma_resv_add_fences. The
root cause is that calling dma_resv_reserve_fences twice would shadow
the second call and this happens in amdgpu_cs_ioctl/amdgpu_gem_va_ioctl
path shadowing re
ng v5")
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/ttm/ttm_resource.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c
b/drivers/gpu/drm/ttm/ttm_resource.c
index 7333f7a87a2f..4b84cfb5f916 100644
--- a/drivers/gpu/drm/ttm/ttm_resour
drm_crtc_vblank_on later re-enables vblank if the refcount is not
zero, letting drm_vblank_get succeed during modeset should fix the behavior.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1380
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/drm_vblank.c | 2 +-
1 file changed, 1
Acquire vbl_lock before accessing vblank refcount in drm_vblank_put,
just like everywhere else that access the refcount.
Signed-off-by: Yunxiang Li
---
drivers/gpu/drm/drm_vblank.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b
36 matches
Mail list logo