drm/i915: Remove domain flubbing from i915_gem_object_finish_gpu()
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_gem.c
index fb48e72772528e6ac735401f5ff0f24a03f63bef..5ff96f94c2ee6dfe62da0026522e46f775bc8992 100644 (file)
@@ -40,9 +40,6 @@
 
 static void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj);
 static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *obj);
-static __must_check int
-i915_gem_object_wait_rendering(struct drm_i915_gem_object *obj,
-                              bool readonly);
 static void
 i915_gem_object_retire(struct drm_i915_gem_object *obj);
 
@@ -1397,7 +1394,7 @@ i915_gem_object_wait_rendering__tail(struct drm_i915_gem_object *obj)
  * Ensures that all rendering to the object has completed and the object is
  * safe to unbind from the GTT or access from the CPU.
  */
-static __must_check int
+int
 i915_gem_object_wait_rendering(struct drm_i915_gem_object *obj,
                               bool readonly)
 {
@@ -3078,7 +3075,7 @@ int i915_vma_unbind(struct i915_vma *vma)
 
        BUG_ON(obj->pages == NULL);
 
-       ret = i915_gem_object_finish_gpu(obj);
+       ret = i915_gem_object_wait_rendering(obj, false);
        if (ret)
                return ret;
        /* Continue on if we fail due to EIO, the GPU is hung so we
@@ -3853,7 +3850,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
        }
 
        if (i915_gem_obj_bound_any(obj)) {
-               ret = i915_gem_object_finish_gpu(obj);
+               ret = i915_gem_object_wait_rendering(obj, false);
                if (ret)
                        return ret;
 
@@ -4044,23 +4041,6 @@ i915_gem_object_unpin_from_display_plane(struct drm_i915_gem_object *obj,
        obj->pin_display--;
 }
 
-int
-i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj)
-{
-       int ret;
-
-       if ((obj->base.read_domains & I915_GEM_GPU_DOMAINS) == 0)
-               return 0;
-
-       ret = i915_gem_object_wait_rendering(obj, false);
-       if (ret)
-               return ret;
-
-       /* Ensure that we invalidate the GPU's caches and TLBs. */
-       obj->base.read_domains &= ~I915_GEM_GPU_DOMAINS;
-       return 0;
-}
-
 /**
  * Moves a single object to the CPU read, and possibly write domain.
  *
This page took 0.025503 seconds and 5 git commands to generate.