From: Mark Yao Date: Wed, 23 Dec 2015 08:22:21 +0000 (+0800) Subject: video: rk_fb: widen out var config limit X-Git-Tag: firefly_0821_release~3496 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c991a1a4ee725c3c591a71623ff96844028109e6;p=firefly-linux-kernel-4.4.55.git video: rk_fb: widen out var config limit All layers allow out of right side and bottom side. And hardware cursor want to support outside of right and bottom. Change-Id: I27d64b2e12326fbad436f291a9fb5092538428f9 Signed-off-by: Mark Yao --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 5836049d7e0d..7c0462c18cfa 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -1938,9 +1938,9 @@ static int rk_fb_check_config_var(struct rk_fb_area_par *area_par, return -EINVAL; } - if ((area_par->xpos + area_par->xsize > screen->mode.xres) || - (area_par->ypos + area_par->ysize > screen->mode.yres) || - (area_par->xsize <= 0) || (area_par->ysize <= 0)) { + if ((area_par->xpos >= screen->mode.xres) || + (area_par->ypos >= screen->mode.yres) || + ((area_par->xsize <= 0) || (area_par->ysize <= 0))) { pr_warn("check config var fail 1:\n" "xpos=%d,xsize=%d,xres=%d\n" "ypos=%d,ysize=%d,yres=%d\n",