diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.c | 22 |
3 files changed, 19 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index ee9502b88df3..28714ffdd213 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1692,7 +1692,7 @@ out_mtrrfree: out_gtt: list_del(&dev_priv->gtt.base.global_link); drm_mm_takedown(&dev_priv->gtt.base.mm); - dev_priv->gtt.base.cleanup(&dev_priv->gtt.base); + //dev_priv->gtt.base.cleanup(&dev_priv->gtt.base); out_regs: intel_uncore_fini(dev); pci_iounmap(dev->pdev, dev_priv->regs); @@ -1794,7 +1794,7 @@ int i915_driver_unload(struct drm_device *dev) destroy_workqueue(dev_priv->wq); pm_qos_remove_request(&dev_priv->pm_qos); - dev_priv->gtt.base.cleanup(&dev_priv->gtt.base); + //dev_priv->gtt.base.cleanup(&dev_priv->gtt.base); intel_uncore_fini(dev); if (dev_priv->regs != NULL) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 90b0e8fe308e..c6dc9c59ae06 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -621,7 +621,7 @@ struct i915_address_space { struct sg_table *st, unsigned int first_entry, enum i915_cache_level cache_level); - void (*cleanup)(struct i915_address_space *vm); + //void (*cleanup)(struct i915_address_space *vm); }; /* The Graphics Translation Table is the way in which GEN hardware translates a diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 675b0136dc88..6313ae47cbd3 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -318,6 +318,7 @@ static void gen8_ppgtt_insert_entries(struct i915_address_space *vm, kunmap_atomic(pt_vaddr); } +#if 0 static void gen8_ppgtt_cleanup(struct i915_address_space *vm) { struct i915_hw_ppgtt *ppgtt = @@ -349,6 +350,7 @@ static void gen8_ppgtt_cleanup(struct i915_address_space *vm) __free_pages(ppgtt->gen8_pt_pages, get_order(ppgtt->num_pt_pages << PAGE_SHIFT)); __free_pages(ppgtt->pd_pages, get_order(ppgtt->num_pd_pages << PAGE_SHIFT)); } +#endif /** * GEN8 legacy ppgtt programming is accomplished through 4 PDP registers with a @@ -390,7 +392,7 @@ static int gen8_ppgtt_init(struct i915_hw_ppgtt *ppgtt, uint64_t size) ppgtt->switch_mm = gen8_mm_switch; ppgtt->base.clear_range = gen8_ppgtt_clear_range; ppgtt->base.insert_entries = gen8_ppgtt_insert_entries; - ppgtt->base.cleanup = gen8_ppgtt_cleanup; + //ppgtt->base.cleanup = gen8_ppgtt_cleanup; ppgtt->base.start = 0; ppgtt->base.total = ppgtt->num_pt_pages * GEN8_PTES_PER_PAGE * PAGE_SIZE; @@ -456,7 +458,7 @@ static int gen8_ppgtt_init(struct i915_hw_ppgtt *ppgtt, uint64_t size) return 0; err_out: - ppgtt->base.cleanup(&ppgtt->base); + //ppgtt->base.cleanup(&ppgtt->base); return ret; } @@ -818,6 +820,7 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, kunmap_atomic(pt_vaddr); } +#if 0 static void gen6_ppgtt_cleanup(struct i915_address_space *vm) { struct i915_hw_ppgtt *ppgtt = @@ -841,6 +844,7 @@ static void gen6_ppgtt_cleanup(struct i915_address_space *vm) kfree(ppgtt->pt_pages); kfree(ppgtt); } +#endif static int gen6_ppgtt_init(struct i915_hw_ppgtt *ppgtt) { @@ -891,7 +895,7 @@ alloc: BUG(); ppgtt->base.clear_range = gen6_ppgtt_clear_range; ppgtt->base.insert_entries = gen6_ppgtt_insert_entries; - ppgtt->base.cleanup = gen6_ppgtt_cleanup; + //ppgtt->base.cleanup = gen6_ppgtt_cleanup; ppgtt->base.scratch = dev_priv->gtt.base.scratch; ppgtt->base.start = 0; ppgtt->base.total = GEN6_PPGTT_PD_ENTRIES * I915_PPGTT_PT_ENTRIES * PAGE_SIZE; @@ -1515,6 +1519,7 @@ static int setup_scratch_page(struct drm_device *dev) return 0; } +#if 0 static void teardown_scratch_page(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; @@ -1526,6 +1531,7 @@ static void teardown_scratch_page(struct drm_device *dev) put_page(page); __free_page(page); } +#endif static inline unsigned int gen6_get_total_gtt_size(u16 snb_gmch_ctl) { @@ -1697,6 +1703,7 @@ static int gen6_gmch_probe(struct drm_device *dev, return ret; } +#if 0 static void gen6_gmch_remove(struct i915_address_space *vm) { @@ -1706,6 +1713,7 @@ static void gen6_gmch_remove(struct i915_address_space *vm) iounmap(gtt->gsm); teardown_scratch_page(vm->dev); } +#endif static int i915_gmch_probe(struct drm_device *dev, size_t *gtt_total, @@ -1730,10 +1738,12 @@ static int i915_gmch_probe(struct drm_device *dev, return 0; } +#if 0 static void i915_gmch_remove(struct i915_address_space *vm) { intel_gmch_remove(); } +#endif int i915_gem_gtt_init(struct drm_device *dev) { @@ -1743,10 +1753,10 @@ int i915_gem_gtt_init(struct drm_device *dev) if (INTEL_INFO(dev)->gen <= 5) { gtt->gtt_probe = i915_gmch_probe; - gtt->base.cleanup = i915_gmch_remove; + //gtt->base.cleanup = i915_gmch_remove; } else if (INTEL_INFO(dev)->gen < 8) { gtt->gtt_probe = gen6_gmch_probe; - gtt->base.cleanup = gen6_gmch_remove; + //gtt->base.cleanup = gen6_gmch_remove; if (IS_HASWELL(dev) && dev_priv->ellc_size) gtt->base.pte_encode = iris_pte_encode; else if (IS_HASWELL(dev)) @@ -1759,7 +1769,7 @@ int i915_gem_gtt_init(struct drm_device *dev) gtt->base.pte_encode = snb_pte_encode; } else { dev_priv->gtt.gtt_probe = gen8_gmch_probe; - dev_priv->gtt.base.cleanup = gen6_gmch_remove; + //dev_priv->gtt.base.cleanup = gen6_gmch_remove; } ret = gtt->gtt_probe(dev, >t->base.total, >t->stolen_size, |