drm/i915: Move gen8 clear_range vfunc setup into common code
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 14 Apr 2015 15:35:11 +0000 (17:35 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 20 Apr 2015 15:53:20 +0000 (08:53 -0700)
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c

index 9041f3dfdfb403ca937792f99972f6710e198f7f..1c8ef7c143aa19db455b9e013fd386982b504300 100644 (file)
@@ -994,6 +994,7 @@ static int gen8_ppgtt_init_common(struct i915_hw_ppgtt *ppgtt, uint64_t size)
        ppgtt->base.total = size;
        ppgtt->base.cleanup = gen8_ppgtt_cleanup;
        ppgtt->base.insert_entries = gen8_ppgtt_insert_entries;
+       ppgtt->base.clear_range = gen8_ppgtt_clear_range;
 
        ppgtt->switch_mm = gen8_mm_switch;
 
@@ -1022,7 +1023,6 @@ static int gen8_aliasing_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
        }
 
        ppgtt->base.allocate_va_range = NULL;
-       ppgtt->base.clear_range = gen8_ppgtt_clear_range;
        ppgtt->base.clear_range(&ppgtt->base, 0, ppgtt->base.total, true);
 
        return 0;
@@ -1037,7 +1037,6 @@ static int gen8_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
                return ret;
 
        ppgtt->base.allocate_va_range = gen8_alloc_va_range;
-       ppgtt->base.clear_range = gen8_ppgtt_clear_range;
 
        return 0;
 }