Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Dugast <francois.dugast@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>,
	<thomas.hellstrom@linux.intel.com>,
	<himal.prasad.ghimiray@intel.com>
Subject: Re: [PATCH 2/2] drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages
Date: Mon, 2 Feb 2026 13:36:33 +0100	[thread overview]
Message-ID: <aYCaUawn5i4Vpk3v@fdugast-desk> (raw)
In-Reply-To: <20260130194928.3255613-3-matthew.brost@intel.com>

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 <matthew.brost@intel.com>

Reviewed-by: Francois Dugast <francois.dugast@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 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	other threads:[~2026-02-02 12:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 19:49 [PATCH 0/2] Small GPUSVM fixes Matthew Brost
2026-01-30 19:49 ` [PATCH 1/2] drm/gpusvm: Force unmapping on error in drm_gpusvm_get_pages Matthew Brost
2026-02-02 12:17   ` Francois Dugast
2026-01-30 19:49 ` [PATCH 2/2] drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages Matthew Brost
2026-02-02 12:36   ` Francois Dugast [this message]
2026-01-30 19:55 ` ✗ CI.checkpatch: warning for Small GPUSVM fixes Patchwork
2026-01-30 19:57 ` ✓ CI.KUnit: success " Patchwork
2026-01-30 20:30 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-03  6:15 ` ✗ CI.checkpatch: warning for Small GPUSVM fixes (rev2) Patchwork
2026-02-03  6:16 ` ✓ CI.KUnit: success " Patchwork
2026-02-03  6:50 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-03 19:33 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYCaUawn5i4Vpk3v@fdugast-desk \
    --to=francois.dugast@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox