Skip to contentSkip to conversation

Reduce context clear batch size to avoid gpu hang

PATCH In review [email protected] 3 participants 10 messages Nov 1, 2020 – Nov 7, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v3 cover Reduce context clear batch size to avoid gpu hang

From: Randy Wright <[email protected]>

For several months, I've been experiencing GPU hangs when starting Cinnamon on an HP Pavilion Mini 300-020 if I try to run an upstream kernel. I reported this recently in
https://gitlab.freedesktop.org/drm/intel/-/issues/2413 where I have attached the requested evidence including the state collected from /sys/class/drm/card0/error and debug output from dmesg.

I ran a bisect to find the problem, which indicates this is the troublesome commit:

[47f8253d2b8947d79fd3196bf96c1959c0f25f20] drm/i915/gen7: Clear all EU/L3 residual contexts

The nature of that commit suggested to me that reducing the batch size used in the context clear operation might help this relatively low-powered system to avoid the hang.... and it did! I simply forced this system to take the smaller batch length that is already used for non-Haswell systems.

The first two versions of this patch were posted as RFC patches to the Intel-gfx list, implementing the same algorithmic change in function batch_get_defaults, but without employing a properly constructed quirk.

I've now cleaned up the patch to employ a new QUIRK_RENDERCLEAR_REDUCED. The quirk is presently set only for the aforementioned HP Pavilion Mini 300-020. The patch now touches three files to define the quirk, set it, and then check for it in function batch_get_defaults.

Randy Wright (3):
drm/i915: Introduce quirk QUIRK_RENDERCLEAR_REDUCED drm/i915/display: Add function quirk_renderclear_reduced drm/i915/gt: Force reduced batch size if new QUIRK_RENDERCLEAR_REDUCED
is set.

 drivers/gpu/drm/i915/display/intel_quirks.c | 13 +++++++++++++
 drivers/gpu/drm/i915/gt/gen7_renderclear.c  |  2 +-
 drivers/gpu/drm/i915/i915_drv.h             |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)
Signature · 6 lines
2.25.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH v3 1/3 drm/i915: Introduce quirk QUIRK_RENDERCLEAR_REDUCED

From: Randy Wright <[email protected]>

Introduce quirk QUIRK_RENDERCLEAR_REDUCED, which will be used to force a limited batch buffer size for clearing residual contexts in gen7_renderclear.c.

---
 drivers/gpu/drm/i915/i915_drv.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index e4f7f6518945..e8873462eb2c 100644
@@ -525,6 +525,7 @@ struct i915_psr {
 #define QUIRK_PIN_SWIZZLED_PAGES (1<<5)
 #define QUIRK_INCREASE_T12_DELAY (1<<6)
 #define QUIRK_INCREASE_DDI_DISABLED_TIME (1<<7)
+#define QUIRK_RENDERCLEAR_REDUCED (1<<8)
 
 struct intel_fbdev;
 struct intel_fbc_work;
Signature · 6 lines
2.25.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH v3 2/3 drm/i915/display: Add function quirk_renderclear_reduced

In reply to [email protected]

From: Randy Wright <[email protected]>

Added function quirk_renderclear_reduced to set QUIRK_RENDERCLEAR_REDUCED for designated platforms. Applying QUIRK_RENDERCLEAR_REDUCED for the HP Pavilion Mini 300-020 prevents a GPU hang.

---
 drivers/gpu/drm/i915/display/intel_quirks.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/i915/display/intel_quirks.c +13 -0
index 46beb155d835..630b984ba49c 100644
@@ -53,6 +53,16 @@ static void quirk_increase_ddi_disabled_time(struct drm_i915_private *i915)
 	drm_info(&i915->drm, "Applying Increase DDI Disabled quirk\n");
 }
 
