From ed8d2e00f517f3be947f6b758e5a4072e90dcad9 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Tue, 10 Oct 2017 15:40:02 +0900 Subject: [PATCH] [COMMON] g2d: add limitations of H/W flow control 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 --- drivers/gpu/exynos/g2d/g2d_command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/exynos/g2d/g2d_command.c b/drivers/gpu/exynos/g2d/g2d_command.c index e18b020524b5..b03018e28886 100644 --- a/drivers/gpu/exynos/g2d/g2d_command.c +++ b/drivers/gpu/exynos/g2d/g2d_command.c @@ -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; -- 2.20.1