From: Matt Roper <matthew.d.roper@intel.com> To: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>, Stuart Summers <stuart.summers@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@intel.com> Subject: Re: [PATCH 07/11] drm/i915/xehp: Determine which tile raised an interrupt Date: Fri, 8 Oct 2021 16:48:25 -0700 [thread overview] Message-ID: <20211008234825.GS602200@mdroper-desk1.amr.corp.intel.com> (raw) In-Reply-To: <20211008215635.2026385-8-matthew.d.roper@intel.com> On Fri, Oct 08, 2021 at 02:56:31PM -0700, Matt Roper wrote: > From: Paulo Zanoni <paulo.r.zanoni@intel.com> > > The first step of interrupt handling is to read a tile0 register that > tells us in which tile the interrupt happened; we can then we read the > usual interrupt registers from the appropriate tile. > > Note that this is just the first step of handling interrupts properly on > multi-tile platforms. Subsequent patches will convert other parts of > the interrupt handling flow. > > Cc: Stuart Summers <stuart.summers@intel.com> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com> > --- > drivers/gpu/drm/i915/i915_irq.c | 31 ++++++++++++++++--------------- > 1 file changed, 16 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 038a9ec563c1..9f99ad56cde6 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -2772,37 +2772,38 @@ static irqreturn_t dg1_irq_handler(int irq, void *arg) > { > struct drm_i915_private * const i915 = arg; > struct intel_gt *gt = &i915->gt; > - void __iomem * const regs = gt->uncore->regs; > + void __iomem * const t0_regs = gt->uncore->regs; > u32 master_tile_ctl, master_ctl; > - u32 gu_misc_iir; > + u32 gu_misc_iir = 0; > + unsigned int i; > > if (!intel_irqs_enabled(i915)) > return IRQ_NONE; > > - master_tile_ctl = dg1_master_intr_disable(regs); > + master_tile_ctl = dg1_master_intr_disable(t0_regs); > if (!master_tile_ctl) { > - dg1_master_intr_enable(regs); > + dg1_master_intr_enable(t0_regs); > return IRQ_NONE; > } > > - /* FIXME: we only support tile 0 for now. */ > - if (master_tile_ctl & DG1_MSTR_TILE(0)) { > + for_each_gt(i915, i, gt) { > + void __iomem *const regs = gt->uncore->regs; > + > + if ((master_tile_ctl & DG1_MSTR_TILE(i)) == 0) > + continue; > + > master_ctl = raw_reg_read(regs, GEN11_GFX_MSTR_IRQ); > raw_reg_write(regs, GEN11_GFX_MSTR_IRQ, master_ctl); > - } else { > - DRM_ERROR("Tile not supported: 0x%08x\n", master_tile_ctl); > - dg1_master_intr_enable(regs); > - return IRQ_NONE; > - } > > - gen11_gt_irq_handler(gt, master_ctl); > + gen11_gt_irq_handler(gt, master_ctl); > + > + gu_misc_iir = gen11_gu_misc_irq_ack(gt, master_ctl); Hmm, I missed it before sending the series, but this doesn't look right. We ack every tile's gu_misc_irq separately, but... > + } > > if (master_ctl & GEN11_DISPLAY_IRQ) > gen11_display_irq_handler(i915); > > - gu_misc_iir = gen11_gu_misc_irq_ack(gt, master_ctl); > - > - dg1_master_intr_enable(regs); > + dg1_master_intr_enable(t0_regs); > > gen11_gu_misc_irq_handler(gt, gu_misc_iir); ...only handle the value from the final tile? Looks like this was intended to move inside the loop as well. Matt > > -- > 2.33.0 > -- Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795
WARNING: multiple messages have this Message-ID (diff)
From: Matt Roper <matthew.d.roper@intel.com> To: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>, Stuart Summers <stuart.summers@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@intel.com> Subject: Re: [Intel-gfx] [PATCH 07/11] drm/i915/xehp: Determine which tile raised an interrupt Date: Fri, 8 Oct 2021 16:48:25 -0700 [thread overview] Message-ID: <20211008234825.GS602200@mdroper-desk1.amr.corp.intel.com> (raw) In-Reply-To: <20211008215635.2026385-8-matthew.d.roper@intel.com> On Fri, Oct 08, 2021 at 02:56:31PM -0700, Matt Roper wrote: > From: Paulo Zanoni <paulo.r.zanoni@intel.com> > > The first step of interrupt handling is to read a tile0 register that > tells us in which tile the interrupt happened; we can then we read the > usual interrupt registers from the appropriate tile. > > Note that this is just the first step of handling interrupts properly on > multi-tile platforms. Subsequent patches will convert other parts of > the interrupt handling flow. > > Cc: Stuart Summers <stuart.summers@intel.com> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com> > --- > drivers/gpu/drm/i915/i915_irq.c | 31 ++++++++++++++++--------------- > 1 file changed, 16 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 038a9ec563c1..9f99ad56cde6 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -2772,37 +2772,38 @@ static irqreturn_t dg1_irq_handler(int irq, void *arg) > { > struct drm_i915_private * const i915 = arg; > struct intel_gt *gt = &i915->gt; > - void __iomem * const regs = gt->uncore->regs; > + void __iomem * const t0_regs = gt->uncore->regs; > u32 master_tile_ctl, master_ctl; > - u32 gu_misc_iir; > + u32 gu_misc_iir = 0; > + unsigned int i; > > if (!intel_irqs_enabled(i915)) > return IRQ_NONE; > > - master_tile_ctl = dg1_master_intr_disable(regs); > + master_tile_ctl = dg1_master_intr_disable(t0_regs); > if (!master_tile_ctl) { > - dg1_master_intr_enable(regs); > + dg1_master_intr_enable(t0_regs); > return IRQ_NONE; > } > > - /* FIXME: we only support tile 0 for now. */ > - if (master_tile_ctl & DG1_MSTR_TILE(0)) { > + for_each_gt(i915, i, gt) { > + void __iomem *const regs = gt->uncore->regs; > + > + if ((master_tile_ctl & DG1_MSTR_TILE(i)) == 0) > + continue; > + > master_ctl = raw_reg_read(regs, GEN11_GFX_MSTR_IRQ); > raw_reg_write(regs, GEN11_GFX_MSTR_IRQ, master_ctl); > - } else { > - DRM_ERROR("Tile not supported: 0x%08x\n", master_tile_ctl); > - dg1_master_intr_enable(regs); > - return IRQ_NONE; > - } > > - gen11_gt_irq_handler(gt, master_ctl); > + gen11_gt_irq_handler(gt, master_ctl); > + > + gu_misc_iir = gen11_gu_misc_irq_ack(gt, master_ctl); Hmm, I missed it before sending the series, but this doesn't look right. We ack every tile's gu_misc_irq separately, but... > + } > > if (master_ctl & GEN11_DISPLAY_IRQ) > gen11_display_irq_handler(i915); > > - gu_misc_iir = gen11_gu_misc_irq_ack(gt, master_ctl); > - > - dg1_master_intr_enable(regs); > + dg1_master_intr_enable(t0_regs); > > gen11_gu_misc_irq_handler(gt, gu_misc_iir); ...only handle the value from the final tile? Looks like this was intended to move inside the loop as well. Matt > > -- > 2.33.0 > -- Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795
next prev parent reply other threads:[~2021-10-08 23:48 UTC|newest] Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-08 21:56 [PATCH 00/11] i915: Initial multi-tile support Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-08 21:56 ` [PATCH 01/11] drm/i915: rework some irq functions to take intel_gt as argument Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-27 6:22 ` Lucas De Marchi 2021-10-28 14:13 ` Andi Shyti 2021-10-08 21:56 ` [PATCH 02/11] drm/i915: split general MMIO setup from per-GT uncore init Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-27 6:26 ` Lucas De Marchi 2021-10-28 14:17 ` Andi Shyti 2021-10-08 21:56 ` [PATCH 03/11] drm/i915: Restructure probe to handle multi-tile platforms Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-13 12:12 ` Jani Nikula 2021-10-13 12:12 ` [Intel-gfx] " Jani Nikula 2021-10-27 6:57 ` Lucas De Marchi 2021-10-27 7:58 ` Jani Nikula 2021-10-08 21:56 ` [PATCH 04/11] drm/i915: Store backpointer to GT in uncore Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-28 14:26 ` Andi Shyti 2021-10-08 21:56 ` [PATCH 05/11] drm/i915: Prepare for multiple gts Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-27 7:01 ` Lucas De Marchi 2021-10-08 21:56 ` [PATCH 06/11] drm/i915: Initial support for per-tile uncore Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-28 15:41 ` Andi Shyti 2021-10-08 21:56 ` [PATCH 07/11] drm/i915/xehp: Determine which tile raised an interrupt Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-08 23:48 ` Matt Roper [this message] 2021-10-08 23:48 ` Matt Roper 2021-10-13 0:55 ` Andi Shyti 2021-10-27 7:13 ` Lucas De Marchi 2021-10-27 7:13 ` [Intel-gfx] " Lucas De Marchi 2021-10-08 21:56 ` [PATCH 08/11] drm/i915/xehp: Make IRQ reset and postinstall multi-tile aware Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-28 16:30 ` Andi Shyti 2021-10-28 23:20 ` Matt Roper 2021-10-29 0:16 ` Andi Shyti 2021-10-08 21:56 ` [PATCH 09/11] drm/i915/guc: Update CT debug macro for multi-tile Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-08 21:56 ` [PATCH 10/11] drm/i915: Release per-gt resources allocated Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-28 16:33 ` Andi Shyti 2021-10-08 21:56 ` [PATCH 11/11] drm/i915/xehpsdv: Initialize multi-tiles Matt Roper 2021-10-08 21:56 ` [Intel-gfx] " Matt Roper 2021-10-08 23:33 ` [PATCH v2 " Matt Roper 2021-10-08 23:33 ` [Intel-gfx] " Matt Roper 2021-10-11 7:51 ` Tvrtko Ursulin 2021-10-12 23:11 ` Andi Shyti 2021-10-08 22:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for i915: Initial multi-tile support Patchwork 2021-10-08 23:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2021-10-09 0:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for i915: Initial multi-tile support (rev2) Patchwork 2021-10-09 0:36 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork 2021-10-09 2:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for i915: Initial multi-tile support 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=20211008234825.GS602200@mdroper-desk1.amr.corp.intel.com \ --to=matthew.d.roper@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=paulo.r.zanoni@intel.com \ --cc=stuart.summers@intel.com \ --cc=tvrtko.ursulin@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.