dma_fence's TIMESTAMP bit doesn't really serve a purpose and should be
removed. Direct accessors should therefore be ported.

Use dma_fence_timestamp() in sync_debug.

Signed-off-by: Philipp Stanner <[email protected]>
---
 drivers/dma-buf/sync_debug.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
index 9e5d662cd4e8..58c0d00ba5b3 100644
--- a/drivers/dma-buf/sync_debug.c
+++ b/drivers/dma-buf/sync_debug.c
@@ -46,6 +46,8 @@ static void sync_print_fence(struct seq_file *s,
                             struct dma_fence *fence, bool show)
 {
        struct sync_timeline *parent = dma_fence_parent(fence);
+       struct timespec64 ts64;
+       ktime_t ts;
        int status;
 
        status = dma_fence_get_status_locked(fence);
@@ -55,10 +57,8 @@ static void sync_print_fence(struct seq_file *s,
                   show ? "_" : "",
                   sync_status_str(status));
 
-       if (test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags)) {
-               struct timespec64 ts64 =
-                       ktime_to_timespec64(fence->timestamp);
-
+       if (dma_fence_timestamp(fence, &ts) == 0) {
+               ts64 = ktime_to_timespec64(ts);
                seq_printf(s, "@%ptSp", &ts64);
        }
 
-- 
2.56.0

Reply via email to