On Fri, Jan 30, 2026 at 11:49:28AM -0800, Matthew Brost wrote:
> The current code rejects device mappings whenever system pages have
> already been encountered. This is not the intended behavior when
> allow_mixed is set.
> 
> Relax the restriction by permitting a single pagemap to be selected when
> allow_mixed is enabled, even if system pages were found earlier.
> 
> Fixed: bce13d6ecd6c ("drm/gpusvm, drm/xe: Allow mixed mappings for userptr")
> Signed-off-by: Matthew Brost <[email protected]>

Reviewed-by: Francois Dugast <[email protected]>

> ---
>  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 d733599ceb9a..871fcccd128a 100644
> --- a/drivers/gpu/drm/drm_gpusvm.c
> +++ b/drivers/gpu/drm/drm_gpusvm.c
> @@ -1495,7 +1495,7 @@ int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
>                       }
>                       zdd = page->zone_device_data;
>                       if (pagemap != page_pgmap(page)) {
> -                             if (i > 0) {
> +                             if (pagemap) {
>                                       err = -EOPNOTSUPP;
>                                       goto err_unmap;
>                               }
> -- 
> 2.34.1
> 

Reply via email to