From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Wrap -EIO send-vblank event for failed pageflip in spinlock Date: Tue, 9 Sep 2014 13:46:39 +0200 Message-ID: <20140909114639.GJ15520@phenom.ffwll.local> References: <1410105072-6141-1-git-send-email-chris@chris-wilson.co.uk> <20140907172116.GA19206@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id C617C89DFC for ; Tue, 9 Sep 2014 04:46:14 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id q5so1020699wiv.17 for ; Tue, 09 Sep 2014 04:46:13 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140907172116.GA19206@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 , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, Sep 07, 2014 at 06:21:16PM +0100, Chris Wilson wrote: > On Sun, Sep 07, 2014 at 04:51:12PM +0100, Chris Wilson wrote: > > drm_send_vblank_event() demands that we hold the event spinlock whilst > > calling it, so do so. > > > > Signed-off-by: Chris Wilson > > --- > > drivers/gpu/drm/i915/intel_display.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > index e2c7e3941465..4642a0e6f20c 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -9981,8 +9981,11 @@ free_work: > > if (ret == -EIO) { > > intel_crtc_wait_for_pending_flips(crtc); > > ret = intel_pipe_set_base(crtc, crtc->x, crtc->y, fb); > > - if (ret == 0 && event) > > + if (ret == 0 && event) { > > + spin_lock_irqsave(&dev->event_lock, flags); > > drm_send_vblank_event(dev, pipe, event); > > + spin_lock_irqsave(&dev->event_lock, flags); > > That's what you get for sending a trivial patch before even testing it. Fixed and applied, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch