mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function
This patch unifies the naming of DRM functions for reference counting of struct drm_gem_object. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
f066f79507
commit
743e0f079a
4 changed files with 13 additions and 13 deletions
|
@ -1017,7 +1017,7 @@ nv04_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
|
||||||
nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.offset);
|
nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.offset);
|
||||||
nv_crtc->cursor.show(nv_crtc, true);
|
nv_crtc->cursor.show(nv_crtc, true);
|
||||||
out:
|
out:
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16,
|
||||||
if (chan->ntfy) {
|
if (chan->ntfy) {
|
||||||
nouveau_vma_del(&chan->ntfy_vma);
|
nouveau_vma_del(&chan->ntfy_vma);
|
||||||
nouveau_bo_unpin(chan->ntfy);
|
nouveau_bo_unpin(chan->ntfy);
|
||||||
drm_gem_object_unreference_unlocked(&chan->ntfy->gem);
|
drm_gem_object_put_unlocked(&chan->ntfy->gem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan->heap.block_size)
|
if (chan->heap.block_size)
|
||||||
|
|
|
@ -205,7 +205,7 @@ nouveau_user_framebuffer_destroy(struct drm_framebuffer *drm_fb)
|
||||||
struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
|
struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
|
||||||
|
|
||||||
if (fb->nvbo)
|
if (fb->nvbo)
|
||||||
drm_gem_object_unreference_unlocked(&fb->nvbo->gem);
|
drm_gem_object_put_unlocked(&fb->nvbo->gem);
|
||||||
|
|
||||||
drm_framebuffer_cleanup(drm_fb);
|
drm_framebuffer_cleanup(drm_fb);
|
||||||
kfree(fb);
|
kfree(fb);
|
||||||
|
@ -287,7 +287,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
return &fb->base;
|
return &fb->base;
|
||||||
|
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -939,7 +939,7 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = drm_gem_handle_create(file_priv, &bo->gem, &args->handle);
|
ret = drm_gem_handle_create(file_priv, &bo->gem, &args->handle);
|
||||||
drm_gem_object_unreference_unlocked(&bo->gem);
|
drm_gem_object_put_unlocked(&bo->gem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -954,7 +954,7 @@ nouveau_display_dumb_map_offset(struct drm_file *file_priv,
|
||||||
if (gem) {
|
if (gem) {
|
||||||
struct nouveau_bo *bo = nouveau_gem_object(gem);
|
struct nouveau_bo *bo = nouveau_gem_object(gem);
|
||||||
*poffset = drm_vma_node_offset_addr(&bo->bo.vma_node);
|
*poffset = drm_vma_node_offset_addr(&bo->bo.vma_node);
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* drop reference from allocate - handle holds it now */
|
/* drop reference from allocate - handle holds it now */
|
||||||
drm_gem_object_unreference_unlocked(&nvbo->gem);
|
drm_gem_object_put_unlocked(&nvbo->gem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ validate_fini_no_ticket(struct validate_op *op, struct nouveau_fence *fence,
|
||||||
list_del(&nvbo->entry);
|
list_del(&nvbo->entry);
|
||||||
nvbo->reserved_by = NULL;
|
nvbo->reserved_by = NULL;
|
||||||
ttm_bo_unreserve(&nvbo->bo);
|
ttm_bo_unreserve(&nvbo->bo);
|
||||||
drm_gem_object_unreference_unlocked(&nvbo->gem);
|
drm_gem_object_put_unlocked(&nvbo->gem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,14 +400,14 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
|
||||||
nvbo = nouveau_gem_object(gem);
|
nvbo = nouveau_gem_object(gem);
|
||||||
if (nvbo == res_bo) {
|
if (nvbo == res_bo) {
|
||||||
res_bo = NULL;
|
res_bo = NULL;
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
|
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
|
||||||
NV_PRINTK(err, cli, "multiple instances of buffer %d on "
|
NV_PRINTK(err, cli, "multiple instances of buffer %d on "
|
||||||
"validation list\n", b->handle);
|
"validation list\n", b->handle);
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -894,7 +894,7 @@ nouveau_gem_ioctl_cpu_prep(struct drm_device *dev, void *data,
|
||||||
ret = lret;
|
ret = lret;
|
||||||
|
|
||||||
nouveau_bo_sync_for_cpu(nvbo);
|
nouveau_bo_sync_for_cpu(nvbo);
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -913,7 +913,7 @@ nouveau_gem_ioctl_cpu_fini(struct drm_device *dev, void *data,
|
||||||
nvbo = nouveau_gem_object(gem);
|
nvbo = nouveau_gem_object(gem);
|
||||||
|
|
||||||
nouveau_bo_sync_for_device(nvbo);
|
nouveau_bo_sync_for_device(nvbo);
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -930,7 +930,7 @@ nouveau_gem_ioctl_info(struct drm_device *dev, void *data,
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
ret = nouveau_gem_info(file_priv, gem, req);
|
ret = nouveau_gem_info(file_priv, gem, req);
|
||||||
drm_gem_object_unreference_unlocked(gem);
|
drm_gem_object_put_unlocked(gem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue