public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* RFC: use dma_alloc_noncoherent in ttm_pool_alloc_page
@ 2021-05-11  6:05 Christoph Hellwig
  2021-05-11  6:05 ` [PATCH] drm/ttm: use dma_alloc_pages for the page pool Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2021-05-11  6:05 UTC (permalink / raw)
  To: Christian König, Huang Rui
  Cc: amd-gfx, Thomas Zimmermann, David Airlie, Roland Scheidegger,
	dri-devel, Maarten Lankhorst, Maxime Ripard, virtualization,
	iommu, VMware Graphics, Ben Skeggs, Daniel Vetter, nouveau,
	Alex Deucher, Dave Airlie, spice-devel, Zack Rusin

Hi all,

the memory allocation for the TTM pool is a big mess with two allocation
methods that both have issues, a layering violation and odd guessing of
pools in the callers.

This patch switches to the dma_alloc_noncoherent API instead fixing all
of the above issues.

Warning:  i don't have any of the relevant hardware, so this is a compile
tested request for comments only!

Diffstat:
 drivers/gpu/drm/amd/amdgpu/amdgpu.h     |    1 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |    4 
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c   |    1 
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c   |    1 
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c   |    1 
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   |    1 
 drivers/gpu/drm/drm_cache.c             |   31 -----
 drivers/gpu/drm/drm_gem_vram_helper.c   |    3 
 drivers/gpu/drm/nouveau/nouveau_ttm.c   |    8 -
 drivers/gpu/drm/qxl/qxl_ttm.c           |    3 
 drivers/gpu/drm/radeon/radeon.h         |    1 
 drivers/gpu/drm/radeon/radeon_device.c  |    1 
 drivers/gpu/drm/radeon/radeon_ttm.c     |    4 
 drivers/gpu/drm/ttm/ttm_device.c        |    7 -
 drivers/gpu/drm/ttm/ttm_pool.c          |  178 ++++----------------------------
 drivers/gpu/drm/ttm/ttm_tt.c            |   25 ----
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c     |    4 
 include/drm/drm_cache.h                 |    1 
 include/drm/ttm/ttm_device.h            |    3 
 include/drm/ttm/ttm_pool.h              |    9 -
 20 files changed, 41 insertions(+), 246 deletions(-)
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

end of thread, other threads:[~2021-05-11  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-11  6:05 RFC: use dma_alloc_noncoherent in ttm_pool_alloc_page Christoph Hellwig
2021-05-11  6:05 ` [PATCH] drm/ttm: use dma_alloc_pages for the page pool Christoph Hellwig
2021-05-11  7:35   ` Christian König
2021-05-11  8:50     ` Christoph Hellwig
2021-05-11  8:57       ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox