Skip to contentSkip to conversation

drm/i915: Downgrade incorrect engine constructor usage warnings to development

PATCH In review Tvrtko Ursulin 5 participants 11 messages Jan 19, 2018 – Jan 22, 2018

Subsystems (2)
lore
Share & tools
lore

Tvrtko Ursulin

author maintainer
#0 lore raw

PATCH 1/3 drm/i915: Downgrade incorrect engine constructor usage warnings to development

From: Tvrtko Ursulin <[email protected]>

Render engine constructor helpers must only be called from the render engine constructors, but there is no need to burden the production binaries with warnings which can only be triggered during development.

---
 drivers/gpu/drm/i915/intel_engine_cs.c | 3 ++-
 drivers/gpu/drm/i915/intel_lrc.c       | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +2 -1
index d572b18d39eb..da05d38ba000 100644
@@ -1389,7 +1389,8 @@ int init_workarounds_ring(struct intel_engine_cs *engine)
 	struct drm_i915_private *dev_priv = engine->i915;
 	int err;
 
-	WARN_ON(engine->id != RCS);
+	if (GEM_WARN_ON(engine->id != RCS))
+		return -EINVAL;
 
 	dev_priv->workarounds.count = 0;
 	dev_priv->workarounds.hw_whitelist_count[engine->id] = 0;
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 24ce781d39b7..334d44d415ab 100644
@@ -1416,7 +1416,7 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
 	unsigned int i;
 	int ret;
 
