[COMMON] g2d: change mode to secure before running
authorhyesoo.yu <hyesoo.yu@samsung.com>
Thu, 20 Jul 2017 00:51:13 +0000 (09:51 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:27:30 +0000 (14:27 +0900)
The existing has problem because the secure mode is not
enabled again when suspend resume happens.
Therefore the secure mode is changed immediately before
running to resolve the problem.

Change-Id: I4fe22d81fc241d99276d4eac5fc8b8db32777fb7
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_task.c

index b01ecbe5727c170a2debe483012862507aa5933a..1329fafba24df290de5dade952899ce02dca1a06 100644 (file)
@@ -201,6 +201,8 @@ void g2d_flush_all_tasks(struct g2d_device *g2d_dev)
 
 static void g2d_execute_task(struct g2d_device *g2d_dev, struct g2d_task *task)
 {
+       g2d_secure_enable();
+
        list_move_tail(&task->node, &g2d_dev->tasks_active);
        change_task_state_active(task);
 
@@ -284,8 +286,6 @@ static void g2d_schedule_task(struct g2d_task *task)
                goto err_clk;
        }
 
-       g2d_secure_enable();
-
        spin_lock_irqsave(&g2d_dev->lock_task, flags);
 
        list_add_tail(&task->node, &g2d_dev->tasks_prepared);