+/*
+ * Force use of smaller batch size in gen7_renderclear.c
+ * Needed on (at least) HP Pavilion Mini 300-020 to avoid GPU hang.
+ */
+static void quirk_renderclear_reduced(struct drm_i915_private *i915)
+{
+	i915->quirks |= QUIRK_RENDERCLEAR_REDUCED;
+	drm_info(&i915->drm, "Applying Renderclear Reduced quirk\n");
+}
+
 struct intel_quirk {
 	int device;
 	int subsystem_vendor;
@@ -141,6 +151,9 @@ static struct intel_quirk intel_quirks[] = {
 	/* HP Chromebook 14 (Celeron 2955U) */
 	{ 0x0a06, 0x103c, 0x21ed, quirk_backlight_present },
 
+	/* HP Mini 300-020 */
+	{ 0x0a06, 0x103c, 0x2b38, quirk_renderclear_reduced },
+
 	/* Dell Chromebook 11 */
 	{ 0x0a06, 0x1028, 0x0a35, quirk_backlight_present },
 
Signature · 6 lines
2.25.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

PATCH v3 3/3 drm/i915/gt: Force reduced batch size if new QUIRK_RENDERCLEAR_REDUCED is set.

In reply to [email protected]

From: Randy Wright <[email protected]>

In function batch_get_defaults, the smaller batch size will be selected if QUIRK_RENDERCLEAR_REDUCED is set.

---
 drivers/gpu/drm/i915/gt/gen7_renderclear.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/gen7_renderclear.c +1 -1
index d93d85cd3027..e5265cdf696b 100644
@@ -49,7 +49,7 @@ struct batch_vals {
 static void
 batch_get_defaults(struct drm_i915_private *i915, struct batch_vals *bv)
 {
-	if (IS_HASWELL(i915)) {
+	if (IS_HASWELL(i915) && !(i915->quirks & QUIRK_RENDERCLEAR_REDUCED)) {
 		bv->max_primitives = 280;
 		bv->max_urb_entries = MAX_URB_ENTRIES;
 		bv->surface_height = 16 * 16;
Signature · 6 lines
2.25.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Reduce context clear batch size to avoid gpu hang (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Reduce context clear batch size to avoid gpu hang (rev2)
URL : https://patchwork.freedesktop.org/series/83306/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c2bab1fe9322 drm/i915: Introduce quirk QUIRK_RENDERCLEAR_REDUCED
-:20: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#20: FILE: drivers/gpu/drm/i915/i915_drv.h:521:
+#define QUIRK_RENDERCLEAR_REDUCED (1<<8)
                                     ^

total: 0 errors, 0 warnings, 1 checks, 7 lines checked
7cfeb5acfcd5 drm/i915/display: Add function quirk_renderclear_reduced eaa8b2fa9755 drm/i915/gt: Force reduced batch size if new QUIRK_RENDERCLEAR_REDUCED is set.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Reduce context clear batch size to avoid gpu hang (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Reduce context clear batch size to avoid gpu hang (rev2)
URL : https://patchwork.freedesktop.org/series/83306/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
-
+drivers/gpu/drm/i915/gt/intel_reset.c:1312:5: warning: context imbalance in 'intel_gt_reset_trylock' - different lock contexts for basic block
+drivers/gpu/drm/i915/gt/selftest_reset.c:100:20:    expected void *in
+drivers/gpu/drm/i915/gt/selftest_reset.c:100:20:    got void [noderef] __iomem *[assigned] s
+drivers/gpu/drm/i915/gt/selftest_reset.c:100:20: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/i915/gt/selftest_reset.c:101:46:    expected void const *src
+drivers/gpu/drm/i915/gt/selftest_reset.c:101:46:    got void [noderef] __iomem *[assigned] s
+drivers/gpu/drm/i915/gt/selftest_reset.c:101:46: warning: incorrect type in argument 2 (different address spaces)
+drivers/gpu/drm/i915/gt/selftest_reset.c:136:20:    expected void *in
+drivers/gpu/drm/i915/gt/selftest_reset.c:136:20:    got void [noderef] __iomem *[assigned] s
+drivers/gpu/drm/i915/gt/selftest_reset.c:136:20: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/i915/gt/selftest_reset.c:137:46:    expected void const *src
+drivers/gpu/drm/i915/gt/selftest_reset.c:137:46:    got void [noderef] __iomem *[assigned] s
+drivers/gpu/drm/i915/gt/selftest_reset.c:137:46: warning: incorrect type in argument 2 (different address spaces)
+drivers/gpu/drm/i915/gt/selftest_reset.c:98:34:    expected unsigned int [usertype] *s
+drivers/gpu/drm/i915/gt/selftest_reset.c:98:34:    got void [noderef] __iomem *[assigned] s
+drivers/gpu/drm/i915/gt/selftest_reset.c:98:34: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/i915/gvt/mmio.c:290:23: warning: memcpy with byte count of 279040
+drivers/gpu/drm/i915/i915_perf.c:1440:15: warning: memset with byte count of 16777216
+drivers/gpu/drm/i915/i915_perf.c:1494:15: warning: memset with byte count of 16777216
+./include/linux/seqlock.h:838:24: warning: trying to copy expression type 31
+./include/linux/seqlock.h:838:24: warning: trying to copy expression type 31
+./include/linux/seqlock.h:864:16: warning: trying to copy expression type 31
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read64' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read64' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read64' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read64' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen8_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen8_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen8_write8' - different lock contexts for basic block

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for Reduce context clear batch size to avoid gpu hang (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Reduce context clear batch size to avoid gpu hang (rev2)
URL : https://patchwork.freedesktop.org/series/83306/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9237 -> Patchwork_18822
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_18822 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_18822, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_18822:

### IGT changes ###

#### Possible regressions ####

* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-kbl-7500u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-kbl-7500u/igt@[email protected]

New tests
---------

New tests have been introduced between CI_DRM_9237 and Patchwork_18822:

### New CI tests (1) ###

* boot:
- Statuses : 38 pass(s)
- Exec time: [0.0] s

Known issues
------------

Here are the changes found in Patchwork_18822 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@core_hotunplug@unbind-rebind:
- fi-icl-u2: [PASS][3] -> [DMESG-WARN][4] ([i915#1982]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-icl-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-icl-u2/igt@[email protected]

* igt@i915_module_load@reload:
- fi-byt-j1900: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-byt-j1900/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-byt-j1900/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-bsw-kefka/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-bsw-kefka/igt@[email protected]
- fi-apl-guc: [PASS][9] -> [DMESG-WARN][10] ([i915#1635] / [i915#1982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-apl-guc/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-apl-guc/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- fi-cfl-8109u: [PASS][11] -> [DMESG-WARN][12] ([i915#165]) +15 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-cfl-8109u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-cfl-8109u/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- {fi-kbl-7560u}: [INCOMPLETE][13] -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-kbl-7560u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-kbl-7560u/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bxt-dsi: [DMESG-WARN][15] ([i915#1635] / [i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-bxt-dsi/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-bxt-dsi/igt@[email protected]

* igt@kms_chamelium@dp-crc-fast:
- fi-cml-u2: [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-cml-u2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-cml-u2/igt@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-icl-u2: [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9237/fi-icl-u2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/fi-icl-u2/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982

Participating hosts (42 -> 38)
------------------------------

Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u

Build changes
-------------

* Linux: CI_DRM_9237 -> Patchwork_18822

CI-20190529: 20190529
CI_DRM_9237: eb3bd5069c40571849c6ccba06387ed4b8364b86 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5830: 12d370cb57e0cfcb781c87ad9e15e68b17a1f41f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18822: eaa8b2fa9755852d24ca628410732f0c425eedbe @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

eaa8b2fa9755 drm/i915/gt: Force reduced batch size if new QUIRK_RENDERCLEAR_REDUCED is set. 7cfeb5acfcd5 drm/i915/display: Add function quirk_renderclear_reduced c2bab1fe9322 drm/i915: Introduce quirk QUIRK_RENDERCLEAR_REDUCED

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18822/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw
In reply to [email protected]

Hi,

Quoted 25 lines · On 11/1/20 6:41 PM, [email protected] wrote:

From: Randy Wright <[email protected]>

For several months, I've been experiencing GPU hangs when starting Cinnamon on an HP Pavilion Mini 300-020 if I try to run an upstream kernel. I reported this recently in
https://gitlab.freedesktop.org/drm/intel/-/issues/2413 where I have attached the requested evidence including the state collected from /sys/class/drm/card0/error and debug output from dmesg.

I ran a bisect to find the problem, which indicates this is the troublesome commit:

[47f8253d2b8947d79fd3196bf96c1959c0f25f20] drm/i915/gen7: Clear all EU/L3 residual contexts

The nature of that commit suggested to me that reducing the batch size used in the context clear operation might help this relatively low-powered system to avoid the hang.... and it did! I simply forced this system to take the smaller batch length that is already used for non-Haswell systems.

The first two versions of this patch were posted as RFC patches to the Intel-gfx list, implementing the same algorithmic change in function batch_get_defaults, but without employing a properly constructed quirk.

Quoted 4 lines

I've now cleaned up the patch to employ a new QUIRK_RENDERCLEAR_REDUCED. The quirk is presently set only for the aforementioned HP Pavilion Mini 300-020. The patch now touches three files to define the quirk, set it, and then check for it in function batch_get_defaults.

Note I'm not really an i915 dev.

With that said I do wonder if we should not use the
reduced batch size in a lot more cases, the machine in question uses a 3558U CPU if the iGPU of that CPU has this issue, then I would expect pretty much all Haswell U models (at a minimum) to have this issue.

So solving this with a quirk for just the HP Pavilion Mini 300-020 seems wrong to me. I think we need a more generic way of enabling the reduced batch size. I even wonder if we should not simply use it everywhere. Since you do have a proper Haswell CPU, I guess it being an U model makes the hang easier to trigger, but I suspect the higher TPD ones may also still be susceptible ...

Regards,

Hans

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
Quoted 36 lines · Hans de Goede

Hi,

Quoted 12 lines · On 11/1/20 6:41 PM, [email protected] wrote:

From: Randy Wright <[email protected]>

For several months, I've been experiencing GPU hangs when starting Cinnamon on an HP Pavilion Mini 300-020 if I try to run an upstream kernel. I reported this recently in
https://gitlab.freedesktop.org/drm/intel/-/issues/2413 where I have attached the requested evidence including the state collected from /sys/class/drm/card0/error and debug output from dmesg.

I ran a bisect to find the problem, which indicates this is the troublesome commit:

Quoted 6 lines

[47f8253d2b8947d79fd3196bf96c1959c0f25f20] drm/i915/gen7: Clear all EU/L3 residual contexts
...
I've now cleaned up the patch to employ a new QUIRK_RENDERCLEAR_REDUCED.
The quirk is presently set only for the aforementioned HP Pavilion Mini 300-020. The patch now touches three files to define the quirk, set it,
and then check for it in function batch_get_defaults.

Note I'm not really an i915 dev.

With that said I do wonder if we should not use the
reduced batch size in a lot more cases, the machine in question uses a 3558U CPU if the iGPU of that CPU has this issue, then I would expect pretty much all Haswell U models (at a minimum) to have this issue.

So solving this with a quirk for just the HP Pavilion Mini 300-020 seems wrong to me. I think we need a more generic way of enabling the reduced batch size. I even wonder if we should not simply use it everywhere. Since you do have a proper Haswell CPU, I guess it being an U model makes the hang easier to trigger, but I suspect the higher TPD ones may also still be susceptible ...

Quoted 4 lines

Regards,

Hans

Hi Hans,

As you noted, the 3558U cpu is one of the least powerful processors to be designated as a Haswell, but there are others at the low end of the Haswell architecture that I also suspect might exhibit similar problems.

That leads me to think that more gpu hangs like mine will be reported when commit 47f8253d makes its way into widely used kernels. And that's why I chose to implement a quirk that would allow enrolling other systems as they are identified.

Your remark about applying the reduced batch size in all cases certainly
would simplify the patch. However, I don't have any other systems
using the i915 driver on which I could try to measure the putative performance penalty of reducing the batch size on a system that worked
properly with the large size. So I couldn't thoroughly investigate
the consequences of a broader change.

That said, if the i915 maintainers respond in favor of the simpler unconditional reduction of the batch size, I will be glad to propose a much simpler version of my patch.

I probably should clarify that this patch is to resolve a problem on a personally owned system that I use at home. It is not related to a problem with any of HPE's products, and so I don't have a lab full of systems using the i915 driver on which I can test a change that would have an effect many products. The consumer products like Pavilions stayed with HP when HPE split from HP five years ago.

--
Randy Wright Usmail: Hewlett Packard Enterprise
Email: [email protected] Servers Linux Enablement
Phone: (970) 898-0998 3404 E. Harmony Rd, Mailstop 36

                                Fort Collins, CO 80528-9599 

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw
Quoted 8 lines · On Mon, Nov 02, 2020 at 12:57:10PM -0700, [email protected] wrote:
Quoted 2 lines · Hans de Goede

Hi,

...
That said, if the i915 maintainers respond in favor of the simpler unconditional reduction of the batch size, I will be glad to propose a much simpler version of my patch.
...

I received a suggestion from Mika Kuoppala to test
https://patchwork.freedesktop.org/patch/399174/?series=83531&rev=1 as a solution for the GPU hang I observed, and the test was successful. I recommend this patch as a better approch than my own, as it addresses more general cases without introducing a new quirk.

--
Randy Wright Usmail: Hewlett Packard Enterprise
Email: [email protected] Servers Linux Enablement
Phone: (970) 898-0998 3404 E. Harmony Rd, Mailstop 36

                                Fort Collins, CO 80528-9599 

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx