From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 2/2] drm/i915: Don't BUG_ON in i915_gem_obj_offset Date: Tue, 24 Jun 2014 18:30:34 -0700 Message-ID: <20140625013033.GA10886@bwidawsk.net> References: <1403037278-7523-1-git-send-email-daniel.vetter@ffwll.ch> <1403037278-7523-2-git-send-email-daniel.vetter@ffwll.ch> <20140617220446.GW5821@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id CE84F6E138 for ; Tue, 24 Jun 2014 18:30:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140617220446.GW5821@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 List-Id: intel-gfx@lists.freedesktop.org On Wed, Jun 18, 2014 at 12:04:46AM +0200, Daniel Vetter wrote: > On Tue, Jun 17, 2014 at 10:34:38PM +0200, Daniel Vetter wrote: > > A WARN_ON is perfectly fine. > > > > The BUG in here seems to be the cause behind hard-hangs when I cat the > > i915_gem_pageflip debugfs file (which calls this from an irq > > spinlock). But only while running a full igt run after a while. I > > still need to root cause the underlying issue. > > > > I'll also start reject patches which add new BUG_ON but don't come > > with a really good justification for it. The general rule really > > should be to just WARN and hope the driver survives for long enough. > > > > Signed-off-by: Daniel Vetter > > Both patches merged, this one improved per Chris' suggestions on irc. > -Daniel > Hey, here's an idea. How about we root cause bugs instead of making blanket statements about the validity of real assertions? If the callers of ggtt_offset are calling it on unbound objects, it's a violation of the design. And in the other cases, it's a real bug. I'd NAK this patch if it wasn't already merged, and my NAK meant something. -- Ben Widawsky, Intel Open Source Technology Center