search for: ttm_dma_tt_init

Displaying 20 results from an estimated 34 matches for "ttm_dma_tt_init".

2018 Feb 27
4
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
Hi guys, at least on amdgpu and radeon the page array allocated by ttm_dma_tt_init is completely unused in the case of DMA-buf sharing. So I'm trying to get rid of that by only allocating the DMA address array. Now the only other user of DMA-buf together with ttm_dma_tt_init is Nouveau. So my question is are you guys using the page array anywhere in your kernel driver in...
2014 Dec 10
2
[PATCH] drm: sgdma: free allocated memory if TT init fails
When ttm_dma_tt_init() fails in nouveau_sgdma_create_ttm(), we should free the previously allocated memory before returning NULL. Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> --- drm/nouveau_sgdma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drm/nouveau_sgdma.c b/drm/no...
2018 Mar 05
0
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
Ping? Am 27.02.2018 um 13:07 schrieb Christian König: > Hi guys, > > at least on amdgpu and radeon the page array allocated by > ttm_dma_tt_init is completely unused in the case of DMA-buf sharing. > So I'm trying to get rid of that by only allocating the DMA address > array. > > Now the only other user of DMA-buf together with ttm_dma_tt_init is > Nouveau. So my question is are you guys using the page array anywhere...
2014 Dec 10
0
[PATCH] drm: sgdma: free allocated memory if TT init fails
...y few months... How about one that instead adds a comment which explains why this kfree isn't needed :) [I'm leaving the reason to the reader, which will force you to glance at the ttm code.] On Wed, Dec 10, 2014 at 1:37 PM, Alexandre Courbot <acourbot at nvidia.com> wrote: > When ttm_dma_tt_init() fails in nouveau_sgdma_create_ttm(), we should > free the previously allocated memory before returning NULL. > > Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> > --- > drm/nouveau_sgdma.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > dif...
2014 Dec 10
0
[PATCH] drm: sgdma: add comment around suspiscious error handler
..., 5 insertions(+) diff --git a/drm/nouveau_sgdma.c b/drm/nouveau_sgdma.c index ec76c0b4e452..23c377a6c761 100644 --- a/drm/nouveau_sgdma.c +++ b/drm/nouveau_sgdma.c @@ -106,6 +106,11 @@ nouveau_sgdma_create_ttm(struct ttm_bo_device *bdev, nvbe->ttm.ttm.func = &nv50_sgdma_backend; if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) + /* + * A failing ttm_dma_tt_init() will call ttm_tt_destroy() + * and thus our nouveau_sgdma_destroy() hook, so we don't need + * to free nvbe here. + */ return NULL; return &nvbe->ttm.ttm; } -- 2.1.3
2014 Dec 10
1
[PATCH] drm: sgdma: free allocated memory if TT init fails
On 12/11/2014 03:47 AM, Ilia Mirkin wrote: > We get this patch every few months... How about one that instead adds > a comment which explains why this kfree isn't needed :) [I'm leaving > the reason to the reader, which will force you to glance at the ttm > code.] ttm_dma_tt_init -> ttm_tt_destroy -> nouveau_sgdma_destroy -> kfree Urrk. I'm definitely not a fan of things happening this way, but let it be. Indeed a comment would be nice to have here, let me prep a patch for this instead...
2014 May 19
0
[PATCH 2/4] drm/ttm: introduce dma cache sync helpers
...ion.h> +#include <linux/device.h> struct ttm_backend_func { /** @@ -690,6 +691,33 @@ extern int ttm_tt_swapout(struct ttm_tt *ttm, */ extern void ttm_tt_unpopulate(struct ttm_tt *ttm); +/** + * ttm_dma_tt_cache_sync_for_device: + * + * @ttm A struct ttm_tt of the type returned by ttm_dma_tt_init. + * @dev A struct device representing the device to which to sync. + * + * This function will flush the CPU caches on arches where snooping in the + * TT is not available. On fully coherent arches this will turn into an (almost) + * noop. This makes sure that data written by the CPU is visible to...
2014 Jun 24
0
[PATCH v2 2/3] drm/ttm: introduce dma cache sync helpers
...ion.h> +#include <linux/device.h> struct ttm_backend_func { /** @@ -690,6 +691,33 @@ extern int ttm_tt_swapout(struct ttm_tt *ttm, */ extern void ttm_tt_unpopulate(struct ttm_tt *ttm); +/** + * ttm_dma_tt_cache_sync_for_device: + * + * @ttm A struct ttm_tt of the type returned by ttm_dma_tt_init. + * @dev A struct device representing the device to which to sync. + * + * This function will flush the CPU caches on arches where snooping in the + * TT is not available. On fully coherent arches this will turn into an (almost) + * noop. This makes sure that data written by the CPU is visible to...
2018 Nov 07
0
[PATCH] drm/qxl: use ttm_tt
...301,13 +301,13 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo, gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL); if (gtt == NULL) return NULL; - gtt->ttm.ttm.func = &qxl_backend_func; + gtt->ttm.func = &qxl_backend_func; gtt->qdev = qdev; - if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { + if (ttm_tt_init(&gtt->ttm, bo, page_flags)) { kfree(gtt); return NULL; } - return &gtt->ttm.ttm; + return &gtt->ttm; } static void qxl_move_null(struct ttm_buffer_object *bo, -- 2.9.3
2014 Jun 24
4
[PATCH v2 0/3] drm/ttm: nouveau: memory coherency for ARM
For this v2 I have fixed the patches that are non-controversial (all Lucas' :)) and am resubmitting them in the hope that they will get merged. This will just leave the issue of Nouveau system-memory buffers mapping to be solved. This issue is quite complex, so let me summarize the situation and the data I have at hand. ARM caching is like a quantum world where Murphy's law constantly
2018 Dec 19
0
[PATCH 04/10] drm/virtio: move virtio_gpu_object_{attach, detach} calls.
...gtt = kzalloc(sizeof(struct virtio_gpu_ttm_tt), GFP_KERNEL); if (gtt == NULL) return NULL; - gtt->ttm.ttm.func = &virtio_gpu_backend_func; - gtt->vgdev = vgdev; + gtt->ttm.ttm.func = &virtio_gpu_tt_func; + gtt->obj = container_of(bo, struct virtio_gpu_object, tbo); if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { kfree(gtt); return NULL; @@ -251,51 +254,6 @@ static struct ttm_tt *virtio_gpu_ttm_tt_create(struct ttm_buffer_object *bo, return &gtt->ttm.ttm; } -static void virtio_gpu_move_null(struct ttm_buffer_object *bo, - struct ttm_mem_reg *new_mem...
2019 Mar 18
0
[PATCH v3 1/5] drm/virtio: move virtio_gpu_object_{attach, detach} calls.
...gtt = kzalloc(sizeof(struct virtio_gpu_ttm_tt), GFP_KERNEL); if (gtt == NULL) return NULL; - gtt->ttm.ttm.func = &virtio_gpu_backend_func; - gtt->vgdev = vgdev; + gtt->ttm.ttm.func = &virtio_gpu_tt_func; + gtt->obj = container_of(bo, struct virtio_gpu_object, tbo); if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { kfree(gtt); return NULL; @@ -251,51 +254,6 @@ static struct ttm_tt *virtio_gpu_ttm_tt_create(struct ttm_buffer_object *bo, return &gtt->ttm.ttm; } -static void virtio_gpu_move_null(struct ttm_buffer_object *bo, - struct ttm_mem_reg *new_mem...
2014 May 19
8
[PATCH 0/4] drm/ttm: nouveau: memory coherency fixes for ARM
This small series introduces TTM helper functions as well as Nouveau hooks that are needed to ensure buffer coherency on ARM. Most of this series is a forward-port of some patches Lucas Stach sent last year and that are also needed for Nouveau GK20A support: http://lists.freedesktop.org/archives/nouveau/2013-August/014026.html Another patch takes care of flushing the CPU write-buffer when
2013 Aug 28
11
[PATCH 0/6] Nouveau on ARM fixes
This is the first set of patches to make Nouveau work on Tegra. Those are only the obvious correctness fixes, a lot of optimization work remains to be done, but at least it's enough to get accel working and let the machine survive a piglit run. A new BO flag is introduced to allow userspace to hint the kernel about possible optimizations. Lucas Stach (6): drm/ttm: recognize ARM arch in
2014 May 19
2
[PATCH 3/4] drm/nouveau: hook up cache sync functions
On Mon, May 19, 2014 at 04:10:57PM +0900, Alexandre Courbot wrote: > From: Lucas Stach <dev at lynxeye.de> > > Signed-off-by: Lucas Stach <dev at lynxeye.de> > [acourbot at nvidia.com: make conditional and platform-friendly] > Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> Perhaps having a propery commit message here would be good. > diff --git
2014 Aug 17
0
FYI: Nouveau bug exposed in the latest fedora kernel
...m_fill+0x91/0x230 [nouveau] [ 402.177990] [<ffffffffa013089e>] nv44_vm_map_sg+0x1ae/0x1d0 [nouveau] [ 402.178020] [<ffffffffa012f507>] nouveau_vm_map+0x287/0x3d0 [nouveau] [ 402.178026] [<ffffffff811ca7f7>] ? __kmalloc+0x1f7/0x240 [ 402.178039] [<ffffffffa005f3a2>] ? ttm_dma_tt_init+0xe2/0x110 [ttm] [ 402.178077] [<ffffffffa0173c0e>] nv04_sgdma_bind+0x4e/0x80 [nouveau] [ 402.178087] [<ffffffffa005ecaf>] ttm_tt_bind+0x4f/0x70 [ttm] [ 402.178096] [<ffffffffa006100f>] ttm_bo_handle_move_mem+0x54f/0x5b0 [ttm] [ 402.178104] [<ffffffffa00616b9>] ? ttm...
2014 Jul 18
22
[Bug 81485] New: dmesg spam on startup
https://bugs.freedesktop.org/show_bug.cgi?id=81485 Priority: medium Bug ID: 81485 Assignee: nouveau at lists.freedesktop.org Summary: dmesg spam on startup QA Contact: xorg-team at lists.x.org Severity: normal Classification: Unclassified OS: All Reporter: fry.kun at gmail.com Hardware: Other
2019 Jul 02
2
[PATCH v6 11/18] drm/virtio: switch from ttm to gem shmem helpers
...- struct virtio_gpu_ttm_tt *gtt; - - vgdev = virtio_gpu_get_vgdev(bo->bdev); - gtt = kzalloc(sizeof(struct virtio_gpu_ttm_tt), GFP_KERNEL); - if (gtt == NULL) - return NULL; - gtt->ttm.ttm.func = &virtio_gpu_tt_func; - gtt->obj = container_of(bo, struct virtio_gpu_object, tbo); - if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { - kfree(gtt); - return NULL; - } - return &gtt->ttm.ttm; -} - -static void virtio_gpu_bo_swap_notify(struct ttm_buffer_object *tbo) -{ - struct virtio_gpu_object *bo; - - bo = container_of(tbo, struct virtio_gpu_object, tbo); - - if (bo->pages) - vi...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...- struct virtio_gpu_ttm_tt *gtt; - - vgdev = virtio_gpu_get_vgdev(bo->bdev); - gtt = kzalloc(sizeof(struct virtio_gpu_ttm_tt), GFP_KERNEL); - if (gtt == NULL) - return NULL; - gtt->ttm.ttm.func = &virtio_gpu_tt_func; - gtt->obj = container_of(bo, struct virtio_gpu_object, tbo); - if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { - kfree(gtt); - return NULL; - } - return &gtt->ttm.ttm; -} - -static void virtio_gpu_bo_swap_notify(struct ttm_buffer_object *tbo) -{ - struct virtio_gpu_object *bo; - - bo = container_of(tbo, struct virtio_gpu_object, tbo); - - if (bo->pages) - vi...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...- struct virtio_gpu_ttm_tt *gtt; - - vgdev = virtio_gpu_get_vgdev(bo->bdev); - gtt = kzalloc(sizeof(struct virtio_gpu_ttm_tt), GFP_KERNEL); - if (gtt == NULL) - return NULL; - gtt->ttm.ttm.func = &virtio_gpu_tt_func; - gtt->obj = container_of(bo, struct virtio_gpu_object, tbo); - if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { - kfree(gtt); - return NULL; - } - return &gtt->ttm.ttm; -} - -static void virtio_gpu_bo_swap_notify(struct ttm_buffer_object *tbo) -{ - struct virtio_gpu_object *bo; - - bo = container_of(tbo, struct virtio_gpu_object, tbo); - - if (bo->pages) - vi...