[Intel-gfx] [PATCH 07/17] drm/i915: Drop redundant GGTT rebinding

2015-04-14 Thread Daniel Vetter
Since

commit bf3d149b25f67f241735b91a56b7f070bc0a5407
Author: Daniel Vetter daniel.vet...@ffwll.ch
Date:   Fri Feb 14 14:01:12 2014 +0100

drm/i915: split PIN_GLOBAL out from PIN_MAPPABLE

i915_gem_obj_ggtt_pin always binds into the ggtt, but I've forgotten
to remove the now redundant additional bind call later on. Fix this
up.

Signed-off-by: Daniel Vetter daniel.vet...@intel.com
---
 drivers/gpu/drm/i915/i915_gem_context.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c 
b/drivers/gpu/drm/i915/i915_gem_context.c
index e4c57a3981b3..dd5bff657c9c 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -638,7 +638,6 @@ static int do_switch(struct intel_engine_cs *ring,
struct intel_context *from = ring-last_context;
u32 hw_flags = 0;
bool uninitialized = false;
-   struct i915_vma *vma;
int ret, i;
 
if (from != NULL  ring == dev_priv-ring[RCS]) {
@@ -696,16 +695,6 @@ static int do_switch(struct intel_engine_cs *ring,
if (ret)
goto unpin_out;
 
-   vma = i915_gem_obj_to_ggtt(to-legacy_hw_ctx.rcs_state);
-   if (!(vma-bound  GLOBAL_BIND)) {
-   ret = i915_vma_bind(vma,
-   to-legacy_hw_ctx.rcs_state-cache_level,
-   GLOBAL_BIND);
-   /* This shouldn't ever fail. */
-   if (WARN_ONCE(ret, GGTT context bind failed!))
-   goto unpin_out;
-   }
-
if (!to-legacy_hw_ctx.initialized) {
hw_flags |= MI_RESTORE_INHIBIT;
/* NB: If we inhibit the restore, the context is not allowed to
-- 
2.1.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 07/17] drm/i915: Drop redundant GGTT rebinding

2015-04-14 Thread Chris Wilson
On Tue, Apr 14, 2015 at 05:35:17PM +0200, Daniel Vetter wrote:
 Since
 
 commit bf3d149b25f67f241735b91a56b7f070bc0a5407
 Author: Daniel Vetter daniel.vet...@ffwll.ch
 Date:   Fri Feb 14 14:01:12 2014 +0100
 
 drm/i915: split PIN_GLOBAL out from PIN_MAPPABLE
 
 i915_gem_obj_ggtt_pin always binds into the ggtt, but I've forgotten
 to remove the now redundant additional bind call later on. Fix this
 up.
 
 Signed-off-by: Daniel Vetter daniel.vet...@intel.com
Reviewed-by: Chris Wilson ch...@chris-wilson.co.uk
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx