[PATCH v2 1/1] drm/ttm: allocate dummy_read_page without DMA32 on fail

2024-01-16 Thread Yangyu Chen
Some platforms may not have any memory in ZONE_DMA32 and use IOMMU to allow 32-bit-DMA-only device to work. Forcing GFP_DMA32 on dummy_read_page will fail on such platforms. Retry after fail will get this works on such platforms. Signed-off-by: Yangyu Chen --- drivers/gpu/drm/ttm/ttm_device.c

[PATCH v2 0/1] drm/ttm: allocate dummy_read_page without DMA32 on fail

2024-01-16 Thread Yangyu Chen
he if - Shorter warning message Yangyu Chen (1): drm/ttm: allocate dummy_read_page without DMA32 on fail drivers/gpu/drm/ttm/ttm_device.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 2.43.0

[PATCH 1/1] drm/ttm: allocate dummy_read_page without DMA32 on fail

2024-01-16 Thread Yangyu Chen
Some platforms may not have any memory in ZONE_DMA32 and use IOMMU to allow 32-bit-DMA-only device to work. Forcing GFP_DMA32 on dummy_read_page will fail on such platforms. Retry after fail will get this works on such platforms. Signed-off-by: Yangyu Chen --- drivers/gpu/drm/ttm/ttm_device.c

[PATCH 0/1] drm/ttm: allocate dummy_read_page without DMA32 on fail

2024-01-16 Thread Yangyu Chen
frame buffer device [1]. https://lore.kernel.org/lkml/2b715134-9d63-4de1-94e5-37e180aee...@amd.com/ Yangyu Chen (1): drm/ttm: allocate dummy_read_page without DMA32 on fail drivers/gpu/drm/ttm/ttm_device.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.43.0

Re: [PATCH] drm/ttm: only use DMA32 if needed for dummy_read_page

2024-01-16 Thread Yangyu Chen
On 1/16/24 17:45, Christian König wrote: Am 16.01.24 um 08:24 schrieb Yangyu Chen: Some platforms may not have any memory in ZONE_DMA32 and use IOMMU to allow 32-bit-DMA-only device to work. Forcing GFP_DMA32 on dummy_read_page will fail in such platforms. Only use DMA32 when it must to get

[PATCH] drm/ttm: only use DMA32 if needed for dummy_read_page

2024-01-16 Thread Yangyu Chen
Some platforms may not have any memory in ZONE_DMA32 and use IOMMU to allow 32-bit-DMA-only device to work. Forcing GFP_DMA32 on dummy_read_page will fail in such platforms. Only use DMA32 when it must to get the bug resolved. Signed-off-by: Yangyu Chen --- drivers/gpu/drm/ttm/ttm_device.c | 7