[PATCH v2 0/3] AMDGPU / RADEON / DRM Fix mapping of user pages

Shane Francis bigbeeshane at gmail.com
Mon Mar 23 23:51:35 UTC 2020


This patch set is to fix a bug in amdgpu / radeon drm that results in
a crash when dma_map_sg combines segments. There are 2 shortfalls
in the current kernel.

1) AMDGPU / RADEON assumes that the requested and created segments
   from dma_map_sg are equal

2) drm_prime does not allow for setting the segment length
   via the correct dma macro

Shane Francis (3):
  drm/prime: correct logic for mapping sg to arrays
  drm/amdgpu: fix scatter-gather mapping with user pages
  drm/radeon: fix scatter-gather mapping with user pages

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |  7 +--
 drivers/gpu/drm/drm_prime.c             | 71 +++++++++++++++++++++----
 drivers/gpu/drm/radeon/radeon_ttm.c     |  7 +--
 include/drm/drm_prime.h                 |  5 ++
 4 files changed, 75 insertions(+), 15 deletions(-)

-- 
2.26.0



More information about the dri-devel mailing list