Patchwork [Lucid,SRU] drm/i915: Remove BUG_ON from i915_gem_evict_something

login
register
mail settings
Submitter Seth Forshee
Date Aug. 23, 2011, 7 p.m.
Message ID <1314126026-6318-1-git-send-email-seth.forshee@canonical.com>
Download mbox | patch
Permalink /patch/111170/
State New
Headers show

Comments

Seth Forshee - Aug. 23, 2011, 7 p.m.
BugLink: http://bugs.launchpad.net/bugs/828550

According to Chris Wilson this BUG_ON was just paranoia and never
something the kernel should explode on. He later removed it in
upstream commit e39a01501b228e1be2037d5bddccae2a820af902. So let's
just remove it.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/gpu/drm/i915/i915_gem_evict.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
Herton Ronaldo Krzesinski - Aug. 23, 2011, 7:08 p.m.
On Tue, Aug 23, 2011 at 02:00:26PM -0500, Seth Forshee wrote:
> BugLink: http://bugs.launchpad.net/bugs/828550
> 
> According to Chris Wilson this BUG_ON was just paranoia and never
> something the kernel should explode on. He later removed it in
> upstream commit e39a01501b228e1be2037d5bddccae2a820af902. So let's
> just remove it.
> 
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_evict.c |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
> index 9c1ec78..c4c6b6f 100644
> --- a/drivers/gpu/drm/i915/i915_gem_evict.c
> +++ b/drivers/gpu/drm/i915/i915_gem_evict.c
> @@ -175,13 +175,6 @@ found:
>  		list_del_init(&obj_priv->evict_list);
>  	}
>  
> -	/* The just created free hole should be on the top of the free stack
> -	 * maintained by drm_mm, so this BUG_ON actually executes in O(1).
> -	 * Furthermore all accessed data has just recently been used, so it
> -	 * should be really fast, too. */
> -	BUG_ON(!drm_mm_search_free(&dev_priv->mm.gtt_space, min_size,
> -				   alignment, 0));
> -
>  	return 0;
>  }
>  
> -- 
> 1.7.4.1
> 

Tested ok by reporter, looks ok, fixes regression in -proposed:

Acked-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>

> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Tim Gardner - Aug. 23, 2011, 7:39 p.m.

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index 9c1ec78..c4c6b6f 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -175,13 +175,6 @@  found:
 		list_del_init(&obj_priv->evict_list);
 	}
 
-	/* The just created free hole should be on the top of the free stack
-	 * maintained by drm_mm, so this BUG_ON actually executes in O(1).
-	 * Furthermore all accessed data has just recently been used, so it
-	 * should be really fast, too. */
-	BUG_ON(!drm_mm_search_free(&dev_priv->mm.gtt_space, min_size,
-				   alignment, 0));
-
 	return 0;
 }