From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 02/11] drm/i915: Clarify event_lock locking, irq&mixed context Date: Mon, 29 Sep 2014 14:20:12 +0200 Message-ID: <20140929122012.GE4109@phenom.ffwll.local> References: <1410785732-18553-1-git-send-email-daniel.vetter@ffwll.ch> <1410785732-18553-3-git-send-email-daniel.vetter@ffwll.ch> <5428FA2B.8030005@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by gabe.freedesktop.org (Postfix) with ESMTP id BC8FB89E7C for ; Mon, 29 Sep 2014 05:20:15 -0700 (PDT) Received: by mail-we0-f174.google.com with SMTP id w62so12439735wes.33 for ; Mon, 29 Sep 2014 05:20:14 -0700 (PDT) Content-Disposition: inline In-Reply-To: <5428FA2B.8030005@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jike Song Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Sep 29, 2014 at 02:20:27PM +0800, Jike Song wrote: > On 09/15/2014 08:55 PM, Daniel Vetter wrote: > >Now we tackle the functions also called from interrupt handlers. > > > >- intel_check_page_flip is exclusively called from irq handlers, so a > > plain spin_lock is all we need. In i915_irq.c we have the convention > > to give all such functions an _irq_handler postfix, but that would > > look strange and als be a bit a misleading name. I've opted for a > > WARN_ON(!in_irq()) instead. > > Hi Daniel, > > Is it possible to use in_interrupt() instead? Sorry to tell that, in > our iGVT-g implementation, the host i915 irq handler needs to be called > in a non hardirq driven context. i.e. a tasklet or workqueue. Hm, why that? Depending upon how you do this you might break a lot of the interrupt related locking we have ... This is a crucial integration issue, which patch does that change? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch