From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [PATCH] drm/i915: Fix irq enable tracking in driver load Date: Mon, 08 Sep 2014 10:03:24 +0300 Message-ID: <871trmzj9f.fsf@intel.com> References: <1409127094-5843-1-git-send-email-daniel.vetter@ffwll.ch> <87oauvfxmd.fsf@intel.com> <20140904130501.GL15520@phenom.ffwll.local> <87tx4nec37.fsf@intel.com> <20140904135936.GU15520@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 712F06E20F for ; Mon, 8 Sep 2014 00:03:26 -0700 (PDT) In-Reply-To: <20140904135936.GU15520@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: Daniel Vetter , Intel Graphics Development , Oliver Hartkopp List-Id: intel-gfx@lists.freedesktop.org On Thu, 04 Sep 2014, Daniel Vetter wrote: > On Thu, Sep 04, 2014 at 04:42:36PM +0300, Jani Nikula wrote: >> On Thu, 04 Sep 2014, Daniel Vetter wrote: >> > On Thu, Sep 04, 2014 at 02:12:10PM +0300, Jani Nikula wrote: >> >> On Wed, 27 Aug 2014, Daniel Vetter wrote: >> >> > A bunch of warnings fire on some ->irq_postinstall hooks since those >> >> > can enable interrupts (e.g. rps interrupts). And then our ordering >> >> > self-checks fire and complain. >> >> > >> >> > To fix that set the tracking boolen before enabling the irqs witho >> >> > drm_irq_install. Quoting the discussion with Jesse why that's safe: >> >> >> >> Yi Sun's testing result needs to be addressed one way or another before >> >> merging this: >> >> >> >> http://mid.gmane.org/D9F66AA509623343B6A9A3D4502D5A52112B0676@SHSMSX101.ccr.corp.intel.com >> > >> > Shrug it off as an unstable test result. Both mine and Jesse's patch >> > really only change the logic we use to WARN about interrupt state. We >> > don't use pm._irqs_disabled for anything else at all. >> >> Okay, so this is a PITA to review, but at least >> ironlake_enable_display_irq will behave differently during >> drm_irq_install because of this patch. > > Oops, I've somehow completely missed the early return in there. That means > we actually break the ironlake rps setup done in postinstall without any > of these patches. I've mixed this up with the pipestat check I've done > where I just WARN, but don't bail out. > > tbh not sure why we bail out, at worst we'll get a few unclaimed register > warnings. > > The only other place is if we get an interrupt right away, but that means > the preinstall hook has a bug somewhere. So the only place where behaviour > chances is still only ironlake, so still no explanation why hsw/bdw > suddenly start to fall over all together. Pushed to drm-intel-fixes. Thanks for the patch, testing and review. BR, Jani. > -Daniel > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- Jani Nikula, Intel Open Source Technology Center