mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
video: rockchip: rga3: Fix wrong scaling check
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com> Change-Id: I3159ef8c8a7a425e0106666477b0b5eaa6131d7d
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user