Commit f19ee2f3 authored by Christian König's avatar Christian König

drm/msm: use the new dma_resv_describe

Instead of hand rolling pretty much the same code.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211103081231.18578-3-christian.koenig@amd.com
parent a25efb38
...@@ -865,23 +865,11 @@ int msm_gem_cpu_fini(struct drm_gem_object *obj) ...@@ -865,23 +865,11 @@ int msm_gem_cpu_fini(struct drm_gem_object *obj)
} }
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
static void describe_fence(struct dma_fence *fence, const char *type,
struct seq_file *m)
{
if (!dma_fence_is_signaled(fence))
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);
}
void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m, void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m,
struct msm_gem_stats *stats) struct msm_gem_stats *stats)
{ {
struct msm_gem_object *msm_obj = to_msm_bo(obj); struct msm_gem_object *msm_obj = to_msm_bo(obj);
struct dma_resv *robj = obj->resv; struct dma_resv *robj = obj->resv;
struct dma_resv_iter cursor;
struct dma_fence *fence;
struct msm_gem_vma *vma; struct msm_gem_vma *vma;
uint64_t off = drm_vma_node_start(&obj->vma_node); uint64_t off = drm_vma_node_start(&obj->vma_node);
const char *madv; const char *madv;
...@@ -955,13 +943,7 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m, ...@@ -955,13 +943,7 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m,
seq_puts(m, "\n"); seq_puts(m, "\n");
} }
dma_resv_for_each_fence(&cursor, robj, true, fence) { dma_resv_describe(robj, m);
if (dma_resv_iter_is_exclusive(&cursor))
describe_fence(fence, "Exclusive", m);
else
describe_fence(fence, "Shared", m);
}
msm_gem_unlock(obj); msm_gem_unlock(obj);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment