diff options
| author | Rob Clark <[email protected]> | 2025-06-29 20:13:00 +0000 |
|---|---|---|
| committer | Rob Clark <[email protected]> | 2025-07-05 00:48:35 +0000 |
| commit | 2c7ad9925523f644fe808b243921ebd5c01590e5 (patch) | |
| tree | 7f409e0c65eb68b751104decb5082062af68c3cf /drivers/gpu/drm/msm/adreno/a2xx_gpummu.c | |
| parent | drm/msm: Split out helper to get iommu prot flags (diff) | |
| download | kernel-2c7ad9925523f644fe808b243921ebd5c01590e5.tar.gz kernel-2c7ad9925523f644fe808b243921ebd5c01590e5.zip | |
drm/msm: Add mmu support for non-zero offset
Only needs to be supported for iopgtables mmu, the other cases are
either only used for kernel managed mappings (where offset is always
zero) or devices which do not support sparse bindings.
Signed-off-by: Rob Clark <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Tested-by: Antonino Maniscalco <[email protected]>
Reviewed-by: Antonino Maniscalco <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/661501/
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a2xx_gpummu.c')
| -rw-r--r-- | drivers/gpu/drm/msm/adreno/a2xx_gpummu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c index 4280f71e472a..0407c9bc8c1b 100644 --- a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c +++ b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c @@ -29,13 +29,16 @@ static void a2xx_gpummu_detach(struct msm_mmu *mmu) } static int a2xx_gpummu_map(struct msm_mmu *mmu, uint64_t iova, - struct sg_table *sgt, size_t len, int prot) + struct sg_table *sgt, size_t off, size_t len, + int prot) { struct a2xx_gpummu *gpummu = to_a2xx_gpummu(mmu); unsigned idx = (iova - GPUMMU_VA_START) / GPUMMU_PAGE_SIZE; struct sg_dma_page_iter dma_iter; unsigned prot_bits = 0; + WARN_ON(off != 0); + if (prot & IOMMU_WRITE) prot_bits |= 1; if (prot & IOMMU_READ) |
