drm/qxl: use iterator instead of dma_resv_shared_list
I'm not sure why it is useful to know the number of fences in the reservation object, but we try to avoid exposing the dma_resv_shared_list() function. So use the iterator instead. If more information is desired we could use dma_resv_describe() as well. 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/20211129120659.1815-5-christian.koenig@amd.com
This commit is contained in:
@@ -57,13 +57,16 @@ qxl_debugfs_buffers_info(struct seq_file *m, void *data)
|
|||||||
struct qxl_bo *bo;
|
struct qxl_bo *bo;
|
||||||
|
|
||||||
list_for_each_entry(bo, &qdev->gem.objects, list) {
|
list_for_each_entry(bo, &qdev->gem.objects, list) {
|
||||||
struct dma_resv_list *fobj;
|
struct dma_resv_iter cursor;
|
||||||
int rel;
|
struct dma_fence *fence;
|
||||||
|
int rel = 0;
|
||||||
|
|
||||||
rcu_read_lock();
|
dma_resv_iter_begin(&cursor, bo->tbo.base.resv, true);
|
||||||
fobj = dma_resv_shared_list(bo->tbo.base.resv);
|
dma_resv_for_each_fence_unlocked(&cursor, fence) {
|
||||||
rel = fobj ? fobj->shared_count : 0;
|
if (dma_resv_iter_is_restarted(&cursor))
|
||||||
rcu_read_unlock();
|
rel = 0;
|
||||||
|
++rel;
|
||||||
|
}
|
||||||
|
|
||||||
seq_printf(m, "size %ld, pc %d, num releases %d\n",
|
seq_printf(m, "size %ld, pc %d, num releases %d\n",
|
||||||
(unsigned long)bo->tbo.base.size,
|
(unsigned long)bo->tbo.base.size,
|
||||||
|
|||||||
Reference in New Issue
Block a user