Am 29.06.24 um 07:22 schrieb Icenowy Zheng:
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.
Well that's already supported your driver just need to request uncached TT allocations.
Regards, Christian.
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(-)