diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2016-08-17 14:57:51 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2016-09-15 15:29:37 +0200 |
commit | e07c0db5e84a5f1a16af8567d5fdde2ca6d2c80e (patch) | |
tree | 781ad8eeff8ea21269672fdc6ab958f49afcb21e /drivers/gpu/drm/etnaviv/etnaviv_mmu.c | |
parent | drm/etnaviv: remove unused iommu_v2 header (diff) | |
download | linux-e07c0db5e84a5f1a16af8567d5fdde2ca6d2c80e.tar.xz linux-e07c0db5e84a5f1a16af8567d5fdde2ca6d2c80e.zip |
drm/etnaviv: move gpu_va() to etnaviv mmu
The GPU virtual address for the command buffers differs depending on
the IOMMU version. Move the calculation of the iova into etnaviv
mmu, to enable proper dispatch.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_mmu.c')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c index e744c6d81a2d..d62125eb30d8 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c @@ -304,6 +304,12 @@ void etnaviv_iommu_restore(struct etnaviv_gpu *gpu) dev_err(gpu->dev, "IOMMUv2 restore not implemented\n"); } +u32 etnaviv_iommu_get_cmdbuf_va(struct etnaviv_gpu *gpu, + struct etnaviv_cmdbuf *buf) +{ + return buf->paddr - gpu->memory_base; +} + size_t etnaviv_iommu_dump_size(struct etnaviv_iommu *iommu) { struct etnaviv_iommu_ops *ops; |