From: Christoph Hellwig <hch@lst.de>
To: "Christian König" <christian.koenig@amd.com>,
"Huang Rui" <ray.huang@amd.com>
Cc: amd-gfx@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>,
Roland Scheidegger <sroland@vmware.com>,
dri-devel@lists.freedesktop.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
virtualization@lists.linux-foundation.org,
iommu@lists.linux-foundation.org,
VMware Graphics <linux-graphics-maintainer@vmware.com>,
Ben Skeggs <bskeggs@redhat.com>, Daniel Vetter <daniel@ffwll.ch>,
nouveau@lists.freedesktop.org,
Alex Deucher <alexander.deucher@amd.com>,
Dave Airlie <airlied@redhat.com>,
spice-devel@lists.freedesktop.org, Zack Rusin <zackr@vmware.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: RFC: use dma_alloc_noncoherent in ttm_pool_alloc_page
Date: Tue, 11 May 2021 08:05:13 +0200 [thread overview]
Message-ID: <20210511060514.3956745-1-hch@lst.de> (raw)
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(-)
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next reply other threads:[~2021-05-11 6:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 6:05 Christoph Hellwig [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210511060514.3956745-1-hch@lst.de \
--to=hch@lst.de \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=iommu@lists.linux-foundation.org \
--cc=kraxel@redhat.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ray.huang@amd.com \
--cc=spice-devel@lists.freedesktop.org \
--cc=sroland@vmware.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=zackr@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox