[COMMON] g2d: add limitations of H/W flow control
authorhyesoo.yu <hyesoo.yu@samsung.com>
Tue, 10 Oct 2017 06:40:02 +0000 (15:40 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:15 +0000 (20:22 +0300)
When G2D performs a H/W Flow Control job, following
limitations are observed,

1. Does not support AFBC format is not supported
as the destination format
2. Z-Order of tile order is not supported

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

index e18b020524b5fedf64bc5947367fca64fa061144..b03018e28886709e0f8e3e0905b6eef7d9503388 100644 (file)
@@ -95,7 +95,8 @@ static void g2d_set_taskctl_commands(struct g2d_task *task)
                regs[task->cmd_count].offset = G2D_TILE_DIRECTION_ORDER_REG;
                regs[task->cmd_count].value = G2D_TILE_DIRECTION_VERTICAL;
 
-               if (IS_YUV420(mode) || IS_YUV422_2P(mode))
+               if (!IS_HWFC(task->flags) &&
+                   (IS_YUV420(mode) || IS_YUV422_2P(mode)))
                        regs[task->cmd_count].value |=
                                        G2D_TILE_DIRECTION_ZORDER;
 
@@ -629,7 +630,7 @@ static bool g2d_validate_image_format(struct g2d_device *g2d_dev,
        }
 
        if (IS_HWFC(task->flags)) {
-               if (IS_AFBC(mode) || IS_UORDER(mode)) {
+               if ((dst && IS_AFBC(mode)) || IS_UORDER(mode)) {
                        dev_err(dev, "%s: Invalid HWFC format with %s\n",
                                __func__, IS_AFBC(mode) ? "AFBC" : "UORDER");
                        return false;