video: rockchip: rga3: RGA2 scale mode add default config

When the task is not submitted from the librga im2d API, the scale mode
may be default, so additional default configuration is required.

Change-Id: Ie5966308ad1af09a6a7eec489126670dc1085dac
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
This commit is contained in:
Yu Qiaowei
2025-05-26 15:45:28 +08:00
committed by Tao Huang
parent b7b90f1ca9
commit ff148eedd4

View File

@@ -439,11 +439,20 @@ static void RGA2_set_reg_src_info(u8 *base, struct rga2_req *msg)
case RGA_INTERP_LINEAR:
vsp_scale_mode = 1;
break;
case RGA_INTERP_DEFAULT:
if (((scale_w_flag == RGA2_SCALE_DOWN) && (dw < RGA2_VSP_BICUBIC_LIMIT)) ||
(sw < RGA2_VSP_BICUBIC_LIMIT)) {
vsp_scale_mode = 0x0;
} else {
vsp_scale_mode = 0x1;
}
break;
}
} else if (scale_h_flag == RGA2_SCALE_DOWN) {
switch (msg->interp.verti) {
case RGA_INTERP_AVERAGE:
case RGA_INTERP_DEFAULT:
vsd_scale_mode = 0;
break;
case RGA_INTERP_LINEAR:
@@ -456,6 +465,7 @@ static void RGA2_set_reg_src_info(u8 *base, struct rga2_req *msg)
if (scale_w_flag == RGA2_SCALE_UP) {
switch (msg->interp.horiz) {
case RGA_INTERP_BICUBIC:
case RGA_INTERP_DEFAULT:
hsp_scale_mode = 0;
break;
case RGA_INTERP_LINEAR:
@@ -465,6 +475,7 @@ static void RGA2_set_reg_src_info(u8 *base, struct rga2_req *msg)
} else if (scale_w_flag == RGA2_SCALE_DOWN) {
switch (msg->interp.horiz) {
case RGA_INTERP_AVERAGE:
case RGA_INTERP_DEFAULT:
hsd_scale_mode = 0;
break;
case RGA_INTERP_LINEAR: