mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
drm/ttm: remove use_ticket parameter from ttm_bo_reserve
Not used any more. Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
5ee7b41a8b
commit
dfd5e50ea4
@@ -71,7 +71,7 @@ static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, 0);
|
||||
r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
|
||||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS)
|
||||
dev_err(bo->adev->dev, "%p reserve failed\n", bo);
|
||||
|
||||
@@ -367,7 +367,7 @@ static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
|
||||
if (ret) {
|
||||
if (ret != -ERESTARTSYS && ret != -EBUSY)
|
||||
DRM_ERROR("reserve failed %p\n", bo);
|
||||
|
||||
@@ -82,7 +82,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
|
||||
|
||||
bo = gem_to_bochs_bo(gobj);
|
||||
|
||||
ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
|
||||
if (old_fb) {
|
||||
bochs_fb = to_bochs_framebuffer(old_fb);
|
||||
bo = gem_to_bochs_bo(bochs_fb->obj);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
|
||||
if (ret) {
|
||||
DRM_ERROR("failed to reserve old_fb bo\n");
|
||||
} else {
|
||||
@@ -57,7 +57,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
|
||||
|
||||
bochs_fb = to_bochs_framebuffer(crtc->primary->fb);
|
||||
bo = gem_to_bochs_bo(bochs_fb->obj);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
|
||||
if (ret) {
|
||||
if (ret != -ERESTARTSYS && ret != -EBUSY)
|
||||
DRM_ERROR("reserve failed %p\n", bo);
|
||||
|
||||
@@ -281,7 +281,7 @@ static inline int mgag200_bo_reserve(struct mgag200_bo *bo, bool no_wait)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
|
||||
ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
|
||||
if (ret) {
|
||||
if (ret != -ERESTARTSYS && ret != -EBUSY)
|
||||
DRM_ERROR("reserve failed %p\n", bo);
|
||||
|
||||
@@ -312,7 +312,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig)
|
||||
bool force = false, evict = false;
|
||||
int ret;
|
||||
|
||||
ret = ttm_bo_reserve(bo, false, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, false, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -385,7 +385,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo)
|
||||
struct ttm_buffer_object *bo = &nvbo->bo;
|
||||
int ret, ref;
|
||||
|
||||
ret = ttm_bo_reserve(bo, false, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, false, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -420,7 +420,7 @@ nouveau_bo_map(struct nouveau_bo *nvbo)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -739,7 +739,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
|
||||
}
|
||||
|
||||
mutex_lock(&cli->mutex);
|
||||
ret = ttm_bo_reserve(&new_bo->bo, true, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&new_bo->bo, true, false, NULL);
|
||||
if (ret)
|
||||
goto fail_unpin;
|
||||
|
||||
@@ -753,7 +753,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
|
||||
if (new_bo != old_bo) {
|
||||
ttm_bo_unreserve(&new_bo->bo);
|
||||
|
||||
ret = ttm_bo_reserve(&old_bo->bo, true, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&old_bo->bo, true, false, NULL);
|
||||
if (ret)
|
||||
goto fail_unpin;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
|
||||
if (!cli->vm)
|
||||
return 0;
|
||||
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -156,7 +156,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
|
||||
if (!cli->vm)
|
||||
return;
|
||||
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
|
||||
ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
@@ -409,7 +409,7 @@ retry:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = ttm_bo_reserve(&nvbo->bo, true, false, true, &op->ticket);
|
||||
ret = ttm_bo_reserve(&nvbo->bo, true, false, &op->ticket);
|
||||
if (ret) {
|
||||
list_splice_tail_init(&vram_list, &op->list);
|
||||
list_splice_tail_init(&gart_list, &op->list);
|
||||
|
||||
@@ -31,7 +31,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
|
||||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS) {
|
||||
struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
|
||||
@@ -67,7 +67,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
|
||||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS) {
|
||||
struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
|
||||
|
||||
@@ -832,7 +832,7 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
|
||||
if (unlikely(r != 0))
|
||||
return r;
|
||||
if (mem_type)
|
||||
|
||||
@@ -65,7 +65,7 @@ static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_intr)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, NULL);
|
||||
r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
|
||||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS)
|
||||
dev_err(bo->rdev->dev, "%p reserve failed\n", bo);
|
||||
|
||||
@@ -452,7 +452,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
|
||||
int ret;
|
||||
|
||||
spin_lock(&glob->lru_lock);
|
||||
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||
ret = __ttm_bo_reserve(bo, false, true, NULL);
|
||||
|
||||
if (!ret) {
|
||||
if (!ttm_bo_wait(bo, false, false, true)) {
|
||||
@@ -526,7 +526,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
|
||||
return -EBUSY;
|
||||
|
||||
spin_lock(&glob->lru_lock);
|
||||
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||
ret = __ttm_bo_reserve(bo, false, true, NULL);
|
||||
|
||||
/*
|
||||
* We raced, and lost, someone else holds the reservation now,
|
||||
@@ -595,11 +595,10 @@ static int ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all)
|
||||
kref_get(&nentry->list_kref);
|
||||
}
|
||||
|
||||
ret = __ttm_bo_reserve(entry, false, true, false, NULL);
|
||||
ret = __ttm_bo_reserve(entry, false, true, NULL);
|
||||
if (remove_all && ret) {
|
||||
spin_unlock(&glob->lru_lock);
|
||||
ret = __ttm_bo_reserve(entry, false, false,
|
||||
false, NULL);
|
||||
ret = __ttm_bo_reserve(entry, false, false, NULL);
|
||||
spin_lock(&glob->lru_lock);
|
||||
}
|
||||
|
||||
@@ -741,7 +740,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
|
||||
|
||||
spin_lock(&glob->lru_lock);
|
||||
list_for_each_entry(bo, &man->lru, lru) {
|
||||
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||
ret = __ttm_bo_reserve(bo, false, true, NULL);
|
||||
if (!ret) {
|
||||
if (place && (place->fpfn || place->lpfn)) {
|
||||
/* Don't evict this BO if it's outside of the
|
||||
@@ -1623,7 +1622,7 @@ int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait)
|
||||
* Using ttm_bo_reserve makes sure the lru lists are updated.
|
||||
*/
|
||||
|
||||
ret = ttm_bo_reserve(bo, true, no_wait, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, true, no_wait, NULL);
|
||||
if (unlikely(ret != 0))
|
||||
return ret;
|
||||
ret = ttm_bo_wait(bo, false, true, no_wait);
|
||||
@@ -1656,7 +1655,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
|
||||
|
||||
spin_lock(&glob->lru_lock);
|
||||
list_for_each_entry(bo, &glob->swap_lru, swap) {
|
||||
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||
ret = __ttm_bo_reserve(bo, false, true, NULL);
|
||||
if (!ret)
|
||||
break;
|
||||
}
|
||||
@@ -1755,7 +1754,7 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo)
|
||||
return -ERESTARTSYS;
|
||||
if (!ww_mutex_is_locked(&bo->resv->lock))
|
||||
goto out_unlock;
|
||||
ret = __ttm_bo_reserve(bo, true, false, false, NULL);
|
||||
ret = __ttm_bo_reserve(bo, true, false, NULL);
|
||||
if (unlikely(ret != 0))
|
||||
goto out_unlock;
|
||||
__ttm_bo_unreserve(bo);
|
||||
|
||||
@@ -108,7 +108,7 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
* for reserve, and if it fails, retry the fault after waiting
|
||||
* for the buffer to become unreserved.
|
||||
*/
|
||||
ret = ttm_bo_reserve(bo, true, true, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, true, true, NULL);
|
||||
if (unlikely(ret != 0)) {
|
||||
if (ret != -EBUSY)
|
||||
return VM_FAULT_NOPAGE;
|
||||
|
||||
@@ -112,8 +112,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
|
||||
list_for_each_entry(entry, list, head) {
|
||||
struct ttm_buffer_object *bo = entry->bo;
|
||||
|
||||
ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), true,
|
||||
ticket);
|
||||
ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket);
|
||||
if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) {
|
||||
__ttm_bo_unreserve(bo);
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
|
||||
if (unlikely(r != 0)) {
|
||||
if (r != -ERESTARTSYS) {
|
||||
struct virtio_gpu_device *qdev =
|
||||
|
||||
@@ -155,7 +155,7 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
|
||||
r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
|
||||
if (unlikely(r != 0))
|
||||
return r;
|
||||
r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
|
||||
|
||||
@@ -421,7 +421,7 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size)
|
||||
}
|
||||
|
||||
bo = &buf->base;
|
||||
WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, false, NULL));
|
||||
WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, NULL));
|
||||
|
||||
ret = ttm_bo_wait(old_bo, false, false, false);
|
||||
if (unlikely(ret != 0)) {
|
||||
|
||||
@@ -56,7 +56,7 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv,
|
||||
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, NULL);
|
||||
if (unlikely(ret != 0))
|
||||
goto err;
|
||||
|
||||
@@ -98,7 +98,7 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv,
|
||||
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, NULL);
|
||||
if (unlikely(ret != 0))
|
||||
goto err;
|
||||
|
||||
@@ -174,7 +174,7 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv,
|
||||
return ret;
|
||||
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, NULL);
|
||||
if (unlikely(ret != 0))
|
||||
goto err_unlock;
|
||||
|
||||
@@ -225,7 +225,7 @@ int vmw_dmabuf_unpin(struct vmw_private *dev_priv,
|
||||
if (unlikely(ret != 0))
|
||||
return ret;
|
||||
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, interruptible, false, NULL);
|
||||
if (unlikely(ret != 0))
|
||||
goto err;
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv)
|
||||
if (unlikely(ret != 0))
|
||||
return ret;
|
||||
|
||||
ret = ttm_bo_reserve(&vbo->base, false, true, false, NULL);
|
||||
ret = ttm_bo_reserve(&vbo->base, false, true, NULL);
|
||||
BUG_ON(ret != 0);
|
||||
vmw_bo_pin_reserved(vbo, true);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user