From: Boram Park Date: Wed, 16 Aug 2017 05:06:44 +0000 (+0900) Subject: vblank: correct the client request time X-Git-Tag: submit/tizen_3.0/20170816.052416~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37d61fb89d1ac9c1a8a7081a7dd9883c6c221eaa;p=platform%2Fcore%2Fuifw%2Flibtdm.git vblank: correct the client request time The client request time SHOULD be bigger than the last vblank time. To make sure it, we forcely set the last vblank time to the client request time when the req_time is smaller than the last_time. Change-Id: Ib1dbec907fa04693d6df05b8260e300f6032563e --- diff --git a/src/tdm_vblank.c b/src/tdm_vblank.c index 88a50849..0cff1340 100644 --- a/src/tdm_vblank.c +++ b/src/tdm_vblank.c @@ -818,6 +818,10 @@ _tdm_vblank_wait_HW(tdm_vblank_wait_info *wait_info) last = private_vblank->last_time; req = wait_info->req_time; + /* make sure that req time is bigger than last. */ + if (req < last) + req = last; + skip = (unsigned int)((req - last) / private_vblank->vblank_gap + TDM_TIME_MARGIN); prev = last + private_vblank->vblank_gap * skip; @@ -965,6 +969,10 @@ _tdm_vblank_wait_SW(tdm_vblank_wait_info *wait_info) last = private_vblank->last_time; req = wait_info->req_time; + /* make sure that req time is bigger than last. */ + if (req < last) + req = last; + skip = (unsigned int)((req - last) / private_vblank->vblank_gap + TDM_TIME_MARGIN); prev = last + private_vblank->vblank_gap * skip;