summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2014-04-16 09:01:23 -0700
committerBen Widawsky <benjamin.widawsky@intel.com>2014-06-20 17:05:01 -0700
commit543b8de52b354e7e423e637d32f9af702e951791 (patch)
tree96f56dadeced739d28297ef6ceb1d80ac93416b6
parentc77f8cfbe4680989329dde7624e3f849bd9802a2 (diff)
TESTME: Either drop the last patch or fix it.
I was getting unexplainable hangs with the last patch, even though I think it should be correct. As the subject says, should this ever get merged, it needs to be coordinated with the patch this reverts. Revert "drm/i915/bdw: Optimize PDP loads" This reverts commit 64053129b5cbd3a5f87dab27d026c17efbdf0387.
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c20
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.h1
2 files changed, 0 insertions, 21 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 180a9ba53025..65900926de3f 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -445,20 +445,8 @@ static int gen8_mm_switch(struct i915_hw_ppgtt *ppgtt,
struct intel_engine_cs *ring,
bool synchronous)
{
- struct drm_i915_private *dev_priv = ring->dev->dev_private;
int i, ret;
- /* The RCS ring gets reloaded by the hardware context state. So we only
- * need to actually reload if one of the page directory pointer have
- * changed, or it's !RCS
- *
- * Aliasing PPGTT remains special, as we do not track it's
- * reloading needs.
- */
- if (ppgtt != dev_priv->mm.aliasing_ppgtt &&
- ring->id == RCS && !ppgtt->pdp.needs_reload)
- return 0;
-
for (i = GEN8_LEGACY_PDPES - 1; i >= 0; i--) {
struct i915_pagedir *pd = ppgtt->pdp.pagedirs[i];
dma_addr_t addr = pd ? pd->daddr : ppgtt->scratch_pt->daddr;
@@ -469,9 +457,6 @@ static int gen8_mm_switch(struct i915_hw_ppgtt *ppgtt,
return ret;
}
-
- ppgtt->pdp.needs_reload = 0;
-
return 0;
}
@@ -673,7 +658,6 @@ static void gen8_teardown_va_range(struct i915_address_space *vm,
free_pd_single(pd, vm->dev);
ppgtt->pdp.pagedirs[pdpe] = NULL;
WARN_ON(!test_and_clear_bit(pdpe, ppgtt->pdp.used_pdpes));
- ppgtt->pdp.needs_reload = 1;
}
}
}
@@ -924,8 +908,6 @@ static int gen8_alloc_va_range(struct i915_address_space *vm,
}
set_bit(pdpe, ppgtt->pdp.used_pdpes);
- if (test_and_set_bit(pdpe, ppgtt->pdp.used_pdpes))
- ppgtt->pdp.needs_reload = 1;
gen8_map_pagetable_range(pd, start, length, ppgtt->base.dev);
}
@@ -962,8 +944,6 @@ static int gen8_ppgtt_init_common(struct i915_hw_ppgtt *ppgtt, uint64_t size)
ppgtt->switch_mm = gen8_mm_switch;
ppgtt->base.insert_entries = gen8_ppgtt_insert_entries;
- ppgtt->pdp.needs_reload = 1;
-
ppgtt->scratch_pd = alloc_pt_scratch(ppgtt->base.dev);
if (IS_ERR(ppgtt->scratch_pd))
return PTR_ERR(ppgtt->scratch_pd);
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index 6fdeb9896dc7..5d4bd3e83eec 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -199,7 +199,6 @@ struct i915_pagedirpo {
/* struct page *page; */
DECLARE_BITMAP(used_pdpes, GEN8_LEGACY_PDPES);
struct i915_pagedir *pagedirs[GEN8_LEGACY_PDPES];
- unsigned needs_reload:1;
};
struct i915_address_space {