|
@@ -617,7 +617,7 @@ i915_gem_create(struct drm_file *file,
|
|
|
|
|
|
ret = drm_gem_handle_create(file, &obj->base, &handle);
|
|
ret = drm_gem_handle_create(file, &obj->base, &handle);
|
|
/* drop reference from allocate - handle holds it now */
|
|
/* drop reference from allocate - handle holds it now */
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
@@ -1111,7 +1111,7 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
|
|
|
|
|
|
i915_gem_object_unpin_pages(obj);
|
|
i915_gem_object_unpin_pages(obj);
|
|
out:
|
|
out:
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1444,7 +1444,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
|
|
|
|
|
|
i915_gem_object_unpin_pages(obj);
|
|
i915_gem_object_unpin_pages(obj);
|
|
err:
|
|
err:
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1520,7 +1520,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
|
|
MAX_SCHEDULE_TIMEOUT,
|
|
MAX_SCHEDULE_TIMEOUT,
|
|
to_rps_client(file));
|
|
to_rps_client(file));
|
|
if (err)
|
|
if (err)
|
|
- goto out_unlocked;
|
|
|
|
|
|
+ goto out;
|
|
|
|
|
|
/* Flush and acquire obj->pages so that we are coherent through
|
|
/* Flush and acquire obj->pages so that we are coherent through
|
|
* direct access in memory with previous cached writes through
|
|
* direct access in memory with previous cached writes through
|
|
@@ -1532,11 +1532,11 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
|
|
*/
|
|
*/
|
|
err = i915_gem_object_pin_pages(obj);
|
|
err = i915_gem_object_pin_pages(obj);
|
|
if (err)
|
|
if (err)
|
|
- goto out_unlocked;
|
|
|
|
|
|
+ goto out;
|
|
|
|
|
|
err = i915_mutex_lock_interruptible(dev);
|
|
err = i915_mutex_lock_interruptible(dev);
|
|
if (err)
|
|
if (err)
|
|
- goto out_pages;
|
|
|
|
|
|
+ goto out_unpin;
|
|
|
|
|
|
if (read_domains & I915_GEM_DOMAIN_GTT)
|
|
if (read_domains & I915_GEM_DOMAIN_GTT)
|
|
err = i915_gem_object_set_to_gtt_domain(obj, write_domain != 0);
|
|
err = i915_gem_object_set_to_gtt_domain(obj, write_domain != 0);
|
|
@@ -1551,10 +1551,10 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
|
|
if (write_domain != 0)
|
|
if (write_domain != 0)
|
|
intel_fb_obj_invalidate(obj, write_origin(obj, write_domain));
|
|
intel_fb_obj_invalidate(obj, write_origin(obj, write_domain));
|
|
|
|
|
|
-out_pages:
|
|
|
|
|
|
+out_unpin:
|
|
i915_gem_object_unpin_pages(obj);
|
|
i915_gem_object_unpin_pages(obj);
|
|
-out_unlocked:
|
|
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+out:
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1585,7 +1585,7 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1631,7 +1631,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
|
* pages from.
|
|
* pages from.
|
|
*/
|
|
*/
|
|
if (!obj->base.filp) {
|
|
if (!obj->base.filp) {
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1643,7 +1643,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
|
struct vm_area_struct *vma;
|
|
struct vm_area_struct *vma;
|
|
|
|
|
|
if (down_write_killable(&mm->mmap_sem)) {
|
|
if (down_write_killable(&mm->mmap_sem)) {
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return -EINTR;
|
|
return -EINTR;
|
|
}
|
|
}
|
|
vma = find_vma(mm, addr);
|
|
vma = find_vma(mm, addr);
|
|
@@ -1657,7 +1657,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
|
/* This may race, but that's ok, it only gets set */
|
|
/* This may race, but that's ok, it only gets set */
|
|
WRITE_ONCE(obj->frontbuffer_ggtt_origin, ORIGIN_CPU);
|
|
WRITE_ONCE(obj->frontbuffer_ggtt_origin, ORIGIN_CPU);
|
|
}
|
|
}
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
if (IS_ERR((void *)addr))
|
|
if (IS_ERR((void *)addr))
|
|
return addr;
|
|
return addr;
|
|
|
|
|
|
@@ -2105,7 +2105,7 @@ i915_gem_mmap_gtt(struct drm_file *file,
|
|
if (ret == 0)
|
|
if (ret == 0)
|
|
*offset = drm_vma_node_offset_addr(&obj->base.vma_node);
|
|
*offset = drm_vma_node_offset_addr(&obj->base.vma_node);
|
|
|
|
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2932,7 +2932,7 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
|
|
args->timeout_ns = 0;
|
|
args->timeout_ns = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- i915_gem_object_put_unlocked(obj);
|
|
|
|
|
|
+ i915_gem_object_put(obj);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|