search for: ttm_bo_put

Displaying 20 results from an estimated 31 matches for "ttm_bo_put".

2018 Aug 09
0
[PATCH] drm/bochs: Replace ttm_bo_unref with ttm_bo_put
...t; index 39cd08416773..c9c7097030ca 100644 > --- a/drivers/gpu/drm/bochs/bochs_mm.c > +++ b/drivers/gpu/drm/bochs/bochs_mm.c > @@ -430,7 +430,7 @@ static void bochs_bo_unref(struct bochs_bo **bo) > return; > > tbo = &((*bo)->bo); > - ttm_bo_unref(&tbo); > + ttm_bo_put(tbo); fails to build: CC [M] drivers/gpu/drm/bochs/bochs_mm.o /home/kraxel/projects/linux/drivers/gpu/drm/bochs/bochs_mm.c: In function ?bochs_bo_unref?: /home/kraxel/projects/linux/drivers/gpu/drm/bochs/bochs_mm.c:433:2: error: implicit declaration of function ?ttm_bo_put? [-Werror=implicit-f...
2018 Aug 09
0
[PATCH] drm/cirrus: Replace ttm_bo_unref with ttm_bo_put
...0d54e10a34d..57f8fe6d020b 100644 > --- a/drivers/gpu/drm/cirrus/cirrus_main.c > +++ b/drivers/gpu/drm/cirrus/cirrus_main.c > @@ -269,7 +269,7 @@ static void cirrus_bo_unref(struct cirrus_bo **bo) > return; > > tbo = &((*bo)->bo); > - ttm_bo_unref(&tbo); > + ttm_bo_put(tbo); Fails to build too. cheers, Gerd
2018 Aug 09
0
[PATCH] drm/qxl: Replace ttm_bo_unref with ttm_bo_put
...9606c819d82 100644 > --- a/drivers/gpu/drm/qxl/qxl_gem.c > +++ b/drivers/gpu/drm/qxl/qxl_gem.c > @@ -40,7 +40,7 @@ void qxl_gem_object_free(struct drm_gem_object *gobj) > qxl_surface_evict(qdev, qobj, false); > > tbo = &qobj->tbo; > - ttm_bo_unref(&tbo); > + ttm_bo_put(tbo); Same here (using drm-misc-next btw). cheers, Gerd
2019 Jul 05
1
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve}
On Thu, Jul 04, 2019 at 12:17:48PM -0700, Chia-I Wu wrote: > On Thu, Jul 4, 2019 at 4:10 AM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > Hi, > > > > > > - r = ttm_bo_reserve(&bo->tbo, true, false, NULL); > > > > + r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL); > > > Can you elaborate a
2019 Apr 29
4
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...onstraints? (When I first looked at DRM I wondered what you used Virtual RAM for. But thats a long time ago so it counts only as a funny story. > + * Buffer-objects helpers > + */ > + > +static void drm_gem_vram_cleanup(struct drm_gem_vram_object *gbo) > +{ > + /* We got here via ttm_bo_put(), which means that the > + * TTM buffer object in 'bo' has already been cleaned > + * up; only release the GEM object. */ > + drm_gem_object_release(&gbo->gem); > +} > + > +static void drm_gem_vram_destroy(struct drm_gem_vram_object *gbo) > +{ > + drm_gem_v...
2019 Apr 29
4
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...onstraints? (When I first looked at DRM I wondered what you used Virtual RAM for. But thats a long time ago so it counts only as a funny story. > + * Buffer-objects helpers > + */ > + > +static void drm_gem_vram_cleanup(struct drm_gem_vram_object *gbo) > +{ > + /* We got here via ttm_bo_put(), which means that the > + * TTM buffer object in 'bo' has already been cleaned > + * up; only release the GEM object. */ > + drm_gem_object_release(&gbo->gem); > +} > + > +static void drm_gem_vram_destroy(struct drm_gem_vram_object *gbo) > +{ > + drm_gem_v...
2019 May 06
0
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...C: overview + * + * This library provides a GEM buffer object that is backed by video RAM + * (VRAM). It can be used for framebuffer devices with dedicated memory. + */ + +/* + * Buffer-objects helpers + */ + +static void drm_gem_vram_cleanup(struct drm_gem_vram_object *gbo) +{ + /* We got here via ttm_bo_put(), which means that the + * TTM buffer object in 'bo' has already been cleaned + * up; only release the GEM object. + */ + drm_gem_object_release(&gbo->gem); +} + +static void drm_gem_vram_destroy(struct drm_gem_vram_object *gbo) +{ + drm_gem_vram_cleanup(gbo); + kfree(gbo); +} +...
2019 Apr 29
0
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...+/** + * DOC: overview + * + * This library provides a GEM object that is backed by VRAM. It + * can be used for simple framebuffer devices with dedicated memory. + */ + +/* + * Buffer-objects helpers + */ + +static void drm_gem_vram_cleanup(struct drm_gem_vram_object *gbo) +{ + /* We got here via ttm_bo_put(), which means that the + * TTM buffer object in 'bo' has already been cleaned + * up; only release the GEM object. */ + drm_gem_object_release(&gbo->gem); +} + +static void drm_gem_vram_destroy(struct drm_gem_vram_object *gbo) +{ + drm_gem_vram_cleanup(gbo); + kfree(gbo); +} + +st...
2019 Aug 02
0
[PATCH v7 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...w, starting with virtio_gpu_execbuffer_ioctl. Stop using ttm helpers, use the virtio_gpu_array_* helpers (which work on the reservation objects directly) instead. Also store the object array in struct virtio_gpu_vbuffer, so we explicitly keep a reference of all buffers used instead of depending on ttm_bo_put() checking whenever the object is actually idle before releasing it. New workflow: (1) All gem objects needed by a command are added to a virtio_gpu_object_array. (2) All reservation objects will be locked (virtio_gpu_array_lock_resv). (3) virtio_gpu_fence_emit() completes fence initializ...
2020 Oct 24
1
kvm+nouveau induced lockdep gripe
...static void ttm_bo_release(struct kref * ttm_mem_global_free(&ttm_mem_glob, acc_size); } +static void ttm_bo_release(struct kref *kref) +{ + struct ttm_buffer_object *bo = container_of(kref, + struct ttm_buffer_object, kref); + call_rcu(&bo->rcu, ttm_bo_call_rcu_fn); +} + void ttm_bo_put(struct ttm_buffer_object *bo) { kref_put(&bo->kref, ttm_bo_release);
2019 Apr 29
21
[PATCH v3 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 Sep 16
4
[PATCH 0/4] drm/nouveau: Miscellaneous fixes
From: Thierry Reding <treding at nvidia.com> Hi Ben, these are fixes for a couple of issues that I've been running into when testing on various Tegra boards. The first two patches fix up issues in the fix that I had sent out earlier to fix the regression introduced in drm-misc-next. The first one is critical because it avoids a BUG_ON as reported by Ilia, while the second is less
2019 Apr 09
0
[PATCH 12/15] drm/vboxvideo: Convert vboxvideo driver to |struct drm_gem_ttm_object|
...dle = handle; > - > - return 0; > -} > - > -void vbox_gem_free_object(struct drm_gem_object *obj) > -{ > - struct vbox_bo *vbox_bo = gem_to_vbox_bo(obj); > + return drm_gem_ttm_fill_create_dumb(file, dev, &vbox->ttm.bdev, 0, > + false, args); > > - ttm_bo_put(&vbox_bo->bo); > -} > - > -static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo) > -{ > - return drm_vma_node_offset_addr(&bo->bo.vma_node); > -} > - > -int > -vbox_dumb_mmap_offset(struct drm_file *file, > - struct drm_device *dev, > -...
2019 Apr 24
21
[PATCH v2 00/17] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 Jul 02
2
[PATCH v6 11/18] drm/virtio: switch from ttm to gem shmem helpers
...ct virtio_gpu_object *bo) { - ttm_bo_get(&bo->tbo); + drm_gem_object_get(&bo->base.base); return bo; } static inline void virtio_gpu_object_unref(struct virtio_gpu_object **bo) { - struct ttm_buffer_object *tbo; - if ((*bo) == NULL) return; - tbo = &((*bo)->tbo); - ttm_bo_put(tbo); + drm_gem_object_put(&(*bo)->base.base); *bo = NULL; } static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo) { - return drm_vma_node_offset_addr(&bo->tbo.vma_node); + return drm_vma_node_offset_addr(&bo->base.base.vma_node); } static inl...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...ct virtio_gpu_object *bo) { - ttm_bo_get(&bo->tbo); + drm_gem_object_get(&bo->base.base); return bo; } static inline void virtio_gpu_object_unref(struct virtio_gpu_object **bo) { - struct ttm_buffer_object *tbo; - if ((*bo) == NULL) return; - tbo = &((*bo)->tbo); - ttm_bo_put(tbo); + drm_gem_object_put(&(*bo)->base.base); *bo = NULL; } static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo) { - return drm_vma_node_offset_addr(&bo->tbo.vma_node); + return drm_vma_node_offset_addr(&bo->base.base.vma_node); } static inl...