-	if (WARN_ON(engine->id != RCS || !engine->scratch))
+	if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
 		return -EINVAL;
 
 	switch (INTEL_GEN(engine->i915)) {
Signature · 6 lines
2.14.1

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

PATCH 2/3 drm/i915: Per-engine scratch VMA is mandatory

From: Tvrtko Ursulin <[email protected]>

We fail engine initialization if the scratch VMA cannot be created so there is no point in error handle it later. If the initialization ordering gets messed up, we can explode during development just as well.

---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 334d44d415ab..74d7989389e1 100644
@@ -1416,7 +1416,7 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
 	unsigned int i;
 	int ret;
 
-	if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
+	if (GEM_WARN_ON(engine->id != RCS))
 		return -EINVAL;
 
 	switch (INTEL_GEN(engine->i915)) {
Signature · 6 lines
2.14.1

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

Re: [PATCH 2/3] drm/i915: Per-engine scratch VMA is mandatory

Quoting Tvrtko Ursulin (2018-01-19 10:00:04)

Quoted 16 lines

From: Tvrtko Ursulin <[email protected]>

We fail engine initialization if the scratch VMA cannot be created so there is no point in error handle it later. If the initialization ordering gets messed up, we can explode during development just as well.

---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_lrc.c +0 -0
index 334d44d415ab..74d7989389e1 100644

drivers/gpu/drm/i915/intel_lrc.c static int intel_init_workaround_bb(struct intel_engine_cs *engine) · line 1420

Quoted 6 lines
drivers/gpu/drm/i915/intel_lrc.c +1 -1
@@ -1416,7 +1416,7 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
        unsigned int i;
        int ret;
 
-       if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
+       if (GEM_WARN_ON(engine->id != RCS))
                return -EINVAL;

I was going to say the same thing on the previous patch! Well I guess that earns both an

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

author maintainer
#3 lore raw

PATCH 3/3 drm/i915: Stop ignoring failure to set up workaround batch buffers

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Setting up the workaround batch buffers can fail either due programming errors which will be caught in development, or by the inability to allocate a 4k object and pin it in GGTT at runtime.

Since this is highly unlikely, and it is not deterministic to allow driver operation to continue with unknown status of workarounds, it is better to fail engine initialization explicitly under those circumstances.

---
 drivers/gpu/drm/i915/intel_lrc.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +2 -7
index 74d7989389e1..6067c5fe6889 100644
@@ -2054,13 +2054,8 @@ int logical_render_ring_init(struct intel_engine_cs *engine)
 
 	ret = intel_init_workaround_bb(engine);
 	if (ret) {
-		/*
-		 * We continue even if we fail to initialize WA batch
-		 * because we only expect rare glitches but nothing
-		 * critical to prevent us from using GPU
-		 */
-		DRM_ERROR("WA batch buffer initialization failed: %d\n",
-			  ret);
+		DRM_ERROR("WA batch buffer initialization failed: %d\n", ret);
+		return ret;
 	}
 
 	return logical_ring_init(engine);
Signature · 6 lines
2.14.1

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

Re: [PATCH 3/3] drm/i915: Stop ignoring failure to set up workaround batch buffers

Quoting Tvrtko Ursulin (2018-01-19 10:00:05)

Quoted 9 lines

From: Tvrtko Ursulin <[email protected]>

Setting up the workaround batch buffers can fail either due programming errors which will be caught in development, or by the inability to allocate a 4k object and pin it in GGTT at runtime.

Since this is highly unlikely, and it is not deterministic to allow driver operation to continue with unknown status of workarounds, it is better to fail engine initialization explicitly under those circumstances.

Not entirely. Failing the driver load leaves the system without a display / console. Disabling GPU execution is one response, but that is likely to happen if the w/a requirement was severe enough.

We are not expecting to see an -EIO at this point in the init sequence and all other errors abort the driver load.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [PATCH 3/3] drm/i915: Stop ignoring failure to set up workaround batch buffers

Quoted 11 lines · Chris Wilson

Quoting Tvrtko Ursulin (2018-01-19 10:00:05)

Quoted 9 lines

From: Tvrtko Ursulin <[email protected]>

Setting up the workaround batch buffers can fail either due programming errors which will be caught in development, or by the inability to allocate a 4k object and pin it in GGTT at runtime.

Since this is highly unlikely, and it is not deterministic to allow driver operation to continue with unknown status of workarounds, it is better to fail engine initialization explicitly under those circumstances.

Quoted 6 lines

Not entirely. Failing the driver load leaves the system without a display / console. Disabling GPU execution is one response, but that is likely to happen if the w/a requirement was severe enough.

We are not expecting to see an -EIO at this point in the init sequence and all other errors abort the driver load.

Fair enough, I did not think about deeper consequences but only assumed we would run without one engine. Assumptions assumptions!

Regards,

Tvrtko

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

#6 lore raw

Re: [PATCH 3/3] drm/i915: Stop ignoring failure to set up workaround batch buffers

Quoting Tvrtko Ursulin (2018-01-19 10:29:12)

Quoted 17 lines · Chris Wilson
Quoted 15 lines

Quoting Tvrtko Ursulin (2018-01-19 10:00:05)

Quoted 9 lines

From: Tvrtko Ursulin <[email protected]>

Setting up the workaround batch buffers can fail either due programming errors which will be caught in development, or by the inability to allocate a 4k object and pin it in GGTT at runtime.

Since this is highly unlikely, and it is not deterministic to allow driver operation to continue with unknown status of workarounds, it is better to fail engine initialization explicitly under those circumstances.

Not entirely. Failing the driver load leaves the system without a display / console. Disabling GPU execution is one response, but that is likely to happen if the w/a requirement was severe enough.

Quoted 5 lines
Quoted 2 lines

We are not expecting to see an -EIO at this point in the init sequence and all other errors abort the driver load.

Fair enough, I did not think about deeper consequences but only assumed we would run without one engine. Assumptions assumptions!

It's not a bad idea :) The next time we give the init a spring clean we may try that (minimising the impact of any specific failure). -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development
URL : https://patchwork.freedesktop.org/series/36771/
State : success

== Summary ==

Series 36771v1 series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development
https://patchwork.freedesktop.org/api/1.0/series/36771/revisions/1/mbox/

Test gem_mmap_gtt:

        Subgroup basic-small-bo-tiledx:
                fail       -> PASS       (fi-gdg-551) fdo#102575

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:427s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:427s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:371s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:487s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:282s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:484s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:465s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:180  dwarn:0   dfail:0   fail:0   skip:108 time:279s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:517s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:393s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:403s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:411s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:410s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:458s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:494s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:454s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:576s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:434s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:516s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:525s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:485s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:494s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:526s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:394s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:469s
fi-skl-guc       total:288  pass:212  dwarn:48  dfail:0   fail:0   skip:28  time:407s

3ddf5cf5ba662407c1d233e73bd783c548cc973b drm-tip: 2018y-01m-19d-10h-03m-03s UTC integration manifest 900552342868 drm/i915: Stop ignoring failure to set up workaround batch buffers c25d70919bc2 drm/i915: Per-engine scratch VMA is mandatory
fd11054b3673 drm/i915: Downgrade incorrect engine constructor usage warnings to development

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7717/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

Re: ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development

Quoted 51 lines · Patchwork

== Series Details ==

Series: series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development
URL : https://patchwork.freedesktop.org/series/36771/
State : success

== Summary ==

Series 36771v1 series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development
https://patchwork.freedesktop.org/api/1.0/series/36771/revisions/1/mbox/

Test gem_mmap_gtt:

         Subgroup basic-small-bo-tiledx:
                 fail       -> PASS       (fi-gdg-551) fdo#102575

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:427s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:427s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:371s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:487s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:282s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:484s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:465s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45
fi-gdg-551       total:288  pass:180  dwarn:0   dfail:0   fail:0   skip:108 time:279s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:517s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:393s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:403s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:411s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:410s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:458s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:494s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:454s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:576s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:434s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:516s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:525s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:485s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:494s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:526s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:394s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:469s
fi-skl-guc       total:288  pass:212  dwarn:48  dfail:0   fail:0   skip:28  time:407s
Quoted 4 lines

3ddf5cf5ba662407c1d233e73bd783c548cc973b drm-tip: 2018y-01m-19d-10h-03m-03s UTC integration manifest 900552342868 drm/i915: Stop ignoring failure to set up workaround batch buffers c25d70919bc2 drm/i915: Per-engine scratch VMA is mandatory
fd11054b3673 drm/i915: Downgrade incorrect engine constructor usage warnings to development

Pushed first two, for whatever miniscule improvement. Thanks for the reviews!

Regards,

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

#9 lore raw

✗ Fi.CI.IGT: failure for series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: series starting with [1/3] drm/i915: Downgrade incorrect engine constructor usage warnings to development
URL : https://patchwork.freedesktop.org/series/36771/
State : failure

== Summary ==

Test perf:

        Subgroup oa-exponents:
                fail       -> PASS       (shard-apl) fdo#102254
Test kms_busy:
        Subgroup extended-modeset-hang-newfb-with-reset-render-a:
                skip       -> PASS       (shard-snb)
Test gem_tiled_swapping:
        Subgroup non-threaded:
                pass       -> INCOMPLETE (shard-snb) fdo#104218 +1
Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                notrun     -> INCOMPLETE (shard-hsw) fdo#103375
Test kms_flip:
        Subgroup vblank-vs-dpms-suspend:
                incomplete -> PASS       (shard-hsw) fdo#103540
        Subgroup modeset-vs-vblank-race:
                pass       -> FAIL       (shard-apl) fdo#103060
        Subgroup vblank-vs-suspend:
                pass       -> FAIL       (shard-apl) fdo#100368
Test drv_selftest:
        Subgroup live_gtt:
                incomplete -> PASS       (shard-apl) fdo#103927
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-pri-indfb-multidraw:
                pass       -> FAIL       (shard-snb) fdo#103167 +1
Test kms_cursor_legacy:
        Subgroup pipe-b-torture-move:
                pass       -> INCOMPLETE (shard-hsw)

fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167

shard-apl        total:2753 pass:1714 dwarn:1   dfail:0   fail:23  skip:1015 time:13977s
shard-hsw        total:2751 pass:1721 dwarn:1   dfail:0   fail:11  skip:1015 time:13506s
shard-snb        total:2694 pass:1292 dwarn:1   dfail:0   fail:11  skip:1389 time:7461s

Blacklisted hosts:
shard-kbl total:2741 pass:1831 dwarn:1 dfail:0 fail:22 skip:886 time:10248s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7717/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/3
#10 lore raw
In reply to Tvrtko Ursulin
Quoted 33 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Render engine constructor helpers must only be called from the render engine constructors, but there is no need to burden the production binaries with warnings which can only be triggered during development.

---
  drivers/gpu/drm/i915/intel_engine_cs.c | 3 ++-
  drivers/gpu/drm/i915/intel_lrc.c       | 2 +-
  2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +2 -1
index d572b18d39eb..da05d38ba000 100644
@@ -1389,7 +1389,8 @@ int init_workarounds_ring(struct intel_engine_cs *engine)
  	struct drm_i915_private *dev_priv = engine->i915;
  	int err;
 
-	WARN_ON(engine->id != RCS);
+	if (GEM_WARN_ON(engine->id != RCS))
+		return -EINVAL;
 
  	dev_priv->workarounds.count = 0;
  	dev_priv->workarounds.hw_whitelist_count[engine->id] = 0;
drivers/gpu/drm/i915/intel_lrc.c +0 -0
index 24ce781d39b7..334d44d415ab 100644

drivers/gpu/drm/i915/intel_lrc.c static int intel_init_workaround_bb(struct intel_engine_cs *engine) · line 1422

Quoted 8 lines
drivers/gpu/drm/i915/intel_lrc.c +1 -1
@@ -1416,7 +1416,7 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
  	unsigned int i;
  	int ret;
 
-	if (WARN_ON(engine->id != RCS || !engine->scratch))
+	if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
  		return -EINVAL;
 
  	switch (INTEL_GEN(engine->i915)) {

As Chris said in patch 2/3, do you want to remove the !scratch check here too? Otherwise both patches are also

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