Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Sanjay Yadav <sanjay.kumar.yadav@intel.com>,
	intel-xe@lists.freedesktop.org
Cc: "José Roberto de Souza" <jose.souza@intel.com>,
	"Stuart Summers" <stuart.summers@intel.com>
Subject: Re: [PATCH v2] drm/xe: Only advertise NO_COMPRESSION hint on devices with flat CCS
Date: Wed, 11 Feb 2026 16:49:25 +0000	[thread overview]
Message-ID: <afaf02c0-0449-4931-9e32-4e30782ae88a@intel.com> (raw)
In-Reply-To: <20260211114015.561461-2-sanjay.kumar.yadav@intel.com>

On 11/02/2026 11:40, Sanjay Yadav wrote:
> Devices like CRI have GRAPHICS_VER >= 20 but don't have compression
> support their PAT table (xe3p_xpc_pat_table) has no compression-enabled
> entries.
> 
> Only advertise HAS_NO_COMPRESSION_HINT flag when the device actually has
> flat CCS and thus compression capability.
> 
> v2:
> - Also reject NO_COMPRESSION flag in xe_gem_create_ioctl() when device
>    lacks flat CCS support (Matt A)
> - Updated commit subject to reflect changes in both xe_query.c and xe_bo.c
> 
> Fixes: 78d91ba6bd796 ("drm/xe/uapi: Add NO_COMPRESSION BO flag and query capability")
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Cc: Stuart Summers <stuart.summers@intel.com>
> Signed-off-by: Sanjay Yadav <sanjay.kumar.yadav@intel.com>

Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>   drivers/gpu/drm/xe/xe_bo.c    | 3 ++-
>   drivers/gpu/drm/xe/xe_query.c | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index 8bf16d60b9a5..4b29a442de3e 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -3200,7 +3200,8 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
>   		bo_flags |= XE_BO_FLAG_SCANOUT;
>   
>   	if (args->flags & DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION) {
> -		if (XE_IOCTL_DBG(xe, GRAPHICS_VER(xe) < 20))
> +		if (XE_IOCTL_DBG(xe, GRAPHICS_VER(xe) < 20 ||
> +				 !xe_device_has_flat_ccs(xe)))
>   			return -EOPNOTSUPP;
>   		bo_flags |= XE_BO_FLAG_NO_COMPRESSION;
>   	}
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index 34db266b723f..c152ebfbd7d8 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -335,7 +335,7 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
>   	if (xe->info.has_usm && IS_ENABLED(CONFIG_DRM_XE_GPUSVM))
>   		config->info[DRM_XE_QUERY_CONFIG_FLAGS] |=
>   			DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR;
> -	if (GRAPHICS_VER(xe) >= 20)
> +	if (GRAPHICS_VER(xe) >= 20 && xe_device_has_flat_ccs(xe))
>   		config->info[DRM_XE_QUERY_CONFIG_FLAGS] |=
>   			DRM_XE_QUERY_CONFIG_FLAG_HAS_NO_COMPRESSION_HINT;
>   	config->info[DRM_XE_QUERY_CONFIG_FLAGS] |=


  parent reply	other threads:[~2026-02-11 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 11:40 [PATCH v2] drm/xe: Only advertise NO_COMPRESSION hint on devices with flat CCS Sanjay Yadav
2026-02-11 12:49 ` ✓ CI.KUnit: success for " Patchwork
2026-02-11 14:07 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-11 16:49 ` Matthew Auld [this message]
2026-02-11 17:56 ` ✗ Xe.CI.FULL: failure " 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=afaf02c0-0449-4931-9e32-4e30782ae88a@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --cc=sanjay.kumar.yadav@intel.com \
    --cc=stuart.summers@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