Skip to content

Commit

Permalink
Merge pull request #142 from slaclab/fix_stream_mode_dma_alloc
Browse files Browse the repository at this point in the history
Allocate non-coherent DMA pages in stream mode
  • Loading branch information
ruck314 authored Jun 19, 2024
2 parents c8644cf + ceaaad1 commit 60d2b17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/driver/dma_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ size_t dmaAllocBuffers ( struct DmaDevice *dev, struct DmaBufferList *list,

// Streaming buffer type, standard kernel memory
else if ( list->dev->cfgMode & BUFF_STREAM ) {
buff->buffAddr = dma_alloc_coherent(list->dev->device, list->dev->cfgSize, &buff->buffHandle, GFP_KERNEL);
buff->buffAddr = dma_alloc_pages(list->dev->device, list->dev->cfgSize, &buff->buffHandle, direction, GFP_KERNEL);

// Check for mapping error
if (buff->buffAddr == NULL) {
dev_err(dev->device,"dmaAllocBuffers: dma_alloc_coherent failed\n");
dev_err(dev->device, "dmaAllocBuffers: dma_alloc_pages failed\n");
}
}

Expand Down

0 comments on commit 60d2b17

Please sign in to comment.