From 5530f50e5fac5bb8bdeb4bee1cf77f2d22ca964f Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Wed, 23 May 2018 11:27:18 +0900 Subject: [PATCH] [COMMON] g2d: schedule the task directly on ioctl Task of g2d should be scheduled on process context due to power management, so every task are executed on workqueue. However, task on state that all fences are signaled on ioctl could be scheduled directly without queueing and it make remove the delay for workqueue. Change-Id: I72475096165237eccba8172e0c8a7d9e6e3c34c9 Signed-off-by: hyesoo.yu --- drivers/gpu/exynos/g2d/g2d_task.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/exynos/g2d/g2d_task.c b/drivers/gpu/exynos/g2d/g2d_task.c index c4b84976355f..ea5d9e2b53ad 100644 --- a/drivers/gpu/exynos/g2d/g2d_task.c +++ b/drivers/gpu/exynos/g2d/g2d_task.c @@ -278,6 +278,13 @@ void g2d_queuework_task(struct kref *kref) BUG_ON(failed); } +static void g2d_task_direct_schedule(struct kref *kref) +{ + struct g2d_task *task = container_of(kref, struct g2d_task, starter); + + g2d_schedule_task(task); +} + void g2d_start_task(struct g2d_task *task) { reinit_completion(&task->completion); @@ -290,7 +297,7 @@ void g2d_start_task(struct g2d_task *task) task->ktime_begin = ktime_get(); - kref_put(&task->starter, g2d_queuework_task); + kref_put(&task->starter, g2d_task_direct_schedule); } void g2d_fence_callback(struct dma_fence *fence, struct dma_fence_cb *cb) -- 2.20.1