From: ddl Date: Sun, 13 Mar 2011 15:25:08 +0000 (+0800) Subject: camera:fix vip driver check vip memory enough is error X-Git-Tag: firefly_0821_release~10643 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0ff90545150871e07f37870497d5658cb949e58a;p=firefly-linux-kernel-4.4.55.git camera:fix vip driver check vip memory enough is error --- diff --git a/drivers/media/video/rk29_camera_oneframe.c b/drivers/media/video/rk29_camera_oneframe.c index 0ef78137a8ed..b538015303dc 100755 --- a/drivers/media/video/rk29_camera_oneframe.c +++ b/drivers/media/video/rk29_camera_oneframe.c @@ -1212,9 +1212,9 @@ static int rk29_camera_try_fmt(struct soc_camera_device *icd, } else if ((pix->width < usr_w) && (pix->height < usr_h)) { if (((usr_w>>1) < pix->width) && ((usr_h>>1) < pix->height)) { if (is_capture) { - vipmem_is_overflow = (PAGE_ALIGN((pix->width*pix->height*icd->current_fmt->depth+7)>>3) <= pcdev->vipmem_size); + vipmem_is_overflow = (PAGE_ALIGN((pix->width*pix->height*icd->current_fmt->depth+7)>>3) > pcdev->vipmem_size); } else { - vipmem_is_overflow = (PAGE_ALIGN((pix->width*pix->height*icd->current_fmt->depth+7)>>3)*4 <= pcdev->vipmem_size); + vipmem_is_overflow = (PAGE_ALIGN((pix->width*pix->height*icd->current_fmt->depth+7)>>3)*4 > pcdev->vipmem_size); } if (vipmem_is_overflow == false) { pix->width = usr_w;