drm/gpusvm: set has_dma_mapping inside mapping loop
authorDafna Hirschfeld <dafna.hirschfeld@intel.com>
Mon, 28 Apr 2025 02:47:52 +0000 (19:47 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 2 May 2025 02:45:31 +0000 (21:45 -0500)
commite8e3a804f3845a147fbdf73f910c12ddb3a2a86f
tree5a8a9d4124947f173354082498f0cb03218ca69d
parent3393c90daf4e1704c6a5c3833439f461663a2e1d
drm/gpusvm: set has_dma_mapping inside mapping loop

The 'has_dma_mapping' flag should be set once there is a
mapping so it could be unmapped in case of error.

v2:
- Resend for CI

Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250428024752.881292-1-matthew.brost@intel.com
(cherry picked from commit f64cf7b681af72d3f715c0d0fd72091a54471c1a)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/drm_gpusvm.c