Skip to content

Commit e8e3a80

Browse files
dhirschfeld1lucasdemarchi
authored andcommitted
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: 99624bd ("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 f64cf7b) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 3393c90 commit e8e3a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_gpusvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,9 +1469,9 @@ int drm_gpusvm_range_get_pages(struct drm_gpusvm *gpusvm,
14691469
}
14701470
i += 1 << order;
14711471
num_dma_mapped = i;
1472+
range->flags.has_dma_mapping = true;
14721473
}
14731474

1474-
range->flags.has_dma_mapping = true;
14751475
if (zdd) {
14761476
range->flags.has_devmem_pages = true;
14771477
range->dpagemap = dpagemap;

0 commit comments

Comments
 (0)