diff options
Diffstat (limited to 'drivers/dma-buf/sync_debug.c')
-rw-r--r-- | drivers/dma-buf/sync_debug.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c index 48b20e34fb6d..c769dc653b34 100644 --- a/drivers/dma-buf/sync_debug.c +++ b/drivers/dma-buf/sync_debug.c | |||
@@ -62,30 +62,29 @@ void sync_file_debug_remove(struct sync_file *sync_file) | |||
62 | 62 | ||
63 | static const char *sync_status_str(int status) | 63 | static const char *sync_status_str(int status) |
64 | { | 64 | { |
65 | if (status == 0) | 65 | if (status < 0) |
66 | return "signaled"; | 66 | return "error"; |
67 | 67 | ||
68 | if (status > 0) | 68 | if (status > 0) |
69 | return "active"; | 69 | return "signaled"; |
70 | 70 | ||
71 | return "error"; | 71 | return "active"; |
72 | } | 72 | } |
73 | 73 | ||
74 | static void sync_print_fence(struct seq_file *s, | 74 | static void sync_print_fence(struct seq_file *s, |
75 | struct dma_fence *fence, bool show) | 75 | struct dma_fence *fence, bool show) |
76 | { | 76 | { |
77 | int status = 1; | ||
78 | struct sync_timeline *parent = dma_fence_parent(fence); | 77 | struct sync_timeline *parent = dma_fence_parent(fence); |
78 | int status; | ||
79 | 79 | ||
80 | if (dma_fence_is_signaled_locked(fence)) | 80 | status = dma_fence_get_status_locked(fence); |
81 | status = fence->status; | ||
82 | 81 | ||
83 | seq_printf(s, " %s%sfence %s", | 82 | seq_printf(s, " %s%sfence %s", |
84 | show ? parent->name : "", | 83 | show ? parent->name : "", |
85 | show ? "_" : "", | 84 | show ? "_" : "", |
86 | sync_status_str(status)); | 85 | sync_status_str(status)); |
87 | 86 | ||
88 | if (status <= 0) { | 87 | if (status) { |
89 | struct timespec64 ts64 = | 88 | struct timespec64 ts64 = |
90 | ktime_to_timespec64(fence->timestamp); | 89 | ktime_to_timespec64(fence->timestamp); |
91 | 90 | ||
@@ -136,7 +135,7 @@ static void sync_print_sync_file(struct seq_file *s, | |||
136 | int i; | 135 | int i; |
137 | 136 | ||
138 | seq_printf(s, "[%p] %s: %s\n", sync_file, sync_file->name, | 137 | seq_printf(s, "[%p] %s: %s\n", sync_file, sync_file->name, |
139 | sync_status_str(!dma_fence_is_signaled(sync_file->fence))); | 138 | sync_status_str(dma_fence_get_status(sync_file->fence))); |
140 | 139 | ||
141 | if (dma_fence_is_array(sync_file->fence)) { | 140 | if (dma_fence_is_array(sync_file->fence)) { |
142 | struct dma_fence_array *array = to_dma_fence_array(sync_file->fence); | 141 | struct dma_fence_array *array = to_dma_fence_array(sync_file->fence); |