[PATCH 22/25] dept: Apply timeout consideration to dma fence wait
Gwan-gyeong Mun
gwan-gyeong.mun at intel.com
Tue Jan 3 11:16:12 UTC 2023
From: Byungchul Park <byungchul.park at lge.com>
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to dma fence wait.
Signed-off-by: Byungchul Park <byungchul.park at lge.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
drivers/dma-buf/dma-fence.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index dd190cf49e7c..ee9b3501c907 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -783,7 +783,10 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
cb.task = current;
list_add(&cb.base.node, &fence->cb_list);
- sdt_might_sleep_strong(NULL);
+ if (timeout == MAX_SCHEDULE_TIMEOUT)
+ sdt_might_sleep_strong(NULL);
+ else
+ sdt_might_sleep_strong_timeout(NULL);
while (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && ret > 0) {
if (intr)
__set_current_state(TASK_INTERRUPTIBLE);
@@ -887,7 +890,10 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count,
}
}
- sdt_might_sleep_strong(NULL);
+ if (timeout == MAX_SCHEDULE_TIMEOUT)
+ sdt_might_sleep_strong(NULL);
+ else
+ sdt_might_sleep_strong_timeout(NULL);
while (ret > 0) {
if (intr)
set_current_state(TASK_INTERRUPTIBLE);
--
2.37.1
More information about the Intel-gfx-trybot
mailing list