diff options
author | Christian König <christian.koenig@amd.com> | 2021-09-24 08:54:57 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-11-11 09:36:23 +0100 |
commit | 790f27e0f7c16b162fef29f584d8a85bf9323da5 (patch) | |
tree | f79f92d4a25ff26e142215ab5ae472aeedd2fab3 /drivers/gpu/drm/etnaviv | |
parent | f19ee2f35d100cbd7354c1254790c067554b7880 (diff) | |
download | linux-790f27e0f7c16b162fef29f584d8a85bf9323da5.tar.bz2 |
drm/etnaviv: use dma_resv_describe
Instead of dumping the fence info manually.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211103081231.18578-4-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/etnaviv')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index b018693e3877..d5314aa28ff7 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c @@ -424,36 +424,24 @@ int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj, } #ifdef CONFIG_DEBUG_FS -static void etnaviv_gem_describe_fence(struct dma_fence *fence, - const char *type, struct seq_file *m) -{ - seq_printf(m, "\t%9s: %s %s seq %llu\n", type, - fence->ops->get_driver_name(fence), - fence->ops->get_timeline_name(fence), - fence->seqno); -} - static void etnaviv_gem_describe(struct drm_gem_object *obj, struct seq_file *m) { struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj); struct dma_resv *robj = obj->resv; - struct dma_resv_iter cursor; - struct dma_fence *fence; unsigned long off = drm_vma_node_start(&obj->vma_node); + int r; seq_printf(m, "%08x: %c %2d (%2d) %08lx %p %zd\n", etnaviv_obj->flags, is_active(etnaviv_obj) ? 'A' : 'I', obj->name, kref_read(&obj->refcount), off, etnaviv_obj->vaddr, obj->size); - dma_resv_iter_begin(&cursor, robj, true); - dma_resv_for_each_fence_unlocked(&cursor, fence) { - if (dma_resv_iter_is_exclusive(&cursor)) - etnaviv_gem_describe_fence(fence, "Exclusive", m); - else - etnaviv_gem_describe_fence(fence, "Shared", m); - } - dma_resv_iter_end(&cursor); + r = dma_resv_lock(robj, NULL); + if (r) + return; + + dma_resv_describe(robj, m); + dma_resv_unlock(robj); } void etnaviv_gem_describe_objects(struct etnaviv_drm_private *priv, |