From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-gfx@lists.freedesktop.org
Cc: matthew.d.roper@intel.com, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v7 4/4] drm/i915/mtl: Skip MCR ops for ring fault register
Date: Fri, 29 Sep 2023 00:14:37 +0200 [thread overview]
Message-ID: <7108ed53-22c7-3f37-119b-a6d2d0f84f88@intel.com> (raw)
In-Reply-To: <20230928130015.6758-4-nirmoy.das@intel.com>
On 28.09.2023 15:00, Nirmoy Das wrote:
> On MTL GEN12_RING_FAULT_REG is not replicated so don't
> do mcr based operation for this register.
>
> v2: use MEDIA_VER() instead of GRAPHICS_VER()(Matt).
> v3: s/"MEDIA_VER(i915) == 13"/"MEDIA_VER(i915) >= 13"(Matt)
> improve comment.
> v4: improve the comment further(Andi)
>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_gt.c | 13 ++++++++++++-
> drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 +
> drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
> 3 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index 93062c35e072..dff8bba1f5d4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -262,10 +262,21 @@ intel_gt_clear_error_registers(struct intel_gt *gt,
> I915_MASTER_ERROR_INTERRUPT);
> }
>
> - if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
> + /*
> + * For the media GT, this ring fault register is not replicated,
> + * so don't do multicast/replicated register read/write operation on it.
> + */
> + if (MEDIA_VER(i915) >= 13 && gt->type == GT_MEDIA) {
> + intel_uncore_rmw(uncore, XELPMP_RING_FAULT_REG,
> + RING_FAULT_VALID, 0);
> + intel_uncore_posting_read(uncore,
> + XELPMP_RING_FAULT_REG);
> +
> + } else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
WA 14017387313 suggests to "remove Semaphore acquisition steps for all
GAM ranges" (XELPMP_RING_FAULT_REG is in GAM range), just FYI.
Regards
Andrzej
> intel_gt_mcr_multicast_rmw(gt, XEHP_RING_FAULT_REG,
> RING_FAULT_VALID, 0);
> intel_gt_mcr_read_any(gt, XEHP_RING_FAULT_REG);
> +
> } else if (GRAPHICS_VER(i915) >= 12) {
> intel_uncore_rmw(uncore, GEN12_RING_FAULT_REG, RING_FAULT_VALID, 0);
> intel_uncore_posting_read(uncore, GEN12_RING_FAULT_REG);
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> index cca4bac8f8b0..eecd0a87a647 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> @@ -1084,6 +1084,7 @@
>
> #define GEN12_RING_FAULT_REG _MMIO(0xcec4)
> #define XEHP_RING_FAULT_REG MCR_REG(0xcec4)
> +#define XELPMP_RING_FAULT_REG _MMIO(0xcec4)
> #define GEN8_RING_FAULT_ENGINE_ID(x) (((x) >> 12) & 0x7)
> #define RING_FAULT_GTTSEL_MASK (1 << 11)
> #define RING_FAULT_SRCID(x) (((x) >> 3) & 0xff)
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index f4ebcfb70289..b4e31e59c799 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -1234,7 +1234,16 @@ static void engine_record_registers(struct intel_engine_coredump *ee)
> if (GRAPHICS_VER(i915) >= 6) {
> ee->rc_psmi = ENGINE_READ(engine, RING_PSMI_CTL);
>
> - if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50))
> + /*
> + * For the media GT, this ring fault register is not replicated,
> + * so don't do multicast/replicated register read/write
> + * operation on it.
> + */
> + if (MEDIA_VER(i915) >= 13 && engine->gt->type == GT_MEDIA)
> + ee->fault_reg = intel_uncore_read(engine->uncore,
> + XELPMP_RING_FAULT_REG);
> +
> + else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50))
> ee->fault_reg = intel_gt_mcr_read_any(engine->gt,
> XEHP_RING_FAULT_REG);
> else if (GRAPHICS_VER(i915) >= 12)
next prev parent reply other threads:[~2023-09-28 22:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 13:00 [Intel-gfx] [PATCH v7 1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize() Nirmoy Das
2023-09-28 13:00 ` [Intel-gfx] [PATCH v7 2/4] drm/i915: Introduce the intel_gt_resume_early() Nirmoy Das
2023-09-28 13:28 ` Andi Shyti
2023-09-28 21:43 ` Andrzej Hajda
2023-09-28 13:00 ` [Intel-gfx] [PATCH v7 3/4] drm/i915: Clean steer semaphore on resume Nirmoy Das
2023-09-28 13:00 ` [Intel-gfx] [PATCH v7 4/4] drm/i915/mtl: Skip MCR ops for ring fault register Nirmoy Das
2023-09-28 22:14 ` Andrzej Hajda [this message]
2023-09-28 22:33 ` Matt Roper
2023-09-28 13:27 ` [Intel-gfx] [PATCH v7 1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize() Andi Shyti
2023-09-28 13:43 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v7,1/4] " Patchwork
2023-09-28 14:01 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-28 16:54 ` [Intel-gfx] [PATCH v7 1/4] " Matt Roper
2023-09-28 18:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v7,1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize() (rev2) Patchwork
2023-09-28 18:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-28 21:42 ` [Intel-gfx] [PATCH v7 1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize() Andrzej Hajda
2023-09-29 8:40 ` Nirmoy Das
2023-09-29 4:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [v7,1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize() (rev2) Patchwork
2023-09-29 8:37 ` [Intel-gfx] [PATCH v7 1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize() Nirmoy Das
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=7108ed53-22c7-3f37-119b-a6d2d0f84f88@intel.com \
--to=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=nirmoy.das@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