From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: FBC patchset Date: Fri, 08 Jul 2011 23:08:01 +0100 Message-ID: References: <1310124163-12177-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 83D97A02BA for ; Fri, 8 Jul 2011 15:08:06 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Keith Packard , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 08 Jul 2011 14:28:35 -0700, Keith Packard wrote: > On Fri, 08 Jul 2011 21:19:29 +0100, Chris Wilson wrote: > > On Fri, 08 Jul 2011 13:00:09 -0700, Keith Packard wrote: > > > On Fri, 08 Jul 2011 20:43:47 +0100, Chris Wilson wrote: > > During intel_crtc_mode_set() and friends we only call into > > intel_update_fbc() which just clears the FBC enabled bit and schedules a > > delayed task to do the rest, if required. > > Does a further call into intel_crtc_mode_set push out the delayed task > so that it now occurs at least 50ms after the later call? That seems > useful, although it might not be necessary. Yes, each call to intel_enable_fbc() resets the timer on the task, delaying it further. The original purpose of this was to make sure that the task did not kick off whilst the application was still page-flipping, and it works equally well in the case of multiple calls during modeset or very quick changes. > We could, of course, make sure that a certain number of vblank intervals > have passed instead of using a fixed timeout. Or we could compute the > vblank interval from the mode and then just make sure the timeout used > is sufficient. Or we could just use 100ms and assume that no-one will > ever set a mode of less than 10Hz. We already do make the assumption that 20Hz is the minimum refresh anybody is likely to set, as a fallback for vblank timeouts. Maybe it is time we formalized that assumption, #define VBLANK_TIMEOUT_MS 50, or static inline int intel_get_vblank_timeout(dev, pipe) { return 50; }? -Chris -- Chris Wilson, Intel Open Source Technology Centre