Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Nitin Gote <nitin.r.gote@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <matthew.auld@intel.com>
Subject: Re: [PATCH v3 1/3] drm/xe: add VM_BIND DECOMPRESS uapi flag
Date: Fri, 17 Oct 2025 14:54:33 -0700	[thread overview]
Message-ID: <aPK7GcLm5nYVHUy/@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251015104709.44476-2-nitin.r.gote@intel.com>

On Wed, Oct 15, 2025 at 04:17:07PM +0530, Nitin Gote wrote:
> Add a new VM_BIND flag, DRM_XE_VM_BIND_FLAG_DECOMPRESS, that lets userspace
> express intent for the driver to perform on-device in-place decompression
> for the GPU mapping created by a MAP bind operation.
> 
> This flag is used by subsequent driver changes to trigger scheduling of
> GPU work that resolves compressed VRAM pages into an uncompressed PAT
> VM mapping.
> 
> Behavior and semantics:
> - Valid only for DRM_XE_VM_BIND_OP_MAP. IOCTLs using this flag on other ops
>   are rejected (-EINVAL).
> - The bind's pat_index must select the device "no-compression" PAT entry;
>   otherwise the ioctl is rejected (-EINVAL).
> - Only meaningful for VRAM-backed BOs on devices that support Flat CCS and
>   the required hardware generation (driver will return -EOPNOTSUPP if not).
> - On success the driver schedules a migrate/resolve and installs the
>   returned dma_fence into the BO's kernel reservation
>   (DMA_RESV_USAGE_KERNEL).
> 
> v2: Add kernel doc (Matt)
> 
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
> ---
>  include/uapi/drm/xe_drm.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index 40ff19f52a8d..07bd63651a7e 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -1013,6 +1013,13 @@ struct drm_xe_vm_destroy {
>   *    valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
>   *    mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
>   *    handle MBZ, and the BO offset MBZ.
> + *  - DRM_XE_VM_BIND_FLAG_DECOMPRESS - Request on-device decompression for a MAP.
> + *    When set on a MAP bind operation, request the driver schedule an on-device
> + *    in-place decompression (via the migrate/resolve path) for the GPU mapping
> + *    created by this bind. Only valid for DRM_XE_VM_BIND_OP_MAP; usage on
> + *    other ops is rejected. The bind's pat_index must select the device's
> + *    "no-compression" PAT. Only meaningful for VRAM-backed BOs on devices that
> + *    support Flat CCS and the required HW generation XE2+.

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

Since this uAPI, I believe we should get a UMD ack here too ahead or merging.

Matt

>   *
>   * The @prefetch_mem_region_instance for %DRM_XE_VM_BIND_OP_PREFETCH can also be:
>   *  - %DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC, which ensures prefetching occurs in
> @@ -1119,6 +1126,7 @@ struct drm_xe_vm_bind_op {
>  #define DRM_XE_VM_BIND_FLAG_DUMPABLE	(1 << 3)
>  #define DRM_XE_VM_BIND_FLAG_CHECK_PXP	(1 << 4)
>  #define DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR	(1 << 5)
> +#define DRM_XE_VM_BIND_FLAG_DECOMPRESS	(1 << 6)
>  	/** @flags: Bind flags */
>  	__u32 flags;
>  
> -- 
> 2.25.1
> 

  reply	other threads:[~2025-10-18  2:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 10:47 [PATCH v3 0/3] drm/xe: add VM_BIND DECOMPRESS support and on‑demand decompression Nitin Gote
2025-10-15 10:47 ` [PATCH v3 1/3] drm/xe: add VM_BIND DECOMPRESS uapi flag Nitin Gote
2025-10-17 21:54   ` Matthew Brost [this message]
2025-10-15 10:47 ` [PATCH v3 2/3] drm/xe: add xe_migrate_resolve wrapper and is_vram_resolve support Nitin Gote
2025-10-17 21:52   ` Matthew Brost
2025-10-15 10:47 ` [PATCH v3 3/3] drm/xe: implement VM_BIND decompression in vm_bind_ioctl Nitin Gote
2025-10-17 22:19   ` Matthew Brost
2025-10-15 16:15 ` ✓ CI.KUnit: success for drm/xe: add VM_BIND DECOMPRESS support and on‑demand decompression (rev3) Patchwork
2025-10-15 16:55 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-16  2:10 ` ✓ Xe.CI.Full: " Patchwork
2025-10-17 17:38 ` [PATCH v3 0/3] drm/xe: add VM_BIND DECOMPRESS support and on‑demand decompression Matthew Brost

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=aPK7GcLm5nYVHUy/@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=nitin.r.gote@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