[RFC PATCH 0/2] drm/ttm: support device w/o coherency

Icenowy Zheng uwu at icenowy.me
Sat Jun 29 05:22:45 UTC 2024


This patchset tries to make TTM support devices w/o full DMA coherency
capability (usually due to part of the link between the device and the
CPU, esp. PCIe controller, do not have full coherency).

The patchset itself looks quite straightforward, however I don't know
why this isn't included in the kernel in years, so make it a RFC.

Tested on Rockchip RK3566, which has a PCIe controller w/o full
coherency with an AMD OLAND GPU (R7 240). Mainly radeon driver is
tested, but amdgpu driver is tried and at least OpenGL (glmark2) works.
(The board used for testing is a Quartz64, which has a PCIe slot that
can directly be seated with a PCIe graphics card)

Icenowy Zheng (2):
  drm/ttm: save the device's DMA coherency status in ttm_device
  drm/ttm: downgrade cached to write_combined when snooping not
    available

 drivers/gpu/drm/ttm/ttm_bo_util.c | 4 ++++
 drivers/gpu/drm/ttm/ttm_device.c  | 2 ++
 drivers/gpu/drm/ttm/ttm_tt.c      | 4 ++++
 include/drm/ttm/ttm_caching.h     | 3 ++-
 include/drm/ttm/ttm_device.h      | 5 +++++
 5 files changed, 17 insertions(+), 1 deletion(-)

-- 
2.45.2



More information about the dri-devel mailing list