[COMMOn] g2d: enable secure mode when self protection
authorhyesoo.yu <hyesoo.yu@samsung.com>
Fri, 1 Jun 2018 12:11:06 +0000 (21:11 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:37 +0000 (14:39 +0900)
G2D always enable the secure mode before the job
is executed to enable the firewall regardless of
self protection.

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

index 61ca6b9373775289a898349998c3fff965550464..80d6bf3d38f7d0ceac7c372de8d48e6ef2b4c2c1 100644 (file)
 #include "g2d_debug.h"
 #include "g2d_secure.h"
 
-static void g2d_secure_enable(bool self_prot)
+static void g2d_secure_enable(void)
 {
-       if (!self_prot && IS_ENABLED(CONFIG_EXYNOS_CONTENT_PATH_PROTECTION))
+       if (IS_ENABLED(CONFIG_EXYNOS_CONTENT_PATH_PROTECTION))
                exynos_smc(SMC_PROTECTION_SET, 0, G2D_ALWAYS_S, 1);
 }
 
-static void g2d_secure_disable(bool self_prot)
+static void g2d_secure_disable(void)
 {
-       if (!self_prot && IS_ENABLED(CONFIG_EXYNOS_CONTENT_PATH_PROTECTION))
+       if (IS_ENABLED(CONFIG_EXYNOS_CONTENT_PATH_PROTECTION))
                exynos_smc(SMC_PROTECTION_SET, 0, G2D_ALWAYS_S, 0);
 }
 
@@ -118,7 +118,7 @@ static void g2d_finish_task(struct g2d_device *g2d_dev,
        g2d_stamp_task(task, G2D_STAMP_STATE_DONE,
                (int)ktime_us_delta(task->ktime_end, task->ktime_begin));
 
-       g2d_secure_disable(g2d_dev->caps & G2D_DEVICE_CAPS_SELF_PROTECTION);
+       g2d_secure_disable();
 
        clk_disable(g2d_dev->clock);
 
@@ -166,7 +166,7 @@ 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(g2d_dev->caps & G2D_DEVICE_CAPS_SELF_PROTECTION);
+       g2d_secure_enable();
 
        list_move_tail(&task->node, &g2d_dev->tasks_active);
        change_task_state_active(task);