From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Murthy, Arun R" Subject: Re: [PATCH v3] drm/i915: use hrtimer in wait for vblank Date: Tue, 25 Mar 2014 14:31:24 +0530 Message-ID: <533145E4.6060300@gmail.com> References: <1395727142-5423-1-git-send-email-arun.r.murthy@intel.com> <20140325073029.GV4366@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BDF66E0A0 for ; Tue, 25 Mar 2014 02:02:24 -0700 (PDT) In-Reply-To: <20140325073029.GV4366@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Arun R Murthy , daniel.vetter@ffwll.ch, jani.nikula@linux.intel.com, intel-gfx@lists.freedesktop.org, airlied@linux.ie List-Id: intel-gfx@lists.freedesktop.org On Tuesday 25 March 2014 01:00 PM, Chris Wilson wrote: > On Tue, Mar 25, 2014 at 11:29:02AM +0530, Arun R Murthy wrote: >> In wait for vblank use usleep_range, which will use hrtimers instead of >> msleep. Using msleep(1~20) there are more chances of sleeping for 20ms. >> Using usleep_range uses hrtimers and hence are precise, worst case will >> trigger an interrupt at the higher/max timeout. >> >> Change-log: On replacing msleep(1) with usleep_range(1000, 2000) we have >> noticed the time consumed by wait for vblank is ~4ms to ~17ms. >> >> Change-Id: I6672e5697b01987a6d069ab06e76d97287b1f7ae >> Signed-off-by: Arun R Murthy > No. I feel strongly that we do not want more wait_for_X() with strange > semantics. > http://sweng.the-davies.net/Home/rustys-api-design-manifesto Will revert this additional wait_for_X. Will update the existing _wait_for as per the kernel documentation for timers. Thanks and Regards, Arun R Murthy ------------------