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;
}
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;