aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 1b78b66dd77e..97d5fbd8ea13 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -713,14 +713,14 @@ err:
713 return ret; 713 return ret;
714} 714}
715 715
716static void 716static int
717i915_gem_execbuffer_flush(struct drm_device *dev, 717i915_gem_execbuffer_flush(struct drm_device *dev,
718 uint32_t invalidate_domains, 718 uint32_t invalidate_domains,
719 uint32_t flush_domains, 719 uint32_t flush_domains,
720 uint32_t flush_rings) 720 uint32_t flush_rings)
721{ 721{
722 drm_i915_private_t *dev_priv = dev->dev_private; 722 drm_i915_private_t *dev_priv = dev->dev_private;
723 int i; 723 int i, ret;
724 724
725 if (flush_domains & I915_GEM_DOMAIN_CPU) 725 if (flush_domains & I915_GEM_DOMAIN_CPU)
726 intel_gtt_chipset_flush(); 726 intel_gtt_chipset_flush();
@@ -730,11 +730,17 @@ i915_gem_execbuffer_flush(struct drm_device *dev,
730 730
731 if ((flush_domains | invalidate_domains) & I915_GEM_GPU_DOMAINS) { 731 if ((flush_domains | invalidate_domains) & I915_GEM_GPU_DOMAINS) {
732 for (i = 0; i < I915_NUM_RINGS; i++) 732 for (i = 0; i < I915_NUM_RINGS; i++)
733 if (flush_rings & (1 << i)) 733 if (flush_rings & (1 << i)) {
734 i915_gem_flush_ring(dev, &dev_priv->ring[i], 734 ret = i915_gem_flush_ring(dev,
735 invalidate_domains, 735 &dev_priv->ring[i],
736 flush_domains); 736 invalidate_domains,
737 flush_domains);
738 if (ret)
739 return ret;
740 }
737 } 741 }
742
743 return 0;
738} 744}
739 745
740static int 746static int
@@ -798,10 +804,12 @@ i915_gem_execbuffer_move_to_gpu(struct intel_ring_buffer *ring,
798 cd.invalidate_domains, 804 cd.invalidate_domains,
799 cd.flush_domains); 805 cd.flush_domains);
800#endif 806#endif
801 i915_gem_execbuffer_flush(ring->dev, 807 ret = i915_gem_execbuffer_flush(ring->dev,
802 cd.invalidate_domains, 808 cd.invalidate_domains,
803 cd.flush_domains, 809 cd.flush_domains,
804 cd.flush_rings); 810 cd.flush_rings);
811 if (ret)
812 return ret;
805 } 813 }
806 814
807 list_for_each_entry(obj, objects, exec_list) { 815 list_for_each_entry(obj, objects, exec_list) {