diff --git a/drivers/video/rockchip/rga3/rga3_reg_info.c b/drivers/video/rockchip/rga3/rga3_reg_info.c index 5fa1bf906f7c..64e1e2af75c2 100644 --- a/drivers/video/rockchip/rga3/rga3_reg_info.c +++ b/drivers/video/rockchip/rga3/rga3_reg_info.c @@ -1635,11 +1635,11 @@ static int rga3_scale_check(const struct rga3_req *req) win0_daw = req->win0.dst_act_w; win0_dah = req->win0.dst_act_h; - if (((win0_saw >> 3) >= win0_daw) || ((win0_sah >> 3) >= win0_dah)) { + if (((win0_saw >> 3) > win0_daw) || ((win0_sah >> 3) > win0_dah)) { pr_info("win0 unsupported to scaling less than 1/8 times.\n"); return -EINVAL; } - if (((win0_daw >> 3) >= win0_saw) || ((win0_dah >> 3) >= win0_sah)) { + if (((win0_daw >> 3) > win0_saw) || ((win0_dah >> 3) > win0_sah)) { pr_info("win0 unsupported to scaling more than 8 times.\n"); return -EINVAL; } @@ -1650,11 +1650,11 @@ static int rga3_scale_check(const struct rga3_req *req) win1_daw = req->win1.dst_act_w; win1_dah = req->win1.dst_act_h; - if (((win1_saw >> 3) >= win1_daw) || ((win1_sah >> 3) >= win1_dah)) { + if (((win1_saw >> 3) > win1_daw) || ((win1_sah >> 3) > win1_dah)) { pr_info("win1 unsupported to scaling less than 1/8 times.\n"); return -EINVAL; } - if (((win1_daw >> 3) >= win1_saw) || ((win1_dah >> 3) >= win1_sah)) { + if (((win1_daw >> 3) > win1_saw) || ((win1_dah >> 3) > win1_sah)) { pr_info("win1 unsupported to scaling more than 8 times.\n"); return -EINVAL; }