[PATCH 0/6] Etnaviv cmdbuf suballocator
Lucas Stach
l.stach at pengutronix.de
Wed Jan 18 11:25:16 UTC 2017
Hi all,
the following patches introduce a cmduf suballocator in the Etnaviv
kernel driver, which has the following benefits:
1. Allocating and freeing a CMA buffer for each user command submission
is taking a big toll on the CPU, as CMA is not exactly low overhead.
By suballocating a single buffer we avoid all this overhead.
2. Less TLB flushes on MMUv2. Each time a new buffer gets mapped into
the GPU address space on MMUv2 the TLBs need to be flushed. Mapping
the suballocated area once allows to skip the TLB flushes (at least
as long as userspace re-uses existing buffers).
3. No workarounds for GC3000 required anymore. The FE TLB flush on
GC3000 doesn't work reliably, which required us to map the cmdbufs
into the GPU address space at specific positions, which also isn't
guaranteed to work if the address space is already crowded. Having
a single static area for the cmdbufs side-steps the erratum completely.
If I can get reviews and/or enough testing, I would like to include this
code in kernel 4.11.
Regards,
Lucas
Lucas Stach (6):
drm/etnaviv: always flush MMU TLBs on map/unmap
drm/etnaviv: move cmdbuf de-/allocation into own file
drm/etnaviv: wire up iova handling in new cmdbuf abstraction
drm/etnaviv: get cmdbuf physical address through the cmdbuf
abstraction
drm/etnaviv: add cmdbuf suballocator
Revert "drm/etnaviv: trick drm_mm into giving out a low IOVA"
drivers/gpu/drm/etnaviv/Makefile | 1 +
drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 14 +--
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 153 +++++++++++++++++++++++++++
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 59 +++++++++++
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +-
drivers/gpu/drm/etnaviv/etnaviv_dump.c | 6 +-
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 8 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 61 ++++-------
drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 28 +----
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 4 +-
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 60 +++++------
drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 10 +-
12 files changed, 288 insertions(+), 120 deletions(-)
create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c
create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h
--
2.11.0
More information about the etnaviv
mailing list