mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
video: rockchip: rga3: fix iommu device sync cache causing crash
When the iommu device calls the dma_sync_single_xx API, it will be regarded as being called through iova by default, so the physical address obtained will be invalid. Update driver version to 1.3.1 Change-Id: I0a2c8fcecd556eccee499e06f41d790043f1fa0d Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
|
||||
#define DRIVER_MAJOR_VERISON 1
|
||||
#define DRIVER_MINOR_VERSION 3
|
||||
#define DRIVER_REVISION_VERSION 0
|
||||
#define DRIVER_REVISION_VERSION 1
|
||||
#define DRIVER_PATCH_VERSION
|
||||
|
||||
#define DRIVER_VERSION (STR(DRIVER_MAJOR_VERISON) "." STR(DRIVER_MINOR_VERSION) \
|
||||
|
||||
@@ -1319,7 +1319,8 @@ static int rga_mm_sync_dma_sg_for_device(struct rga_internal_buffer *buffer,
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (buffer->mm_flag & RGA_MEM_PHYSICAL_CONTIGUOUS) {
|
||||
if (buffer->mm_flag & RGA_MEM_PHYSICAL_CONTIGUOUS &&
|
||||
scheduler->data->mmu != RGA_IOMMU) {
|
||||
dma_sync_single_for_device(scheduler->dev, buffer->phys_addr, buffer->size, dir);
|
||||
} else {
|
||||
sgt = rga_mm_lookup_sgt(buffer);
|
||||
@@ -1349,7 +1350,8 @@ static int rga_mm_sync_dma_sg_for_cpu(struct rga_internal_buffer *buffer,
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (buffer->mm_flag & RGA_MEM_PHYSICAL_CONTIGUOUS) {
|
||||
if (buffer->mm_flag & RGA_MEM_PHYSICAL_CONTIGUOUS &&
|
||||
scheduler->data->mmu != RGA_IOMMU) {
|
||||
dma_sync_single_for_cpu(scheduler->dev, buffer->phys_addr, buffer->size, dir);
|
||||
} else {
|
||||
sgt = rga_mm_lookup_sgt(buffer);
|
||||
|
||||
Reference in New Issue
Block a user