aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwain G. Ainsworth <oga@openbsd.org>2009-02-20 03:30:19 -0500
committerDave Airlie <airlied@redhat.com>2009-03-13 00:24:09 -0400
commit995e37cafb90f104395e015a9836cc459df1fc39 (patch)
treed7ba979272c6a754b3153ce1aa37bc30ad58191a
parent87ba7c663af0f34aa603a5bb448783a5ed64573f (diff)
i915/drm: Remove two redundant agp_chipset_flushes
agp_chipset_flush() is for flushing the intel GMCH write cache via the IFP, these two uses are for when we're getting the object into the cpu READ domain, and thus should not be needed. This confused me when I was getting my head around the code. With thanks to airlied for helping me check my mental picture of how the flushes and clflushes are supposed to be used. Signed-off-by: Owain G. Ainsworth <oga@openbsd.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 592b24efeb48..8d5ec5fd5252 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1913,7 +1913,6 @@ i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, int write)
1913static int 1913static int
1914i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write) 1914i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write)
1915{ 1915{
1916 struct drm_device *dev = obj->dev;
1917 int ret; 1916 int ret;
1918 1917
1919 i915_gem_object_flush_gpu_write_domain(obj); 1918 i915_gem_object_flush_gpu_write_domain(obj);
@@ -1932,7 +1931,6 @@ i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write)
1932 /* Flush the CPU cache if it's still invalid. */ 1931 /* Flush the CPU cache if it's still invalid. */
1933 if ((obj->read_domains & I915_GEM_DOMAIN_CPU) == 0) { 1932 if ((obj->read_domains & I915_GEM_DOMAIN_CPU) == 0) {
1934 i915_gem_clflush_object(obj); 1933 i915_gem_clflush_object(obj);
1935 drm_agp_chipset_flush(dev);
1936 1934
1937 obj->read_domains |= I915_GEM_DOMAIN_CPU; 1935 obj->read_domains |= I915_GEM_DOMAIN_CPU;
1938 } 1936 }
@@ -2144,7 +2142,6 @@ i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj)
2144static void 2142static void
2145i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj) 2143i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj)
2146{ 2144{
2147 struct drm_device *dev = obj->dev;
2148 struct drm_i915_gem_object *obj_priv = obj->driver_private; 2145 struct drm_i915_gem_object *obj_priv = obj->driver_private;
2149 2146
2150 if (!obj_priv->page_cpu_valid) 2147 if (!obj_priv->page_cpu_valid)
@@ -2160,7 +2157,6 @@ i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj)
2160 continue; 2157 continue;
2161 drm_clflush_pages(obj_priv->page_list + i, 1); 2158 drm_clflush_pages(obj_priv->page_list + i, 1);
2162 } 2159 }
2163 drm_agp_chipset_flush(dev);
2164 } 2160 }
2165 2161
2166 /* Free the page_cpu_valid mappings which are now stale, whether 2162 /* Free the page_cpu_valid mappings which are now stale, whether