All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] msm/gpu/a6xx: use the DMA-API for GMU memory allocations
@ 2020-03-02 20:47 ` Jordan Crouse
  0 siblings, 0 replies; 10+ messages in thread
From: Jordan Crouse @ 2020-03-02 20:47 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: smasetty, John Stultz, Sean Paul, devicetree, Stephen Boyd,
	Douglas Anderson, linux-kernel, dri-devel, Rob Herring,
	Rob Clark, David Airlie, Michael J. Ruhl, freedreno,
	Daniel Vetter

When CONFIG_INIT_ON_ALLOC_DEFAULT_ON the GMU memory allocator runs afoul of
cache coherency issues because it is mapped as write-combine without clearing
the cache after it was zeroed.

Rather than duplicate the hacky workaround we use in the GEM allocator for the
same reason it turns out that we don't need to have a bespoke memory allocator
for the GMU anyway. It uses a flat, global address space and there are only
two relatively minor allocations anyway. In short, this is essentially what the
DMA API was created for so replace a bunch of memory management code with two
calls to allocate and free DMA memory and we're fine.

In a previous version of this series I added the dma-ranges property to the
device tree file for the GMU and updated the bindings to YAML. Rob correctly
pointed out that we didn't need dma-ranges any more but I'm still pushing the
YAML conversion because it is good and we'll eventually need it anyway so why
not.

v4: Use dma_alloc_wc() wrappers per Michael Ruhl.

v3: Fix YAML description per RobH and remove dma-ranges and replace it with the
correct DMA mask in the GMU device. Convert the iova type to a dma_attr_t to
make it 32 bit friendly.

v2: Fix the example bindings for dma-ranges - the third item is the size
Pass false to of_dma_configure so that it fails probe if the DMA region is not
set up.

Jordan Crouse (2):
  dt-bindings: display: msm: Convert GMU bindings to YAML
  drm/msm/a6xx: Use the DMA API for GMU memory objects

 .../devicetree/bindings/display/msm/gmu.txt        | 116 -------------------
 .../devicetree/bindings/display/msm/gmu.yaml       | 123 +++++++++++++++++++++
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              | 113 ++-----------------
 drivers/gpu/drm/msm/adreno/a6xx_gmu.h              |   6 +-
 4 files changed, 135 insertions(+), 223 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/msm/gmu.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/gmu.yaml

-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-03  2:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 20:47 [PATCH v4 0/2] msm/gpu/a6xx: use the DMA-API for GMU memory allocations Jordan Crouse
2020-03-02 20:47 ` Jordan Crouse
2020-03-02 20:47 ` [PATCH v4 1/2] dt-bindings: display: msm: Convert GMU bindings to YAML Jordan Crouse
2020-03-02 20:47   ` Jordan Crouse
2020-03-03  2:03   ` Rob Herring
2020-03-03  2:03     ` Rob Herring
2020-03-02 20:47 ` [PATCH v4 2/2] drm/msm/a6xx: Use the DMA API for GMU memory objects Jordan Crouse
2020-03-02 20:47   ` Jordan Crouse
2020-03-02 20:58   ` Ruhl, Michael J
2020-03-02 20:58     ` Ruhl, Michael J

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.