From c398683fd37f12aa36bec76eb16310bb70441163 Mon Sep 17 00:00:00 2001 From: Yu Qiaowei Date: Thu, 23 Dec 2021 20:13:11 +0800 Subject: [PATCH] video: rockchip: rga2: Fix rotating mmu interruption error. Since the ARGB format was added without processing the address offset during rotation, the address offset of mmu was calculated incorrectly. Signed-off-by: Yu Qiaowei Change-Id: I6bddd21b50bf60cadf493e73cff10c18210c375c --- drivers/video/rockchip/rga2/rga2_reg_info.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rga2/rga2_reg_info.c b/drivers/video/rockchip/rga2/rga2_reg_info.c index d66df54ee595..a6c154989dd1 100644 --- a/drivers/video/rockchip/rga2/rga2_reg_info.c +++ b/drivers/video/rockchip/rga2/rga2_reg_info.c @@ -594,7 +594,9 @@ static void RGA2_set_reg_dst_info(u8 *base, struct rga2_req *msg) /* Warning */ line_width_real = dst_fmt_y4_en ? ((msg->dst.act_w) >>1) : msg->dst.act_w; - if (msg->dst.format < 0x18) { + if (msg->dst.format < 0x18 || + (msg->dst.format >= RGA2_FORMAT_ARGB_8888 && + msg->dst.format <= RGA2_FORMAT_ABGR_4444)) { /* 270 degree & Mirror V*/ y_ld_addr = yrgb_addr + (msg->dst.act_h - 1) * (d_stride); /* 90 degree & Mirror H */