search for: drm_gem_object_unreference_unlocked

Displaying 20 results from an estimated 72 matches for "drm_gem_object_unreference_unlocked".

2018 Jun 18
0
[PATCH 3/4] drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function
.../drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -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.show(nv_crtc, true); out: - drm_gem_object_unreference_unlocked(gem); + drm_gem_object_put_unlocked(gem); return ret; } diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index e2211bb2cf79..e67a471331b5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -139,7 +...
2017 Sep 29
1
[PATCH] drm/virtio: Replace instances of reference/unreference with get/put
Replace reference/unreference with get/put as it is consistent with the kernel coding style. Done using the following semantic patch by coccinelle. @r@ expression e; @@ -drm_gem_object_unreference_unlocked(e); +drm_gem_object_put_unlocked(e); Signed-off-by: Srishti Sharma <srishtishar at gmail.com> --- drivers/gpu/drm/virtio/virtgpu_display.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 12 ++++++------ 3 files changed, 10 insertion...
2017 Sep 29
1
[PATCH] drm/virtio: Replace instances of reference/unreference with get/put
Replace reference/unreference with get/put as it is consistent with the kernel coding style. Done using the following semantic patch by coccinelle. @r@ expression e; @@ -drm_gem_object_unreference_unlocked(e); +drm_gem_object_put_unlocked(e); Signed-off-by: Srishti Sharma <srishtishar at gmail.com> --- drivers/gpu/drm/virtio/virtgpu_display.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 12 ++++++------ 3 files changed, 10 insertion...
2017 Aug 03
0
[PATCH 17/29] drm/nouveau: switch to drm_*{get, put} helpers
.../drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -1019,7 +1019,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.show(nv_crtc, true); out: - drm_gem_object_unreference_unlocked(gem); + drm_gem_object_put_unlocked(gem); return ret; } diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index f98f800..3e9db5a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -136,7 +136,7 @@ n...
2017 Aug 03
0
[PATCH 17/29] drm/nouveau: switch to drm_*{get, put} helpers
...v04/crtc.c > +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c > @@ -1019,7 +1019,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.show(nv_crtc, true); > out: > - drm_gem_object_unreference_unlocked(gem); > + drm_gem_object_put_unlocked(gem); > return ret; > } > > diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c > index f98f800..3e9db5a 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c > +++ b/drivers/gpu/drm/nouve...
2016 Jul 15
0
[PATCH] drm/virtgpu: Delete unnecessary checks before drm_gem_object_unreference_unlocked()
From: Markus Elfring <elfring at users.sourceforge.net> Date: Fri, 15 Jul 2016 22:38:42 +0200 The drm_gem_object_unreference_unlocked() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring at users.sourceforge.net> --- drivers/gpu/drm/virtio/virtgpu_display.c...
2016 Jul 15
0
[PATCH] drm/virtgpu: Delete unnecessary checks before drm_gem_object_unreference_unlocked()
From: Markus Elfring <elfring at users.sourceforge.net> Date: Fri, 15 Jul 2016 22:38:42 +0200 The drm_gem_object_unreference_unlocked() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring at users.sourceforge.net> --- drivers/gpu/drm/virtio/virtgpu_display.c...
2018 Mar 21
0
[Outreachy kernel] [PATCH] drm/qxl: Replace drm_gem_object_reference/unreference() with _get/put()
...istent with the kernel > kref_get/put() functions. The following Coccinelle script was used: > > @@ > expression e; > @@ > > ( > -drm_gem_object_reference(e); > +drm_gem_object_get(e); > | > -drm_gem_object_unreference(e); > +drm_gem_object_put(e); > | > -drm_gem_object_unreference_unlocked(e); > +drm_gem_object_put_unlocked(e); > ) > > Signed-off-by: Santha Meena Ramamoorthy <santhameena13 at gmail.com> lgtm, thanks for your patch. Applied to drm-misc-next. -Daniel > --- > drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- > drivers/gpu/drm/qxl/qxl_dumb.c |...
2017 Aug 03
2
[PATCH 00/29] DRM API conversions
...do_replace drm_framebuffer_reference drm_framebuffer_get do_replace drm_framebuffer_unreference drm_framebuffer_put do_replace drm_gem_object_reference drm_gem_object_get do_replace drm_gem_object_unreference drm_gem_object_put do_replace __drm_gem_object_unreference __drm_gem_object_put do_replace drm_gem_object_unreference_unlocked drm_gem_object_put_unlocked do_replace drm_property_reference_blob drm_property_blob_get do_replace drm_property_unreference_blob drm_property_blob_put Cihangir Akturk (29): drm/amdgpu: switch to drm_*{get,put} helpers drm: mali-dp: switch to drm_*{get,put} helpers drm/armada: switch to drm_...
2018 Jun 18
4
[PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions
...to Linux kernel nameing standard. The patch set does not change driver-internal interfaces. Thomas Zimmermann (4): drm/nouveau: Replace drm_connector_{un/reference} with put,get functions drm/nouveau: Replace drm_framebuffer_{un/reference} with put,get functions drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function drm/nouveau: Replace drm_dev_unref with drm_dev_put drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++---- drivers...
2018 Jan 15
2
[PATCH] fix drm-get-put.cocci warnings
...uveau_gem.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -296,7 +296,7 @@ nouveau_gem_ioctl_new(struct drm_device } /* drop reference from allocate - handle holds it now */ - drm_gem_object_unreference_unlocked(&nvbo->gem); + drm_gem_object_put_unlocked(&nvbo->gem); return ret; } @@ -365,7 +365,7 @@ validate_fini_no_ticket(struct validate_ list_del(&nvbo->entry); nvbo->reserved_by = NULL; ttm_bo_unreserve(&nvbo->bo); - drm_gem_object_unreference_unlocked(&n...
2012 Nov 22
0
[resend PATCH] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -123,6 +123,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, if (chan->ntfy) { nouveau_bo_vma_del(chan->ntfy, &chan->ntfy_vma); + nouveau_bo_unpin(chan->ntfy); drm_gem_object_unreference_unlocked(chan->ntfy->gem); } diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 67a1a06..f337976 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -429,6 +429,7 @@ nouveau_fbcon_destroy(struct drm...
2012 Oct 12
0
[PATCH 3/3, resend with fixed to field] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -123,6 +123,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, if (chan->ntfy) { nouveau_bo_vma_del(chan->ntfy, &chan->ntfy_vma); + nouveau_bo_unpin(chan->ntfy); drm_gem_object_unreference_unlocked(chan->ntfy->gem); } diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 67a1a06..f337976 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -429,6 +429,7 @@ nouveau_fbcon_destroy(struct drm...
2018 Sep 05
0
[PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown
...gt; - > -static int bochs_fbdev_destroy(struct bochs_device *bochs) > -{ > - struct bochs_framebuffer *gfb = &bochs->fb.gfb; > - > - DRM_DEBUG_DRIVER("\n"); > - > - drm_fb_helper_unregister_fbi(&bochs->fb.helper); > - > - if (gfb->obj) { > - drm_gem_object_unreference_unlocked(gfb->obj); > - gfb->obj = NULL; > - } > - > - drm_framebuffer_unregister_private(&gfb->base); > - drm_framebuffer_cleanup(&gfb->base); > - > return 0; > } > > @@ -158,41 +137,17 @@ static const struct drm_fb_helper_funcs bochs_fb_helper_funcs...
2017 Aug 08
5
[PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".
...new_abo = gem_to_amdgpu_bo(obj); /* pin the new buffer */ @@ -480,39 +480,27 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb) { - struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb); - - drm_gem_object_unreference_unlocked(amdgpu_fb->obj); + drm_gem_object_unreference_unlocked(fb->gem_objs[0]); drm_framebuffer_cleanup(fb); - kfree(amdgpu_fb); -} - -static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb, - struct drm_file *file_priv, - unsigned int *handle) -{ - struct amdgpu...
2017 Aug 08
5
[PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".
...new_abo = gem_to_amdgpu_bo(obj); /* pin the new buffer */ @@ -480,39 +480,27 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb) { - struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb); - - drm_gem_object_unreference_unlocked(amdgpu_fb->obj); + drm_gem_object_unreference_unlocked(fb->gem_objs[0]); drm_framebuffer_cleanup(fb); - kfree(amdgpu_fb); -} - -static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb, - struct drm_file *file_priv, - unsigned int *handle) -{ - struct amdgpu...
2017 Aug 08
5
[PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".
...new_abo = gem_to_amdgpu_bo(obj); /* pin the new buffer */ @@ -480,39 +480,27 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb) { - struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb); - - drm_gem_object_unreference_unlocked(amdgpu_fb->obj); + drm_gem_object_unreference_unlocked(fb->gem_objs[0]); drm_framebuffer_cleanup(fb); - kfree(amdgpu_fb); -} - -static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb, - struct drm_file *file_priv, - unsigned int *handle) -{ - struct amdgpu...
2013 Aug 28
2
[PATCH 3/6] drm/nouveau: hook up cache sync functions
...s/gpu/drm/nouveau/nouveau_gem.c > +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c > @@ -901,6 +901,11 @@ nouveau_gem_ioctl_cpu_prep(struct drm_device *dev, void *data, > ret = ttm_bo_wait(&nvbo->bo, true, true, no_wait); > spin_unlock(&nvbo->bo.bdev->fence_lock); > drm_gem_object_unreference_unlocked(gem); > + > + if (!ret && nvbo->bo.ttm && nvbo->bo.ttm->caching_state == tt_cached) Ditto? > + ttm_dma_tt_cache_sync_for_cpu((struct ttm_dma_tt *)nvbo->bo.ttm, > + &dev->pdev->dev); > + > return ret; > } > > -- >...
2018 Nov 18
0
[PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script
...framebuffer_put(object) > -| > -- drm_gem_object_reference(object) > -+ drm_gem_object_get(object) > -| > -- drm_gem_object_unreference(object) > -+ drm_gem_object_put(object) > -| > -- __drm_gem_object_unreference(object) > -+ __drm_gem_object_put(object) > -| > -- drm_gem_object_unreference_unlocked(object) > -+ drm_gem_object_put_unlocked(object) > -| > -- drm_dev_unref(object) > -+ drm_dev_put(object) > -) > - > - at r depends on report@ > -expression object; > -position p; > -@@ > - > -( > -drm_connector_unreference at p(object) > -| > -drm_conne...
2014 Jul 08
0
[PATCH v4 4/6] drm/nouveau: synchronize BOs when required
...eau/nouveau_gem.c @@ -896,6 +896,7 @@ nouveau_gem_ioctl_cpu_prep(struct drm_device *dev, void *data, spin_lock(&nvbo->bo.bdev->fence_lock); ret = ttm_bo_wait(&nvbo->bo, true, true, no_wait); spin_unlock(&nvbo->bo.bdev->fence_lock); + nouveau_bo_sync_for_cpu(nvbo); drm_gem_object_unreference_unlocked(gem); return ret; } @@ -904,6 +905,17 @@ int nouveau_gem_ioctl_cpu_fini(struct drm_device *dev, void *data, struct drm_file *file_priv) { + struct drm_nouveau_gem_cpu_fini *req = data; + struct drm_gem_object *gem; + struct nouveau_bo *nvbo; + + gem = drm_gem_object_lookup(dev, file_pri...