[COMMON] g2d: set CAPTURE_IDX for every tasks
authorhyesoo.yu <hyesoo.yu@samsung.com>
Mon, 28 Aug 2017 04:32:45 +0000 (13:32 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:27:45 +0000 (14:27 +0900)
Even if it is a normal task, command list must
explicitly be stated in CAPTURE_IDX that it is not
a hwfc task.

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

index 0f6cb3fb376bc9611c7c5729cead02fbe8910e7a..a65ae54fe19517e0973167cb0149f31dfccceea4 100644 (file)
@@ -118,8 +118,10 @@ static void g2d_set_hwfc_commands(struct g2d_task *task)
        struct g2d_reg *regs = (struct g2d_reg *)page_address(task->cmd_page);
 
        regs[task->cmd_count].offset = G2D_HWFC_CAPTURE_IDX_REG;
-       regs[task->cmd_count].value =
-                       G2D_HWFC_CAPTURE_HWFC_JOB | task->job_id;
+       regs[task->cmd_count].value = IS_HWFC(task->flags) ?
+                       G2D_HWFC_CAPTURE_HWFC_JOB : 0;
+       regs[task->cmd_count].value |= task->job_id;
+
        task->cmd_count++;
 }
 
@@ -156,8 +158,7 @@ void g2d_complete_commands(struct g2d_task *task)
 
        g2d_set_taskctl_commands(task);
 
-       if (IS_HWFC(task->flags))
-               g2d_set_hwfc_commands(task);
+       g2d_set_hwfc_commands(task);
 
        g2d_set_start_commands(task);
 }