Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yadav, Sanjay Kumar" <sanjay.kumar.yadav@intel.com>
To: Xin Wang <x.wang@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <shuicheng.lin@intel.com>, <alex.zuo@intel.com>,
	<nitin.r.gote@intel.com>,  <matthew.d.roper@intel.com>,
	<matthew.auld@intel.com>
Subject: Re: [PATCH 1/1] drm/xe/pat: Add helper to query compression enable status
Date: Wed, 12 Nov 2025 09:45:16 +0530	[thread overview]
Message-ID: <7c2ff78a-35f1-413d-8391-81c4b1afe0da@intel.com> (raw)
In-Reply-To: <20251110221458.1864507-2-x.wang@intel.com>


On 11-11-2025 03:44, Xin Wang wrote:
> Add xe_pat_index_get_comp_en() helper function to check whether
> compression is enabled for a given PAT index by extracting the
> XE2_COMP_EN bit from the PAT table entry.
>
> CC: Nitin Gote <nitin.r.gote@intel.com>
> CC: Sanjay Yadav <sanjay.kumar.yadav@intel.com>
> CC: Matt Roper <matthew.d.roper@intel.com>
> Suggested-by: Matthew Auld <matthew.auld@intel.com>
> Signed-off-by: Xin Wang <x.wang@intel.com>

Reviewed-by: Sanjay Yadav <sanjay.kumar.yadav@intel.com 
<mailto:sanjay.kumar.yadav@intel.com>>

LGTM

> ---
>   drivers/gpu/drm/xe/xe_pat.c |  6 ++++++
>   drivers/gpu/drm/xe/xe_pat.h | 10 ++++++++++
>   2 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
> index 68171cceea18..1b4d5d3def0f 100644
> --- a/drivers/gpu/drm/xe/xe_pat.c
> +++ b/drivers/gpu/drm/xe/xe_pat.c
> @@ -196,6 +196,12 @@ u16 xe_pat_index_get_coh_mode(struct xe_device *xe, u16 pat_index)
>   	return xe->pat.table[pat_index].coh_mode;
>   }
>   
> +bool xe_pat_index_get_comp_en(struct xe_device *xe, u16 pat_index)
> +{
> +	WARN_ON(pat_index >= xe->pat.n_entries);
> +	return !!(xe->pat.table[pat_index].value & XE2_COMP_EN);
> +}
> +
>   static void program_pat(struct xe_gt *gt, const struct xe_pat_table_entry table[],
>   			int n_entries)
>   {
> diff --git a/drivers/gpu/drm/xe/xe_pat.h b/drivers/gpu/drm/xe/xe_pat.h
> index 05dae03a5f54..b8559120989e 100644
> --- a/drivers/gpu/drm/xe/xe_pat.h
> +++ b/drivers/gpu/drm/xe/xe_pat.h
> @@ -58,4 +58,14 @@ int xe_pat_dump(struct xe_gt *gt, struct drm_printer *p);
>    */
>   u16 xe_pat_index_get_coh_mode(struct xe_device *xe, u16 pat_index);
>   
> +/**
> + * xe_pat_index_get_comp_en - Extract the compression enable flag for
> + * the given pat_index.
> + * @xe: xe device
> + * @pat_index: The pat_index to query
> + *
> + * Return: true if compression is enabled for this pat_index, false otherwise.
> + */
> +bool xe_pat_index_get_comp_en(struct xe_device *xe, u16 pat_index);
> +
>   #endif

  parent reply	other threads:[~2025-11-12  4:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 22:14 [PATCH 0/1] drm/xe/pat: Add helper to query compression enable status Xin Wang
2025-11-10 22:14 ` [PATCH 1/1] " Xin Wang
2025-11-11  0:03   ` Matt Roper
2025-11-11  6:45     ` Gote, Nitin R
2025-11-11  9:40   ` Matthew Auld
2025-11-14 14:07     ` Matthew Auld
2025-11-12  4:15   ` Yadav, Sanjay Kumar [this message]
2025-11-12 10:27     ` Yadav, Sanjay Kumar
2025-11-10 22:22 ` ✓ CI.KUnit: success for " Patchwork
2025-11-10 23:02 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-11  6:41 ` ✗ 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=7c2ff78a-35f1-413d-8391-81c4b1afe0da@intel.com \
    --to=sanjay.kumar.yadav@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=nitin.r.gote@intel.com \
    --cc=shuicheng.lin@intel.com \
    --cc=x.wang@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