Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Laguna, Lukasz" <lukasz.laguna@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 4/5] drm/xe/mert: Use local mert variable to simplify the code
Date: Fri, 9 Jan 2026 17:21:14 +0100	[thread overview]
Message-ID: <1c7655c9-2fc3-4110-aa82-727c17056fdd@intel.com> (raw)
In-Reply-To: <20260109151219.26206-5-michal.wajdeczko@intel.com>


On 1/9/2026 16:12, Michal Wajdeczko wrote:
> There is no need to always refer to MERT data using tile pointer.
> Use of local mert pointer will simplify the code and make it look
> like other existing MERT function.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lukasz Laguna <lukasz.laguna@intel.com>

Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>

> ---
>   drivers/gpu/drm/xe/xe_mert.c | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_mert.c b/drivers/gpu/drm/xe/xe_mert.c
> index 5aea6f082bc0..d139663c45ce 100644
> --- a/drivers/gpu/drm/xe/xe_mert.c
> +++ b/drivers/gpu/drm/xe/xe_mert.c
> @@ -53,6 +53,7 @@ int xe_mert_invalidate_lmtt(struct xe_device *xe)
>   void xe_mert_irq_handler(struct xe_device *xe, u32 master_ctl)
>   {
>   	struct xe_tile *tile = xe_device_get_root_tile(xe);
> +	struct xe_mert *mert = &tile->mert;
>   	unsigned long flags;
>   	u32 reg_val;
>   	u8 err;
> @@ -70,13 +71,13 @@ void xe_mert_irq_handler(struct xe_device *xe, u32 master_ctl)
>   	else if (err)
>   		drm_dbg(&xe->drm, "MERT catastrophic error: Unexpected fault (0x%x)\n", err);
>   
> -	spin_lock_irqsave(&tile->mert.lock, flags);
> -	if (tile->mert.tlb_inv_triggered) {
> +	spin_lock_irqsave(&mert->lock, flags);
> +	if (mert->tlb_inv_triggered) {
>   		reg_val = xe_mmio_read32(&tile->mmio, MERT_TLB_INV_DESC_A);
>   		if (!(reg_val & MERT_TLB_INV_DESC_A_VALID)) {
> -			tile->mert.tlb_inv_triggered = false;
> -			complete_all(&tile->mert.tlb_inv_done);
> +			mert->tlb_inv_triggered = false;
> +			complete_all(&mert->tlb_inv_done);
>   		}
>   	}
> -	spin_unlock_irqrestore(&tile->mert.lock, flags);
> +	spin_unlock_irqrestore(&mert->lock, flags);
>   }

  reply	other threads:[~2026-01-09 16:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 15:12 [PATCH 0/5] drm/xe/mert: Minor improvements to MERT code Michal Wajdeczko
2026-01-09 15:12 ` [PATCH 1/5] drm/xe/mert: Normalize xe_mert.h include guards Michal Wajdeczko
2026-01-09 15:59   ` Laguna, Lukasz
2026-01-09 15:12 ` [PATCH 2/5] drm/xe/mert: Fix kernel-doc for struct xe_mert Michal Wajdeczko
2026-01-09 16:00   ` Laguna, Lukasz
2026-01-09 15:12 ` [PATCH 3/5] drm/xe/mert: Always refer to MERT using xe_device Michal Wajdeczko
2026-01-09 17:04   ` Laguna, Lukasz
2026-01-11 21:38   ` [PATCH v2 " Michal Wajdeczko
2026-01-09 15:12 ` [PATCH 4/5] drm/xe/mert: Use local mert variable to simplify the code Michal Wajdeczko
2026-01-09 16:21   ` Laguna, Lukasz [this message]
2026-01-09 15:12 ` [PATCH 5/5] drm/xe/mert: Move MERT initialization to xe_mert.c Michal Wajdeczko
2026-01-09 17:07   ` Laguna, Lukasz
2026-01-09 15:19 ` ✓ CI.KUnit: success for drm/xe/mert: Minor improvements to MERT code Patchwork
2026-01-09 16:01 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-09 16:49 ` [PATCH 0/5] " Laguna, Lukasz
2026-01-09 20:02 ` ✓ Xe.CI.Full: success for " Patchwork
2026-01-11 21:50 ` ✓ CI.KUnit: success for drm/xe/mert: Minor improvements to MERT code (rev2) Patchwork
2026-01-11 22:25 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-11 23:18 ` ✗ 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=1c7655c9-2fc3-4110-aa82-727c17056fdd@intel.com \
    --to=lukasz.laguna@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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