[COMMON] g2d: schedule the task directly on ioctl
authorhyesoo.yu <hyesoo.yu@samsung.com>
Wed, 23 May 2018 02:27:18 +0000 (11:27 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:35 +0000 (14:39 +0900)
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 <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_task.c

index c4b84976355f49ca4165578e0044221097e3dc40..ea5d9e2b53ad938ce44cf11d392150bfb0c268e8 100644 (file)
@@ -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)