diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9290f02215c..e7f27a5b89d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3078,7 +3078,8 @@ i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write) | |||
3078 | * drm_agp_chipset_flush | 3078 | * drm_agp_chipset_flush |
3079 | */ | 3079 | */ |
3080 | static void | 3080 | static void |
3081 | i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj) | 3081 | i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj, |
3082 | struct intel_ring_buffer *ring) | ||
3082 | { | 3083 | { |
3083 | struct drm_device *dev = obj->dev; | 3084 | struct drm_device *dev = obj->dev; |
3084 | struct drm_i915_private *dev_priv = dev->dev_private; | 3085 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -3132,8 +3133,10 @@ i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj) | |||
3132 | 3133 | ||
3133 | dev->invalidate_domains |= invalidate_domains; | 3134 | dev->invalidate_domains |= invalidate_domains; |
3134 | dev->flush_domains |= flush_domains; | 3135 | dev->flush_domains |= flush_domains; |
3135 | if (obj_priv->ring) | 3136 | if (flush_domains & I915_GEM_GPU_DOMAINS) |
3136 | dev_priv->mm.flush_rings |= obj_priv->ring->id; | 3137 | dev_priv->mm.flush_rings |= obj_priv->ring->id; |
3138 | if (invalidate_domains & I915_GEM_GPU_DOMAINS) | ||
3139 | dev_priv->mm.flush_rings |= ring->id; | ||
3137 | 3140 | ||
3138 | trace_i915_gem_object_change_domain(obj, | 3141 | trace_i915_gem_object_change_domain(obj, |
3139 | old_read_domains, | 3142 | old_read_domains, |
@@ -3765,7 +3768,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
3765 | struct drm_gem_object *obj = object_list[i]; | 3768 | struct drm_gem_object *obj = object_list[i]; |
3766 | 3769 | ||
3767 | /* Compute new gpu domains and update invalidate/flush */ | 3770 | /* Compute new gpu domains and update invalidate/flush */ |
3768 | i915_gem_object_set_to_gpu_domain(obj); | 3771 | i915_gem_object_set_to_gpu_domain(obj, ring); |
3769 | } | 3772 | } |
3770 | 3773 | ||
3771 | if (dev->invalidate_domains | dev->flush_domains) { | 3774 | if (dev->invalidate_domains | dev->flush_domains) { |