diff options
author | Rob Clark <robdclark@chromium.org> | 2021-12-06 20:13:49 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-12-06 20:14:28 +0300 |
commit | 83b965d118cbab1dbdfffdff8cabc8c1cfd183c6 (patch) | |
tree | f46a8f6d854b05a47311125f6fd6b6081e79557a /drivers/dma-buf/dma-resv.c | |
parent | fee32807633395e666f0951d6b7b6546e9b76c3d (diff) | |
parent | c305ae99dfd4d0fe70c7fdf13ef5f7650a804ea7 (diff) | |
download | linux-83b965d118cbab1dbdfffdff8cabc8c1cfd183c6.tar.xz |
Merge remote-tracking branch 'drm/drm-next' into msm-next-staging
Backmerge drm-next to pull in:
8f59ee9a570c ("drm/msm/dsi: Adjust probe order")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/dma-buf/dma-resv.c')
-rw-r--r-- | drivers/dma-buf/dma-resv.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index 9eb2baa387d4..ff3c0558b3b8 100644 --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -38,6 +38,7 @@ #include <linux/mm.h> #include <linux/sched/mm.h> #include <linux/mmu_notifier.h> +#include <linux/seq_file.h> /** * DOC: Reservation Object Overview @@ -666,6 +667,28 @@ bool dma_resv_test_signaled(struct dma_resv *obj, bool test_all) } EXPORT_SYMBOL_GPL(dma_resv_test_signaled); +/** + * dma_resv_describe - Dump description of the resv object into seq_file + * @obj: the reservation object + * @seq: the seq_file to dump the description into + * + * Dump a textual description of the fences inside an dma_resv object into the + * seq_file. + */ +void dma_resv_describe(struct dma_resv *obj, struct seq_file *seq) +{ + struct dma_resv_iter cursor; + struct dma_fence *fence; + + dma_resv_for_each_fence(&cursor, obj, true, fence) { + seq_printf(seq, "\t%s fence:", + dma_resv_iter_is_exclusive(&cursor) ? + "Exclusive" : "Shared"); + dma_fence_describe(fence, seq); + } +} +EXPORT_SYMBOL_GPL(dma_resv_describe); + #if IS_ENABLED(CONFIG_LOCKDEP) static int __init dma_resv_lockdep(void) { |