search for: nvkm_firmware_img_dma

Displaying 5 results from an estimated 5 matches for "nvkm_firmware_img_dma".

2024 Apr 26
3
[PATCH 1/2] drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()
...RDI: 0000000000000035 RBP: 00007ffcf220b380 R08: 00007feeb5d8fb20 R09: 00007ffcf220b310 R10: 000055fdd2909dc0 R11: 0000000000000246 R12: 000055fdd29161e0 R13: 0000000000020000 R14: 000055fdd29203e0 R15: 000055fdd2909d80 </TASK> We hit this because when initializing firmware of type NVKM_FIRMWARE_IMG_DMA we allocate coherent memory and then attempt to include that coherent memory in a scatterlist. What we actually mean to do here though is to pass a CPU-allocated memory address, since that's the only thing that would make sense to put in the scatterlist. Signed-off-by: Lyude Paul <lyude at...
2024 Aug 15
2
[PATCH] nouveau/firmware: using dma non-coherent interfaces for fw loading. (v2)
...nouveau/nvkm/core/firmware.c b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c index adc60b25f8e6..0af01a0ec601 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c @@ -205,7 +205,8 @@ nvkm_firmware_dtor(struct nvkm_firmware *fw) break; case NVKM_FIRMWARE_IMG_DMA: nvkm_memory_unref(&memory); - dma_free_coherent(fw->device->dev, sg_dma_len(&fw->mem.sgl), fw->img, fw->phys); + dma_free_noncoherent(fw->device->dev, sg_dma_len(&fw->mem.sgl), + fw->img, fw->phys, DMA_TO_DEVICE); break; case NVKM_FIRMWAR...
2024 Apr 26
1
[PATCH 1/2] drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()
On Fri, 2024-04-26 at 11:41 -0400, Lyude Paul wrote: > We hit this because when initializing firmware of type > NVKM_FIRMWARE_IMG_DMA we allocate coherent memory and then attempt to > include that coherent memory in a scatterlist. I'm sure this patch is a good one, and I will try to test it soon, but I am very curious to know why including coherent memory in a scatterlist is bad.
2024 Aug 16
1
[PATCH] nouveau/firmware: using dma non-coherent interfaces for fw loading. (v2)
.../drivers/gpu/drm/nouveau/nvkm/core/firmware.c > index adc60b25f8e6..0af01a0ec601 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c > +++ b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c > @@ -205,7 +205,8 @@ nvkm_firmware_dtor(struct nvkm_firmware *fw) > break; > case NVKM_FIRMWARE_IMG_DMA: > nvkm_memory_unref(&memory); > - dma_free_coherent(fw->device->dev, sg_dma_len(&fw->mem.sgl), fw->img, fw->phys); > + dma_free_noncoherent(fw->device->dev, sg_dma_len(&fw->mem.sgl), > + fw->img, fw->phys, DMA_TO_DEVICE); > b...
2024 Apr 28
1
[PATCH 1/2] drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()
On Fri, 2024-04-26 at 15:47 +0000, Timur Tabi wrote: > On Fri, 2024-04-26 at 11:41 -0400, Lyude Paul wrote: > > We hit this because when initializing firmware of type > > NVKM_FIRMWARE_IMG_DMA we allocate coherent memory and then attempt > > to > > include that coherent memory in a scatterlist. > > I'm sure this patch is a good one, and I will try to test it soon, > but I am > very curious to know why including coherent memory in a scatterlist > is bad....