From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 03/14] drm/i915: implement ironlake_wait_for_vblank Date: Tue, 8 May 2012 14:44:24 +0200 Message-ID: <20120508124424.GJ4802@phenom.ffwll.local> References: <1336010154-2946-1-git-send-email-przanoni@gmail.com> <1336162707-3504-1-git-send-email-przanoni@gmail.com> <1336162707-3504-2-git-send-email-przanoni@gmail.com> <20120508115519.GD4802@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ey0-f177.google.com (mail-ey0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BDBF9E905 for ; Tue, 8 May 2012 05:43:16 -0700 (PDT) Received: by eaak13 with SMTP id k13so1765004eaa.36 for ; Tue, 08 May 2012 05:43:15 -0700 (PDT) Content-Disposition: inline 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: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Tue, May 08, 2012 at 09:34:18AM -0300, Paulo Zanoni wrote: > 2012/5/8 Daniel Vetter : > > On Fri, May 04, 2012 at 05:18:15PM -0300, Paulo Zanoni wrote: > >> From: Paulo Zanoni > >> > >> intel_wait_for_vblank uses PIPESTAT, which does not exist on Ironlake > >> and newer, so now we use PIPEFRAME. > >> > >> There's also a check to see if the pipe is stopped. > > > > Hm, why do we have this check here? The other wait_for_vblank > > implementation doesn't bother with this. And if we call wait_for_vblank on > > a disabled pipe, that's a bug imo. > > -Daniel > > Because not checking for a stopped pipe adds a useless 50ms delay > (it's the wait_for() timeout). We're currently calling > wait_for_vblank() on disabled pipes. > - Maybe I should add a DRM_DEBUG_KMS message there and then start > fixing these cases? > - Maybe I should move the check to intel_wait_for_vblank (including > the debug message)? Either is fine, the thing that irked was just that now the semantics of wait_for_vblank changed depending upon which chipset it runs on: - for ilk, it will immediately return if the pipe is off - for pre-ilk, it will time out for 50 ms, complain with a debug message and then return. I'm leaning towards fixing up the callers to not call wait_for_vblank when the pipe is off (and ditching the check from the ilk wait_for_vblank). -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48