[Intel-gfx] [PATCH 1/3] drm: kill drm_agp_chipset_flush

Daniel Vetter daniel.vetter at ffwll.ch
Wed Apr 14 12:16:27 CEST 2010


This is only used by the gem code in the i915 drm driver. Not point
in abstracting this simple call. Furthermore I want to integrate the
gtt handling from intel-agp much tighter with the gem code in the
drm module, so this indirection through the agp will vanish, anyway.
The reason for this is a rather gross amount of fragile code duplication
between these two parts of the kernel intel graphics driver.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/drm_agpsupport.c |    7 -------
 drivers/gpu/drm/i915/i915_gem.c  |    8 ++++----
 include/drm/drmP.h               |    1 -
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index ba38e01..54cfbc4 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -497,11 +497,4 @@ drm_agp_bind_pages(struct drm_device *dev,
 	return mem;
 }
 EXPORT_SYMBOL(drm_agp_bind_pages);
-
-void drm_agp_chipset_flush(struct drm_device *dev)
-{
-	agp_flush_chipset(dev->agp->bridge);
-}
-EXPORT_SYMBOL(drm_agp_chipset_flush);
-
 #endif /* __OS_HAS_AGP */
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 47c46ed..6e71b5b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1901,7 +1901,7 @@ i915_gem_flush(struct drm_device *dev,
 				     invalidate_domains, flush_domains);
 
 	if (flush_domains & I915_GEM_DOMAIN_CPU)
-		drm_agp_chipset_flush(dev);
+		agp_flush_chipset(dev->agp->bridge);
 
 	if ((invalidate_domains | flush_domains) & I915_GEM_GPU_DOMAINS) {
 		/*
@@ -2795,7 +2795,7 @@ i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj)
 		return;
 
 	i915_gem_clflush_object(obj);
-	drm_agp_chipset_flush(dev);
+	agp_flush_chipset(dev->agp->bridge);
 	old_write_domain = obj->write_domain;
 	obj->write_domain = 0;
 
@@ -4962,7 +4962,7 @@ void i915_gem_detach_phys_object(struct drm_device *dev,
 		kunmap_atomic(dst, KM_USER0);
 	}
 	drm_clflush_pages(obj_priv->pages, page_count);
-	drm_agp_chipset_flush(dev);
+	agp_flush_chipset(dev->agp->bridge);
 
 	i915_gem_object_put_pages(obj);
 out:
@@ -5047,7 +5047,7 @@ i915_gem_phys_pwrite(struct drm_device *dev, struct drm_gem_object *obj,
 	if (ret)
 		return -EFAULT;
 
-	drm_agp_chipset_flush(dev);
+	agp_flush_chipset(dev->agp->bridge);
 	return 0;
 }
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index c1b9871..12ffa05 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1341,7 +1341,6 @@ extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size
 extern int drm_agp_free_memory(DRM_AGP_MEM * handle);
 extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start);
 extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
-extern void drm_agp_chipset_flush(struct drm_device *dev);
 
 				/* Stub support (drm_stub.h) */
 extern int drm_setmaster_ioctl(struct drm_device *dev, void *data,
-- 
1.6.6.1




More information about the Intel-gfx mailing list