diff options
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 9 | ||||
-rw-r--r-- | include/drm/intel-gtt.h | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 291ac5113576..8e2e208c925b 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -1476,6 +1476,13 @@ const struct intel_gtt *intel_gtt_get(void) | |||
1476 | } | 1476 | } |
1477 | EXPORT_SYMBOL(intel_gtt_get); | 1477 | EXPORT_SYMBOL(intel_gtt_get); |
1478 | 1478 | ||
1479 | void intel_gtt_chipset_flush(void) | ||
1480 | { | ||
1481 | if (intel_private.driver->chipset_flush) | ||
1482 | intel_private.driver->chipset_flush(); | ||
1483 | } | ||
1484 | EXPORT_SYMBOL(intel_gtt_chipset_flush); | ||
1485 | |||
1479 | void intel_gmch_remove(struct pci_dev *pdev) | 1486 | void intel_gmch_remove(struct pci_dev *pdev) |
1480 | { | 1487 | { |
1481 | if (intel_private.pcidev) | 1488 | if (intel_private.pcidev) |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 68492357658c..b663d2da1db3 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2192,7 +2192,7 @@ i915_gem_flush(struct drm_device *dev, | |||
2192 | drm_i915_private_t *dev_priv = dev->dev_private; | 2192 | drm_i915_private_t *dev_priv = dev->dev_private; |
2193 | 2193 | ||
2194 | if (flush_domains & I915_GEM_DOMAIN_CPU) | 2194 | if (flush_domains & I915_GEM_DOMAIN_CPU) |
2195 | drm_agp_chipset_flush(dev); | 2195 | intel_gtt_chipset_flush(); |
2196 | 2196 | ||
2197 | if ((flush_domains | invalidate_domains) & I915_GEM_GPU_DOMAINS) { | 2197 | if ((flush_domains | invalidate_domains) & I915_GEM_GPU_DOMAINS) { |
2198 | if (flush_rings & RING_RENDER) | 2198 | if (flush_rings & RING_RENDER) |
@@ -2920,14 +2920,13 @@ i915_gem_object_flush_gtt_write_domain(struct drm_gem_object *obj) | |||
2920 | static void | 2920 | static void |
2921 | i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj) | 2921 | i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj) |
2922 | { | 2922 | { |
2923 | struct drm_device *dev = obj->dev; | ||
2924 | uint32_t old_write_domain; | 2923 | uint32_t old_write_domain; |
2925 | 2924 | ||
2926 | if (obj->write_domain != I915_GEM_DOMAIN_CPU) | 2925 | if (obj->write_domain != I915_GEM_DOMAIN_CPU) |
2927 | return; | 2926 | return; |
2928 | 2927 | ||
2929 | i915_gem_clflush_object(obj); | 2928 | i915_gem_clflush_object(obj); |
2930 | drm_agp_chipset_flush(dev); | 2929 | intel_gtt_chipset_flush(); |
2931 | old_write_domain = obj->write_domain; | 2930 | old_write_domain = obj->write_domain; |
2932 | obj->write_domain = 0; | 2931 | obj->write_domain = 0; |
2933 | 2932 | ||
@@ -5069,7 +5068,7 @@ void i915_gem_detach_phys_object(struct drm_device *dev, | |||
5069 | page_cache_release(page); | 5068 | page_cache_release(page); |
5070 | } | 5069 | } |
5071 | } | 5070 | } |
5072 | drm_agp_chipset_flush(dev); | 5071 | intel_gtt_chipset_flush(); |
5073 | 5072 | ||
5074 | obj_priv->phys_obj->cur_obj = NULL; | 5073 | obj_priv->phys_obj->cur_obj = NULL; |
5075 | obj_priv->phys_obj = NULL; | 5074 | obj_priv->phys_obj = NULL; |
@@ -5161,7 +5160,7 @@ i915_gem_phys_pwrite(struct drm_device *dev, struct drm_gem_object *obj, | |||
5161 | return -EFAULT; | 5160 | return -EFAULT; |
5162 | } | 5161 | } |
5163 | 5162 | ||
5164 | drm_agp_chipset_flush(dev); | 5163 | intel_gtt_chipset_flush(); |
5165 | return 0; | 5164 | return 0; |
5166 | } | 5165 | } |
5167 | 5166 | ||
diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h index 9f91cbe35157..c35817a11690 100644 --- a/include/drm/intel-gtt.h +++ b/include/drm/intel-gtt.h | |||
@@ -13,6 +13,7 @@ const struct intel_gtt { | |||
13 | unsigned int gtt_mappable_entries; | 13 | unsigned int gtt_mappable_entries; |
14 | } *intel_gtt_get(void); | 14 | } *intel_gtt_get(void); |
15 | 15 | ||
16 | void intel_gtt_chipset_flush(void); | ||
16 | 17 | ||
17 | /* Special gtt memory types */ | 18 | /* Special gtt memory types */ |
18 | #define AGP_DCACHE_MEMORY 1 | 19 | #define AGP_DCACHE_MEMORY 1 |
@@ -26,4 +27,3 @@ const struct intel_gtt { | |||
26 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) | 27 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) |
27 | 28 | ||
28 | #endif | 29 | #endif |
29 | |||