search for: drm_gem_object_unreference

Displaying 16 results from an estimated 16 matches for "drm_gem_object_unreference".

2013 Aug 28
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...); > > + nvbo = nouveau_gem_object(gem); > + if (!(nvbo->valid_domains & NOUVEAU_GEM_DOMAIN_VRAM)) { > + nv_warn(nouveau_drm(dev), "Trying to create a fb in vram with" > + " valid_domains=%08x\n", nvbo->valid_domains); > + ret = -EINVAL; > + drm_gem_object_unreference(gem); > + return ERR_PTR(ret); > + } > + > nouveau_fb = kzalloc(sizeof(struct nouveau_framebuffer), GFP_KERNEL); > - if (!nouveau_fb) > + if (!nouveau_fb) { > + drm_gem_object_unreference(gem); > return ERR_PTR(-ENOMEM); > + } > > - ret = nouveau_framebuffe...
2018 Nov 18
0
[PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script
...drm_connector_put(object) > -| > -- drm_framebuffer_reference(object) > -+ drm_framebuffer_get(object) > -| > -- drm_framebuffer_unreference(object) > -+ drm_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(obje...
2009 Aug 10
1
[RFC] drm/nouveau: optimize code emission of inline functions
[This email is either empty or too large to be displayed at this time]
2013 Jul 02
0
[PATCH] drm/nouveau: handle framebuffer pinning correctly
...if (!gem) return ERR_PTR(-ENOENT); + ret = -ENOMEM; nouveau_fb = kzalloc(sizeof(struct nouveau_framebuffer), GFP_KERNEL); if (!nouveau_fb) - return ERR_PTR(-ENOMEM); + goto err_unref; ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nouveau_gem_object(gem)); - if (ret) { - drm_gem_object_unreference(gem); - return ERR_PTR(ret); - } + if (ret) + goto err; return &nouveau_fb->base; + +err: + kfree(nouveau_fb); +err_unref: + drm_gem_object_unreference(gem); + return ERR_PTR(ret); } static const struct drm_mode_config_funcs nouveau_mode_config_funcs = { diff --git a/drivers/gpu/dr...
2013 Aug 23
2
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote: > Op 22-08-13 02:10, Ilia Mirkin schreef: > > The code expects non-VRAM mem nodes to have a pages list. If that's not > > set, it will do a null deref down the line. Warn on that condition and > > return an error. > > > > See https://bugs.freedesktop.org/show_bug.cgi?id=64774 > > > >
2010 Jan 18
1
[PATCH] drm: remove UMS leftover
...bo, domain_to_ttm(nvbo, req->domain)); - if (ret) - goto out; - - req->offset = nvbo->bo.offset; - if (nvbo->bo.mem.mem_type == TTM_PL_TT) - req->domain = NOUVEAU_GEM_DOMAIN_GART; - else - req->domain = NOUVEAU_GEM_DOMAIN_VRAM; - -out: - mutex_lock(&dev->struct_mutex); - drm_gem_object_unreference(gem); - mutex_unlock(&dev->struct_mutex); - - return ret; -} - -int -nouveau_gem_ioctl_unpin(struct drm_device *dev, void *data, - struct drm_file *file_priv) -{ - struct drm_nouveau_gem_pin *req = data; - struct drm_gem_object *gem; - int ret; - - NOUVEAU_CHECK_INITIALISED_WITH_RETURN; -...
2009 Sep 07
1
[PATCH] drm/nouveau: fix ref leak in nouveau_gem_pushbuf_validate()
...+ + ret = ttm_bo_reserve(&nvbo->bo, false, false, true, + chan->fence.sequence); + switch (ret) { + case 0: + *bop = nvbo; + return 0; + case -EAGAIN: + ret = ttm_bo_wait_unreserved(&nvbo->bo, false); + if (ret == 0) + ret = -EAGAIN; + /* fall through */ + default: + drm_gem_object_unreference(gem); + } + return ret; +} + +static int nouveau_gem_pushbuf_validate(struct nouveau_channel *chan, struct drm_file *file_priv, struct drm_nouveau_gem_pushbuf_bo *pbbo, @@ -279,7 +313,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan, struct drm_nouveau_gem_pushbuf...
2018 Mar 21
0
[Outreachy kernel] [PATCH] drm/qxl: Replace drm_gem_object_reference/unreference() with _get/put()
...e function with *_get/put() > suffixes, because it is shorter and consistent 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 > --- > dr...
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_unlock...
2017 Aug 03
2
[PATCH 00/29] DRM API conversions
...bject_put do_replace drm_connector_reference drm_connector_get do_replace drm_connector_unreference drm_connector_put 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...
2010 Aug 06
4
nv vpe video decoder
Hello, I have my work on the nv vpe video decoder in a functional state. In case you didn't know this decoder accelerates mpeg2 video at the idct/mc level. I have verified that it works on nv40 hardware. I believe it works on nv30 hardware (and maybe some earlier hardware), but I cannot verify since I have none. I will reply with patches against the kernel, drm, ddx and mesa for
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...e); + } + + output->cursor.hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR); + output->cursor.resource_id = cpu_to_le32(qobj->hw_res_handle); + output->cursor.hot_x = cpu_to_le32(hot_x); + output->cursor.hot_y = cpu_to_le32(hot_y); + virtio_gpu_cursor_ping(vgdev, output); +out: + drm_gem_object_unreference_unlocked(gobj); + return ret; +} + +static int virtio_gpu_crtc_cursor_move(struct drm_crtc *crtc, + int x, int y) +{ + struct virtio_gpu_device *vgdev = crtc->dev->dev_private; + struct virtio_gpu_output *output = + container_of(crtc, struct virtio_gpu_output, crtc); + + output->cu...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...e); + } + + output->cursor.hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR); + output->cursor.resource_id = cpu_to_le32(qobj->hw_res_handle); + output->cursor.hot_x = cpu_to_le32(hot_x); + output->cursor.hot_y = cpu_to_le32(hot_y); + virtio_gpu_cursor_ping(vgdev, output); +out: + drm_gem_object_unreference_unlocked(gobj); + return ret; +} + +static int virtio_gpu_crtc_cursor_move(struct drm_crtc *crtc, + int x, int y) +{ + struct virtio_gpu_device *vgdev = crtc->dev->dev_private; + struct virtio_gpu_output *output = + container_of(crtc, struct virtio_gpu_output, crtc); + + output->cu...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR); > + output->cursor.resource_id = cpu_to_le32(qobj->hw_res_handle); > + output->cursor.hot_x = cpu_to_le32(hot_x); > + output->cursor.hot_y = cpu_to_le32(hot_y); > + virtio_gpu_cursor_ping(vgdev, output); > +out: > + drm_gem_object_unreference_unlocked(gobj); > + return ret; > +} > + > +static int virtio_gpu_crtc_cursor_move(struct drm_crtc *crtc, > + int x, int y) > +{ > + struct virtio_gpu_device *vgdev = crtc->dev->dev_private; > + struct virtio_gpu_output *output = > + container_of(crtc, struc...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR); > + output->cursor.resource_id = cpu_to_le32(qobj->hw_res_handle); > + output->cursor.hot_x = cpu_to_le32(hot_x); > + output->cursor.hot_y = cpu_to_le32(hot_y); > + virtio_gpu_cursor_ping(vgdev, output); > +out: > + drm_gem_object_unreference_unlocked(gobj); > + return ret; > +} > + > +static int virtio_gpu_crtc_cursor_move(struct drm_crtc *crtc, > + int x, int y) > +{ > + struct virtio_gpu_device *vgdev = crtc->dev->dev_private; > + struct virtio_gpu_output *output = > + container_of(crtc, struc...
2012 Dec 12
43
[PATCH 00/37] [RFC] revamped modeset locking
Hi all, First thing first: It works, I now no longer have a few dropped frames every 10s on my testbox here with the pageflip i-g-t tests. Random notes: - New design has per-crtc locks to protect the crtc input-side (pageflip, cursor) for r/w and the output state of the crtc (mode, dpms) as read-only. It also required completely revamped fb lifecycle management, those are now refcounted