Re: [PATCH 2/2] drm/i915: Don't BUG_ON in i915_gem_obj_offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <daniel.vetter@xxxxxxxx>

Both patches merged, this one improved per Chris' suggestions on irc.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 35b5027ba5a4..841e9cd38dc1 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5101,7 +5101,7 @@ unsigned long i915_gem_obj_offset(struct drm_i915_gem_object *o,
>  	    vm == &dev_priv->mm.aliasing_ppgtt->base)
>  		vm = &dev_priv->gtt.base;
>  
> -	BUG_ON(list_empty(&o->vma_list));
> +	WARN_ON(list_empty(&o->vma_list));
>  	list_for_each_entry(vma, &o->vma_list, vma_link) {
>  		if (vma->vm == vm)
>  			return vma->node.start;
> -- 
> 1.8.1.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux