diff mbox

[3/5] drm/i915/gtt: Don't track dirty in gen6_alloc_va_range

Message ID 20180507165222.17009-3-mika.kuoppala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala May 7, 2018, 4:52 p.m. UTC
gen6_alloc_va_range is only used to init the aliasing ppgtt, so
we can be certain that it will be dirty every time. No need
to track it.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Chris Wilson May 7, 2018, 7:37 p.m. UTC | #1
Quoting Mika Kuoppala (2018-05-07 17:52:20)
> gen6_alloc_va_range is only used to init the aliasing ppgtt, so
> we can be certain that it will be dirty every time. No need
> to track it.

Nah, we want it for full-ppgtt...
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index b162617afe18..6434ebe8c033 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1929,7 +1929,6 @@  static int gen6_alloc_va_range(struct i915_address_space *vm,
 	struct i915_page_table *pt;
 	u64 from = start;
 	unsigned int pde;
-	bool flush = false;
 
 	gen6_for_each_pde(pt, &ppgtt->pd, start, length, pde) {
 		if (pt == vm->scratch_pt) {
@@ -1940,12 +1939,10 @@  static int gen6_alloc_va_range(struct i915_address_space *vm,
 			gen6_initialize_pt(vm, pt);
 			ppgtt->pd.page_table[pde] = pt;
 			gen6_write_pde(ppgtt, pde, pt);
-			flush = true;
 		}
 	}
 
-	if (flush)
-		gen6_ppgtt_invalidate(vm);
+	gen6_ppgtt_invalidate(vm);
 
 	return 0;