diff options
| author | Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | 2023-05-16 03:26:53 +0000 |
|---|---|---|
| committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:34:01 -0500 |
| commit | 1b1d3710380d5f0517dcaabe1b96b6401f68ec37 (patch) | |
| tree | 3c58bafc2a821c4f033e78dfa64be24565965bc4 /include/uapi | |
| parent | drm/xe: Add stepping support for GMD_ID platforms (diff) | |
| download | linux-1b1d3710380d5f0517dcaabe1b96b6401f68ec37.tar.gz linux-1b1d3710380d5f0517dcaabe1b96b6401f68ec37.zip | |
drm/xe: Apply upper limit to sg element size
The iommu_dma_map_sg() function ensures iova allocation doesn't
cross dma segment boundary. It does so by padding some sg elements.
This can cause overflow, ending up with sg->length being set to 0.
Avoid this by halving the maximum segment size (rounded down to
PAGE_SIZE).
Specify maximum segment size for sg elements by using
sg_alloc_table_from_pages_segment() to allocate sg_table.
v2: Use correct max segment size in dma_set_max_seg_size() call
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Bruce Chang <yu.bruce.chang@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions
