Skip to content

Commit 3493c81

Browse files
dept: Apply Dept to dma fence's default wait and wakeup
Makes Dept able to track dma fence things. Let's start with applying to default wait and default wait callback(wakeup). Signed-off-by: Byungchul Park <byungchul.park@lge.com>
1 parent d3012cb commit 3493c81

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/dma-buf/dma-fence.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/dma-fence.h>
1717
#include <linux/sched/signal.h>
1818
#include <linux/seq_file.h>
19+
#include <linux/dept_sdt.h>
1920

2021
#define CREATE_TRACE_POINTS
2122
#include <trace/events/dma_fence.h>
@@ -24,6 +25,7 @@ EXPORT_TRACEPOINT_SYMBOL(dma_fence_emit);
2425
EXPORT_TRACEPOINT_SYMBOL(dma_fence_enable_signal);
2526
EXPORT_TRACEPOINT_SYMBOL(dma_fence_signaled);
2627

28+
static DEFINE_DEPT_SDT(dma_fence_default_sdt);
2729
static DEFINE_SPINLOCK(dma_fence_stub_lock);
2830
static struct dma_fence dma_fence_stub;
2931

@@ -741,6 +743,7 @@ dma_fence_default_wait_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
741743
struct default_wait_cb *wait =
742744
container_of(cb, struct default_wait_cb, base);
743745

746+
sdt_event(&dma_fence_default_sdt);
744747
wake_up_state(wait->task, TASK_NORMAL);
745748
}
746749

@@ -789,6 +792,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
789792
__set_current_state(TASK_UNINTERRUPTIBLE);
790793
spin_unlock_irqrestore(fence->lock, flags);
791794

795+
sdt_wait(&dma_fence_default_sdt);
792796
ret = schedule_timeout(ret);
793797

794798
spin_lock_irqsave(fence->lock, flags);

0 commit comments

Comments
 (0)