aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
Commit message (Collapse)AuthorAge
* drm/etnaviv: block 64K of address space behind each cmdstreamLucas Stach2016-10-10
| | | | | | | | To make sure we don't place anything there which might confuse the FE prefetcher. This gets rid of another case of FE MMU faults when the address space gets crowded before triggering the reaper. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: space out IOVA layout for cmdbufs on MMUv2Lucas Stach2016-09-15
| | | | | | | | | At least on the GC3000 the FE MMU is not properly flushing stale TLB entries. Make sure to map the cmdbufs with a big enough spacing in the IOVAs to not hit old/prefetched TLB entries when jumping to a newly mapped cmdbuf. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: implement IOMMUv2 translationLucas Stach2016-09-15
| | | | | | | | All other parts are now in place, so implement the actual translation step and hook it up, so the driver claims support for cores with the new MMU. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: map cmdbuf through MMU on version 2Lucas Stach2016-09-15
| | | | | | | | With MMUv2 all buffers need to be mapped through the MMU once it is enabled. Align the buffer size to 4K, as the MMU is only able to map page aligned buffers. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: split out iova search and MMU reaping logicLucas Stach2016-09-15
| | | | | | | | With MMUv2 the command buffers need to be mapped through the MMU. Split out the iova search and MMU reaping logic so it can be reused for the cmdbuf mapping, where no GEM object is involved. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: move gpu_va() to etnaviv mmuLucas Stach2016-09-15
| | | | | | | | 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>
* drm/etnaviv: move IOMMU domain allocation into etnaviv MMULucas Stach2016-09-15
| | | | | | | | The GPU code doesn't need to deal with the IOMMU directly, instead it can all be hidden behind the etnaviv mmu interface. Move the last remaining part into etnaviv mmu. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: indirect IOMMU restore through etnaviv MMULucas Stach2016-09-15
| | | | | | So we can call the v2 restore code once it is there. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: only try to use the linear window on MMUv1Lucas Stach2016-09-15
| | | | | | | As the comment above the code states, the linear window is only available on MMUv1. Don't try to use it on MMUv2. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm: etnaviv: clean up vram_mapping submission/retire pathRussell King2016-03-07
| | | | | | | | | | Currently, we scan the list of mappings each time we want to operate on the vram_mapping struct. Rather than repeatedly scanning these, look them up once in the submission path, and then use _reference and _unreference methods as necessary to manage this object. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* drm/etnaviv: add initial etnaviv DRM driverThe etnaviv authors2015-12-15
This adds the etnaviv DRM driver and hooks it up in Makefiles and Kconfig. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>