[Intel-gfx] [PATCH 13/13] drm/i915: Finally kill off struct intel-gtt
Ben Widawsky
ben at bwidawsk.net
Tue Jan 15 22:26:21 CET 2013
Nothing is shared anymore between AGP and drm/i915 driver. Pre-GEN6
still uses AGP, but all necessary info is encapsulated per driver.
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
drivers/char/agp/intel-gtt.c | 7 -------
drivers/gpu/drm/i915/i915_gem_gtt.c | 21 +--------------------
include/drm/intel-gtt.h | 3 ---
3 files changed, 1 insertion(+), 30 deletions(-)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 773ce8b..53086a2 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -60,7 +60,6 @@ struct intel_gtt_driver {
};
static struct _intel_private {
- struct intel_gtt base;
const struct intel_gtt_driver *driver;
struct pci_dev *pcidev; /* device one */
struct pci_dev *bridge_dev;
@@ -1372,12 +1371,6 @@ int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev,
}
EXPORT_SYMBOL(intel_gmch_probe);
-struct intel_gtt *intel_gtt_get(void)
-{
- return &intel_private.base;
-}
-EXPORT_SYMBOL(intel_gtt_get);
-
void intel_gtt_chipset_flush(void)
{
if (intel_private.driver->chipset_flush)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index b7641f7..e3782bb 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -707,28 +707,10 @@ int i915_gem_gtt_init(struct drm_device *dev)
* hostbridge query stuff. Skip it entirely
*/
if (INTEL_INFO(dev)->gen < 6) {
- ret = intel_gmch_probe(dev_priv->bridge_dev, dev->pdev, NULL);
- if (!ret) {
- DRM_ERROR("failed to set up gmch\n");
- return -EIO;
- }
-
- dev_priv->mm.gtt = intel_gtt_get();
- if (!dev_priv->mm.gtt) {
- DRM_ERROR("Failed to initialize GTT\n");
- intel_gmch_remove();
- return -ENODEV;
- }
-
dev_priv->gtt.do_idle_maps = needs_idle_maps(dev);
-
- return 0;
+ return intel_gmch_probe(dev_priv->bridge_dev, dev->pdev, NULL);
}
- dev_priv->mm.gtt = kzalloc(sizeof(*dev_priv->mm.gtt), GFP_KERNEL);
- if (!dev_priv->mm.gtt)
- return -ENOMEM;
-
if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(40)))
pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(40));
@@ -794,5 +776,4 @@ void i915_gem_gtt_fini(struct drm_device *dev)
teardown_scratch_page(dev);
if (INTEL_INFO(dev)->gen < 6)
intel_gmch_remove();
- kfree(dev_priv->mm.gtt);
}
diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h
index ae55605..8b546ee 100644
--- a/include/drm/intel-gtt.h
+++ b/include/drm/intel-gtt.h
@@ -3,9 +3,6 @@
#ifndef _DRM_INTEL_GTT_H
#define _DRM_INTEL_GTT_H
-struct intel_gtt {
-} *intel_gtt_get(void);
-
int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev,
struct agp_bridge_data *bridge);
void intel_gmch_remove(void);
--
1.8.1
More information about the Intel-gfx
mailing list