Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/prime: Limit scatter list size with dedicated DMA device

If a dedicated DMA device is specified for the DRM device, then the
scatter list size limit should pertain to the DMA device.

Use the dedicated DMA device, if given, to limit the scatter list size.
This only applies to drivers that have called drm_dev_set_dma_dev() and
are using drm_prime_pages_to_sg() either directly or through the SHMEM
helpers. At the time of this writing, the former case only includes the
Rockchip DRM driver, while the latter case includes the gud, udl, and
the tiny appletbdrm and gm12u320 drivers.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260311094929.3393338-2-wenst@chromium.org
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

+1 -1
+1 -1
drivers/gpu/drm/drm_prime.c
··· 859 859 return ERR_PTR(-ENOMEM); 860 860 861 861 if (dev) 862 - max_segment = dma_max_mapping_size(dev->dev); 862 + max_segment = dma_max_mapping_size(drm_dev_dma_dev(dev)); 863 863 if (max_segment == 0) 864 864 max_segment = UINT_MAX; 865 865 err = sg_alloc_table_from_pages_segment(sg, pages, nr_pages, 0,