* [PATCH 1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller
@ 2018-03-09 1:27 Chris Wilson
2018-03-09 1:27 ` [PATCH 2/2] drm/i915: Trim gen11_gt_irq_handler Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Chris Wilson @ 2018-03-09 1:27 UTC (permalink / raw)
To: intel-gfx
Originally we were inlining gen8_cs_irq_handler() and so expected the
compiler to constant-fold away the irq_shift (so we had hardcoded it as
opposed to use engine->irq_shift). However, we dropped the inline given
the proliferation of gen8_cs_irq_handler()s. If we pull the shifting
of the iir into the caller, we can shrink the code still further:
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-34 (-34)
Function old new delta
gen8_cs_irq_handler 123 118 -5
gen8_gt_irq_handler 261 248 -13
gen11_irq_handler 722 706 -16
v2: Drop gen11_cs_irq_handler now that it is a simple
stub around gen8_cs_irq_handler (Daniele)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 38 ++++++++++++++++----------------------
1 file changed, 16 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index babf81cf668b..c8c29d8ecbab 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1399,19 +1399,19 @@ static void snb_gt_irq_handler(struct drm_i915_private *dev_priv,
}
static void
-gen8_cs_irq_handler(struct intel_engine_cs *engine, u32 iir, int test_shift)
+gen8_cs_irq_handler(struct intel_engine_cs *engine, u32 iir)
{
struct intel_engine_execlists * const execlists = &engine->execlists;
bool tasklet = false;
- if (iir & (GT_CONTEXT_SWITCH_INTERRUPT << test_shift)) {
+ if (iir & GT_CONTEXT_SWITCH_INTERRUPT) {
if (READ_ONCE(engine->execlists.active)) {
__set_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted);
tasklet = true;
}
}
- if (iir & (GT_RENDER_USER_INTERRUPT << test_shift)) {
+ if (iir & GT_RENDER_USER_INTERRUPT) {
notify_ring(engine);
tasklet |= USES_GUC_SUBMISSION(engine->i915);
}
@@ -1466,21 +1466,21 @@ static void gen8_gt_irq_handler(struct drm_i915_private *i915,
{
if (master_ctl & (GEN8_GT_RCS_IRQ | GEN8_GT_BCS_IRQ)) {
gen8_cs_irq_handler(i915->engine[RCS],
- gt_iir[0], GEN8_RCS_IRQ_SHIFT);
+ gt_iir[0] >> GEN8_RCS_IRQ_SHIFT);
gen8_cs_irq_handler(i915->engine[BCS],
- gt_iir[0], GEN8_BCS_IRQ_SHIFT);
+ gt_iir[0] >> GEN8_BCS_IRQ_SHIFT);
}
if (master_ctl & (GEN8_GT_VCS1_IRQ | GEN8_GT_VCS2_IRQ)) {
gen8_cs_irq_handler(i915->engine[VCS],
- gt_iir[1], GEN8_VCS1_IRQ_SHIFT);
+ gt_iir[1] >> GEN8_VCS1_IRQ_SHIFT);
gen8_cs_irq_handler(i915->engine[VCS2],
- gt_iir[1], GEN8_VCS2_IRQ_SHIFT);
+ gt_iir[1] >> GEN8_VCS2_IRQ_SHIFT);
}
if (master_ctl & GEN8_GT_VECS_IRQ) {
gen8_cs_irq_handler(i915->engine[VECS],
- gt_iir[3], GEN8_VECS_IRQ_SHIFT);
+ gt_iir[3] >> GEN8_VECS_IRQ_SHIFT);
}
if (master_ctl & (GEN8_GT_PM_IRQ | GEN8_GT_GUC_IRQ)) {
@@ -2762,12 +2762,6 @@ static void __fini_wedge(struct wedge_me *w)
(W)->i915; \
__fini_wedge((W)))
-static __always_inline void
-gen11_cs_irq_handler(struct intel_engine_cs * const engine, const u32 iir)
-{
- gen8_cs_irq_handler(engine, iir, 0);
-}
-
static void
gen11_gt_engine_irq_handler(struct drm_i915_private * const i915,
const unsigned int bank,
@@ -2781,27 +2775,27 @@ gen11_gt_engine_irq_handler(struct drm_i915_private * const i915,
switch (engine_n) {
case GEN11_RCS0:
- return gen11_cs_irq_handler(engine[RCS], iir);
+ return gen8_cs_irq_handler(engine[RCS], iir);
case GEN11_BCS:
- return gen11_cs_irq_handler(engine[BCS], iir);
+ return gen8_cs_irq_handler(engine[BCS], iir);
}
case 1:
switch (engine_n) {
case GEN11_VCS(0):
- return gen11_cs_irq_handler(engine[_VCS(0)], iir);
+ return gen8_cs_irq_handler(engine[_VCS(0)], iir);
case GEN11_VCS(1):
- return gen11_cs_irq_handler(engine[_VCS(1)], iir);
+ return gen8_cs_irq_handler(engine[_VCS(1)], iir);
case GEN11_VCS(2):
- return gen11_cs_irq_handler(engine[_VCS(2)], iir);
+ return gen8_cs_irq_handler(engine[_VCS(2)], iir);
case GEN11_VCS(3):
- return gen11_cs_irq_handler(engine[_VCS(3)], iir);
+ return gen8_cs_irq_handler(engine[_VCS(3)], iir);
case GEN11_VECS(0):
- return gen11_cs_irq_handler(engine[_VECS(0)], iir);
+ return gen8_cs_irq_handler(engine[_VECS(0)], iir);
case GEN11_VECS(1):
- return gen11_cs_irq_handler(engine[_VECS(1)], iir);
+ return gen8_cs_irq_handler(engine[_VECS(1)], iir);
}
}
}
--
2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] drm/i915: Trim gen11_gt_irq_handler
2018-03-09 1:27 [PATCH 1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller Chris Wilson
@ 2018-03-09 1:27 ` Chris Wilson
2018-03-09 1:33 ` [PATCH v2] " Chris Wilson
2018-03-09 2:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2) Patchwork
2018-03-09 7:05 ` ✗ Fi.CI.IGT: warning " Patchwork
2 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2018-03-09 1:27 UTC (permalink / raw)
To: intel-gfx
Give the compiler a helping hand in mapping (bank,bit) to our struct
intel_engine_cs by trading object code size for data cache:
add/remove: 2/0 grow/shrink: 0/1 up/down: 192/-135 (57)
Function old new delta
bank1_map - 128 +128
bank0_map - 64 +64
gen11_irq_handler 706 571 -135
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 53 +++++++++++------------------------------
1 file changed, 14 insertions(+), 39 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c8c29d8ecbab..5a42d8a63677 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2762,44 +2762,6 @@ static void __fini_wedge(struct wedge_me *w)
(W)->i915; \
__fini_wedge((W)))
-static void
-gen11_gt_engine_irq_handler(struct drm_i915_private * const i915,
- const unsigned int bank,
- const unsigned int engine_n,
- const u16 iir)
-{
- struct intel_engine_cs ** const engine = i915->engine;
-
- switch (bank) {
- case 0:
- switch (engine_n) {
-
- case GEN11_RCS0:
- return gen8_cs_irq_handler(engine[RCS], iir);
-
- case GEN11_BCS:
- return gen8_cs_irq_handler(engine[BCS], iir);
- }
- case 1:
- switch (engine_n) {
-
- case GEN11_VCS(0):
- return gen8_cs_irq_handler(engine[_VCS(0)], iir);
- case GEN11_VCS(1):
- return gen8_cs_irq_handler(engine[_VCS(1)], iir);
- case GEN11_VCS(2):
- return gen8_cs_irq_handler(engine[_VCS(2)], iir);
- case GEN11_VCS(3):
- return gen8_cs_irq_handler(engine[_VCS(3)], iir);
-
- case GEN11_VECS(0):
- return gen8_cs_irq_handler(engine[_VECS(0)], iir);
- case GEN11_VECS(1):
- return gen8_cs_irq_handler(engine[_VECS(1)], iir);
- }
- }
-}
-
static u32
gen11_gt_engine_intr(struct drm_i915_private * const i915,
const unsigned int bank, const unsigned int bit)
@@ -2836,10 +2798,23 @@ static void
gen11_gt_irq_handler(struct drm_i915_private * const i915,
const u32 master_ctl)
{
+ static const int bank0_map[] = {
+ [GEN11_RCS0] = RCS,
+ [GEN11_BCS] = BCS,
+ };
+ static const int bank1_map[] = {
+ [GEN11_VCS(0)] = _VCS(0),
+ [GEN11_VCS(1)] = _VCS(1),
+ [GEN11_VCS(2)] = _VCS(2),
+ [GEN11_VCS(3)] = _VCS(3),
+ [GEN11_VECS(0)] = _VECS(0),
+ [GEN11_VECS(1)] = _VECS(1),
+ };
void __iomem * const regs = i915->regs;
unsigned int bank;
for (bank = 0; bank < 2; bank++) {
+ const int *map = bank ? bank1_map : bank0_map;
unsigned long intr_dw;
unsigned int bit;
@@ -2859,7 +2834,7 @@ gen11_gt_irq_handler(struct drm_i915_private * const i915,
if (unlikely(!iir))
continue;
- gen11_gt_engine_irq_handler(i915, bank, bit, iir);
+ gen8_cs_irq_handler(i915->engine[map[bit]], iir);
}
/* Clear must be after shared has been served for engine */
--
2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2] drm/i915: Trim gen11_gt_irq_handler
2018-03-09 1:27 ` [PATCH 2/2] drm/i915: Trim gen11_gt_irq_handler Chris Wilson
@ 2018-03-09 1:33 ` Chris Wilson
2018-03-09 1:38 ` Chris Wilson
2018-03-09 19:14 ` Daniele Ceraolo Spurio
0 siblings, 2 replies; 9+ messages in thread
From: Chris Wilson @ 2018-03-09 1:33 UTC (permalink / raw)
To: intel-gfx
Give the compiler a helping hand in mapping (bank,bit) to our struct
intel_engine_cs by trading object code size for data cache:
add/remove: 2/0 grow/shrink: 0/1 up/down: 48/-135 (-87)
Function old new delta
bank1_map - 32 +32
bank0_map - 16 +16
gen11_irq_handler 706 571 -135
v2: u8 arrays for tighter packing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 53 +++++++++++------------------------------
1 file changed, 14 insertions(+), 39 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c8c29d8ecbab..e423ec58e5d2 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2762,44 +2762,6 @@ static void __fini_wedge(struct wedge_me *w)
(W)->i915; \
__fini_wedge((W)))
-static void
-gen11_gt_engine_irq_handler(struct drm_i915_private * const i915,
- const unsigned int bank,
- const unsigned int engine_n,
- const u16 iir)
-{
- struct intel_engine_cs ** const engine = i915->engine;
-
- switch (bank) {
- case 0:
- switch (engine_n) {
-
- case GEN11_RCS0:
- return gen8_cs_irq_handler(engine[RCS], iir);
-
- case GEN11_BCS:
- return gen8_cs_irq_handler(engine[BCS], iir);
- }
- case 1:
- switch (engine_n) {
-
- case GEN11_VCS(0):
- return gen8_cs_irq_handler(engine[_VCS(0)], iir);
- case GEN11_VCS(1):
- return gen8_cs_irq_handler(engine[_VCS(1)], iir);
- case GEN11_VCS(2):
- return gen8_cs_irq_handler(engine[_VCS(2)], iir);
- case GEN11_VCS(3):
- return gen8_cs_irq_handler(engine[_VCS(3)], iir);
-
- case GEN11_VECS(0):
- return gen8_cs_irq_handler(engine[_VECS(0)], iir);
- case GEN11_VECS(1):
- return gen8_cs_irq_handler(engine[_VECS(1)], iir);
- }
- }
-}
-
static u32
gen11_gt_engine_intr(struct drm_i915_private * const i915,
const unsigned int bank, const unsigned int bit)
@@ -2836,10 +2798,23 @@ static void
gen11_gt_irq_handler(struct drm_i915_private * const i915,
const u32 master_ctl)
{
+ static const u8 bank0_map[] = {
+ [GEN11_RCS0] = RCS,
+ [GEN11_BCS] = BCS,
+ };
+ static const u8 bank1_map[] = {
+ [GEN11_VCS(0)] = _VCS(0),
+ [GEN11_VCS(1)] = _VCS(1),
+ [GEN11_VCS(2)] = _VCS(2),
+ [GEN11_VCS(3)] = _VCS(3),
+ [GEN11_VECS(0)] = _VECS(0),
+ [GEN11_VECS(1)] = _VECS(1),
+ };
void __iomem * const regs = i915->regs;
unsigned int bank;
for (bank = 0; bank < 2; bank++) {
+ const u8 *map = bank ? bank1_map : bank0_map;
unsigned long intr_dw;
unsigned int bit;
@@ -2859,7 +2834,7 @@ gen11_gt_irq_handler(struct drm_i915_private * const i915,
if (unlikely(!iir))
continue;
- gen11_gt_engine_irq_handler(i915, bank, bit, iir);
+ gen8_cs_irq_handler(i915->engine[map[bit]], iir);
}
/* Clear must be after shared has been served for engine */
--
2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/i915: Trim gen11_gt_irq_handler
2018-03-09 1:33 ` [PATCH v2] " Chris Wilson
@ 2018-03-09 1:38 ` Chris Wilson
2018-03-09 10:06 ` Tvrtko Ursulin
2018-03-09 19:14 ` Daniele Ceraolo Spurio
1 sibling, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2018-03-09 1:38 UTC (permalink / raw)
To: intel-gfx
Quoting Chris Wilson (2018-03-09 01:33:08)
> gen11_gt_engine_intr(struct drm_i915_private * const i915,
> const unsigned int bank, const unsigned int bit)
> @@ -2836,10 +2798,23 @@ static void
> gen11_gt_irq_handler(struct drm_i915_private * const i915,
> const u32 master_ctl)
> {
> + static const u8 bank0_map[] = {
> + [GEN11_RCS0] = RCS,
> + [GEN11_BCS] = BCS,
Is there a reason why its RCS0 but BCS? And the multi-instance classes
actually use VCS(x)?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2)
2018-03-09 1:27 [PATCH 1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller Chris Wilson
2018-03-09 1:27 ` [PATCH 2/2] drm/i915: Trim gen11_gt_irq_handler Chris Wilson
@ 2018-03-09 2:21 ` Patchwork
2018-03-09 7:05 ` ✗ Fi.CI.IGT: warning " Patchwork
2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-03-09 2:21 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2)
URL : https://patchwork.freedesktop.org/series/39651/
State : success
== Summary ==
Series 39651v2 series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller
https://patchwork.freedesktop.org/api/1.0/series/39651/revisions/2/mbox/
---- Known issues:
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:421s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:421s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:372s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:496s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:278s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:487s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:491s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:479s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:466s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:403s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:576s
fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:586s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:415s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:290s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:514s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:397s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:412s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:472s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:419s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:468s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:460s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:510s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:585s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:435s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:521s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:529s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:504s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:482s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:419s
fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:388s
Blacklisted hosts:
fi-cnl-drrs total:288 pass:257 dwarn:3 dfail:0 fail:0 skip:19 time:518s
469c28df8d66d3cc0a4a2e4e12433a5c92102022 drm-tip: 2018y-03m-08d-22h-40m-12s UTC integration manifest
70282c9ebe14 drm/i915: Trim gen11_gt_irq_handler
ba501078ebb6 drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8285/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✗ Fi.CI.IGT: warning for series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2)
2018-03-09 1:27 [PATCH 1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller Chris Wilson
2018-03-09 1:27 ` [PATCH 2/2] drm/i915: Trim gen11_gt_irq_handler Chris Wilson
2018-03-09 2:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2) Patchwork
@ 2018-03-09 7:05 ` Patchwork
2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-03-09 7:05 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2)
URL : https://patchwork.freedesktop.org/series/39651/
State : warning
== Summary ==
---- Possible new issues:
Test kms_vblank:
Subgroup pipe-c-query-busy-hang:
pass -> DMESG-WARN (shard-hsw)
---- Known issues:
Test gem_eio:
Subgroup in-flight-contexts:
pass -> INCOMPLETE (shard-apl) fdo#105341 +1
Test kms_sysfs_edid_timing:
pass -> WARN (shard-apl) fdo#100047
fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
shard-apl total:3381 pass:1779 dwarn:1 dfail:0 fail:8 skip:1591 time:11740s
shard-hsw total:3381 pass:1728 dwarn:2 dfail:0 fail:1 skip:1648 time:11177s
shard-snb total:3467 pass:1363 dwarn:1 dfail:0 fail:2 skip:2101 time:6904s
Blacklisted hosts:
shard-kbl total:3308 pass:1859 dwarn:1 dfail:0 fail:9 skip:1437 time:8741s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8285/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/i915: Trim gen11_gt_irq_handler
2018-03-09 1:38 ` Chris Wilson
@ 2018-03-09 10:06 ` Tvrtko Ursulin
2018-03-09 10:17 ` Chris Wilson
0 siblings, 1 reply; 9+ messages in thread
From: Tvrtko Ursulin @ 2018-03-09 10:06 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 09/03/2018 01:38, Chris Wilson wrote:
> Quoting Chris Wilson (2018-03-09 01:33:08)
>> gen11_gt_engine_intr(struct drm_i915_private * const i915,
>> const unsigned int bank, const unsigned int bit)
>> @@ -2836,10 +2798,23 @@ static void
>> gen11_gt_irq_handler(struct drm_i915_private * const i915,
>> const u32 master_ctl)
>> {
>> + static const u8 bank0_map[] = {
>> + [GEN11_RCS0] = RCS,
>> + [GEN11_BCS] = BCS,
> Is there a reason why its RCS0 but BCS? And the multi-instance classes
> actually use VCS(x)?
I am pretty sure that naming came from the spec.
Side note - one thing I dislike a bit about the current code and this
patch is that all engines have to be enumerated explicitly in the
interrupt handler. I kind of thought it was handy to handle the
multi-class engines from a loop, and so have one place less to remember
to update after adding a new engine instance.
And in general I think too many bike-sheds on this area of code before
we are even running it on real hw. :(
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/i915: Trim gen11_gt_irq_handler
2018-03-09 10:06 ` Tvrtko Ursulin
@ 2018-03-09 10:17 ` Chris Wilson
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-03-09 10:17 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx
Quoting Tvrtko Ursulin (2018-03-09 10:06:48)
>
> On 09/03/2018 01:38, Chris Wilson wrote:
> And in general I think too many bike-sheds on this area of code before
> we are even running it on real hw. :(
Come on now, it's not a proper bikeshed if the discussion is meaningful!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/i915: Trim gen11_gt_irq_handler
2018-03-09 1:33 ` [PATCH v2] " Chris Wilson
2018-03-09 1:38 ` Chris Wilson
@ 2018-03-09 19:14 ` Daniele Ceraolo Spurio
1 sibling, 0 replies; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2018-03-09 19:14 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 08/03/18 17:33, Chris Wilson wrote:
> Give the compiler a helping hand in mapping (bank,bit) to our struct
> intel_engine_cs by trading object code size for data cache:
>
> add/remove: 2/0 grow/shrink: 0/1 up/down: 48/-135 (-87)
> Function old new delta
> bank1_map - 32 +32
> bank0_map - 16 +16
> gen11_irq_handler 706 571 -135
>
> v2: u8 arrays for tighter packing
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 53 +++++++++++------------------------------
> 1 file changed, 14 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index c8c29d8ecbab..e423ec58e5d2 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2762,44 +2762,6 @@ static void __fini_wedge(struct wedge_me *w)
> (W)->i915; \
> __fini_wedge((W)))
>
> -static void
> -gen11_gt_engine_irq_handler(struct drm_i915_private * const i915,
> - const unsigned int bank,
> - const unsigned int engine_n,
> - const u16 iir)
> -{
> - struct intel_engine_cs ** const engine = i915->engine;
> -
> - switch (bank) {
> - case 0:
> - switch (engine_n) {
> -
> - case GEN11_RCS0:
> - return gen8_cs_irq_handler(engine[RCS], iir);
> -
> - case GEN11_BCS:
> - return gen8_cs_irq_handler(engine[BCS], iir);
> - }
> - case 1:
> - switch (engine_n) {
> -
> - case GEN11_VCS(0):
> - return gen8_cs_irq_handler(engine[_VCS(0)], iir);
> - case GEN11_VCS(1):
> - return gen8_cs_irq_handler(engine[_VCS(1)], iir);
> - case GEN11_VCS(2):
> - return gen8_cs_irq_handler(engine[_VCS(2)], iir);
> - case GEN11_VCS(3):
> - return gen8_cs_irq_handler(engine[_VCS(3)], iir);
> -
> - case GEN11_VECS(0):
> - return gen8_cs_irq_handler(engine[_VECS(0)], iir);
> - case GEN11_VECS(1):
> - return gen8_cs_irq_handler(engine[_VECS(1)], iir);
> - }
> - }
> -}
> -
> static u32
> gen11_gt_engine_intr(struct drm_i915_private * const i915,
> const unsigned int bank, const unsigned int bit)
> @@ -2836,10 +2798,23 @@ static void
> gen11_gt_irq_handler(struct drm_i915_private * const i915,
> const u32 master_ctl)
> {
> + static const u8 bank0_map[] = {
> + [GEN11_RCS0] = RCS,
> + [GEN11_BCS] = BCS,
> + };
> + static const u8 bank1_map[] = {
> + [GEN11_VCS(0)] = _VCS(0),
> + [GEN11_VCS(1)] = _VCS(1),
> + [GEN11_VCS(2)] = _VCS(2),
> + [GEN11_VCS(3)] = _VCS(3),
> + [GEN11_VECS(0)] = _VECS(0),
> + [GEN11_VECS(1)] = _VECS(1),
> + };
> void __iomem * const regs = i915->regs;
> unsigned int bank;
>
> for (bank = 0; bank < 2; bank++) {
> + const u8 *map = bank ? bank1_map : bank0_map;
> unsigned long intr_dw;
> unsigned int bit;
>
> @@ -2859,7 +2834,7 @@ gen11_gt_irq_handler(struct drm_i915_private * const i915,
> if (unlikely(!iir))
> continue;
>
> - gen11_gt_engine_irq_handler(i915, bank, bit, iir);
> + gen8_cs_irq_handler(i915->engine[map[bit]], iir);
With guc and PM interrupts we get a couple of non-engine interrupts on
bank0, so this may not scale very well depending how we approach it.
My vote still goes to deriving class and instance from the register
(bits 16-18 and 20-25 respectively). If we return the full register
value from gen11_gt_engine_intr, we can then do something like:
for_each_set_bit(bit, &intr_dw, 32) {
const u32 ident = gen11_gt_engine_intr(i915, bank, bit);
u16 iir = ident & GEN11_INTR_ENGINE_MASK;
u8 class, instance;
if (unlikely(!iir))
continue;
class = (ident >> 16) & (BIT(3) - 1);
instance = (ident >> 20) &
(BIT(GEN11_ENGINE_INSTANCE_WIDTH) - 1);
gen8_cs_irq_handler(i915->engine_class[class][instance], iir);
}
Which saves a bit more code and is more adaptable to non-engine
interrupts IMHO, since we have the class and all non-engine interrupts
come under class 4.
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-137 (-137)
Function old new delta
gen11_irq_handler 711 574 -137
Total: Before=1487912, After=1487775, chg -0.01%
Downside is that we have a few more instructions in an hot path.
Thanks,
Daniele
> }
>
> /* Clear must be after shared has been served for engine */
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-03-09 19:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09 1:27 [PATCH 1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller Chris Wilson
2018-03-09 1:27 ` [PATCH 2/2] drm/i915: Trim gen11_gt_irq_handler Chris Wilson
2018-03-09 1:33 ` [PATCH v2] " Chris Wilson
2018-03-09 1:38 ` Chris Wilson
2018-03-09 10:06 ` Tvrtko Ursulin
2018-03-09 10:17 ` Chris Wilson
2018-03-09 19:14 ` Daniele Ceraolo Spurio
2018-03-09 2:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller (rev2) Patchwork
2018-03-09 7:05 ` ✗ Fi.CI.IGT: warning " Patchwork
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.