diff --git a/drivers/video/rockchip/rga3/rga2_reg_info.c b/drivers/video/rockchip/rga3/rga2_reg_info.c index 3cb77f157156..090e299bcbbe 100644 --- a/drivers/video/rockchip/rga3/rga2_reg_info.c +++ b/drivers/video/rockchip/rga3/rga2_reg_info.c @@ -1150,7 +1150,9 @@ static void RGA2_set_reg_dst_info(u8 *base, struct rga2_req *msg) 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 */