dma-buf: heaps: rk_system_heaps: set dma ops before setting dma mask
Fixes: a2310c04c3 ("dma-buf: heaps: rk_system_heap: set swiotlb_dma_ops for heap device")
Change-Id: Ifbf70d5073e7eb52f1a85aeda27e465fc68cb289
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This commit is contained in:
@ -703,6 +703,9 @@ static int set_heap_dev_dma(struct device *heap_dev)
|
||||
if (!heap_dev)
|
||||
return -EINVAL;
|
||||
|
||||
/* Set a dma ops(swiotlb) for the heap device. */
|
||||
arch_setup_dma_ops(heap_dev, 0, 0, NULL, 0);
|
||||
|
||||
dma_coerce_mask_and_coherent(heap_dev, DMA_BIT_MASK(64));
|
||||
|
||||
if (!heap_dev->dma_parms) {
|
||||
@ -719,7 +722,6 @@ static int set_heap_dev_dma(struct device *heap_dev)
|
||||
return err;
|
||||
}
|
||||
}
|
||||
arch_setup_dma_ops(heap_dev, 0, 0, NULL, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user