[PATCH] drm/gpusvm: set has_dma_mapping inside mapping loop
Matthew Brost
matthew.brost at intel.com
Mon Apr 28 01:27:23 UTC 2025
On Sun, Apr 27, 2025 at 12:42:38PM +0300, Dafna Hirschfeld wrote:
> The 'has_dma_mapping' flag should be set once there is a
> mapping so it could be unmapped in case of error.
>
Good catch - LGTM but you need a fixes tag so this gets picked up in the
6.15 cycle.
With a fixes tag:
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
Do you have commit rights? If not let me know and merge this tomorrow
with a fixes tag.
Matt
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld at intel.com>
> ---
> drivers/gpu/drm/drm_gpusvm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c
> index 30408f2dd370..4e18b201b5e7 100644
> --- a/drivers/gpu/drm/drm_gpusvm.c
> +++ b/drivers/gpu/drm/drm_gpusvm.c
> @@ -1464,9 +1464,9 @@ int drm_gpusvm_range_get_pages(struct drm_gpusvm *gpusvm,
> }
> i += 1 << order;
> num_dma_mapped = i;
> + range->flags.has_dma_mapping = true;
> }
>
> - range->flags.has_dma_mapping = true;
> if (zdd) {
> range->flags.has_devmem_pages = true;
> range->dpagemap = dpagemap;
> --
> 2.34.1
>
More information about the Intel-xe
mailing list