From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Kill intel_crtc->vbl_wait Date: Thu, 22 May 2014 22:21:33 +0200 Message-ID: <20140522202133.GD14357@phenom.ffwll.local> References: <1400773173-13813-1-git-send-email-ville.syrjala@linux.intel.com> <1400773173-13813-2-git-send-email-ville.syrjala@linux.intel.com> <20140522154903.GC12436@nuc-i3427.alporthouse.com> <20140522160534.GV14357@phenom.ffwll.local> <20140522193023.GD12436@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 431D46ECEC for ; Thu, 22 May 2014 13:21:39 -0700 (PDT) Received: by mail-ee0-f47.google.com with SMTP id c13so3041562eek.34 for ; Thu, 22 May 2014 13:21:38 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140522193023.GD12436@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 , Daniel Vetter , ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, May 22, 2014 at 08:30:23PM +0100, Chris Wilson wrote: > On Thu, May 22, 2014 at 06:05:34PM +0200, Daniel Vetter wrote: > > On Thu, May 22, 2014 at 04:49:03PM +0100, Chris Wilson wrote: > > > On Thu, May 22, 2014 at 06:39:33PM +0300, ville.syrjala@linux.intel.c= om wrote: > > > > From: Ville Syrj=E4l=E4 > > > > = > > > > Share the waitqueue that drm_irq uses when performing the vblank ev= ade > > > > trick for atomic pipe updates. > > > > = > > > > Suggested-by: Daniel Vetter > > > > Signed-off-by: Ville Syrj=E4l=E4 > > > > --- > > > > drivers/gpu/drm/i915/i915_irq.c | 25 ++++++------------------- > > > > drivers/gpu/drm/i915/intel_display.c | 2 -- > > > > drivers/gpu/drm/i915/intel_drv.h | 2 -- > > > > drivers/gpu/drm/i915/intel_sprite.c | 5 +++-- > > > > 4 files changed, 9 insertions(+), 25 deletions(-) > > > > = > > > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915= /i915_irq.c > > > > index 304f86a..5905a9d 100644 > > > > --- a/drivers/gpu/drm/i915/i915_irq.c > > > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > > > @@ -1724,19 +1724,6 @@ static void gen6_rps_irq_handler(struct drm_= i915_private *dev_priv, u32 pm_iir) > > > > } > > > > } > > > > = > > > > -static bool intel_pipe_handle_vblank(struct drm_device *dev, enum = pipe pipe) > > > > -{ > > > > - struct intel_crtc *crtc; > > > > - > > > > - if (!drm_handle_vblank(dev, pipe)) > > > > - return false; > > > > - > > > > - crtc =3D to_intel_crtc(intel_get_crtc_for_pipe(dev, pipe)); > > > > - wake_up(&crtc->vbl_wait); > > > > - > > > > - return true; > > > > -} > > > = > > > Can we keep this bare wrapper? It is quite useful for hooking in vbla= nk > > > checks - i.e. saves me having to reinrtoduce it. > > = > > Just smash them into drm_handle_vblank? > = > The ones I have in mind the pageflip stall checks and gpu-boost for > missed pageflips, i.e. driver specific. Hm yeah, the pageflip stall check should be in the vblank handler. And yeah boosting harder in the vblank handler if an outstanding pageflip hasn't been completed yet also makes sense. I'll augment Ville's patch v2 with these reasons and merge that one. -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch