* [PATCH] drm/i915: Bail if we do not setup the RCS engine
@ 2017-04-11 15:30 Chris Wilson
2017-04-11 15:41 ` Chris Wilson
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-11 15:30 UTC (permalink / raw)
To: intel-gfx
In places, we assume that RCS exists. This has been true forever, but
let us catch this failure during bringup by adding an explicit check
that we do have an RCS engine.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 71e89a93fe18..3595209d86cf 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -154,9 +154,9 @@ int intel_engines_init_early(struct drm_i915_private *dev_priv)
{
struct intel_device_info *device_info = mkwrite_device_info(dev_priv);
unsigned int ring_mask = INTEL_INFO(dev_priv)->ring_mask;
- unsigned int mask = 0;
struct intel_engine_cs *engine;
enum intel_engine_id id;
+ unsigned int mask = 0;
unsigned int i;
int err;
@@ -183,6 +183,12 @@ int intel_engines_init_early(struct drm_i915_private *dev_priv)
if (WARN_ON(mask != ring_mask))
device_info->ring_mask = mask;
+ /* We always presume we have at least RCS available for probing */
+ if (WARN_ON(!(mask & ENGINE_MASK(RCS)))) {
+ err = -ENODEV;
+ goto cleanup;
+ }
+
device_info->num_rings = hweight32(mask);
return 0;
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Bail if we do not setup the RCS engine
2017-04-11 15:30 [PATCH] drm/i915: Bail if we do not setup the RCS engine Chris Wilson
@ 2017-04-11 15:41 ` Chris Wilson
2017-04-11 15:48 ` Chris Wilson
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-11 15:41 UTC (permalink / raw)
To: intel-gfx
On Tue, Apr 11, 2017 at 04:30:22PM +0100, Chris Wilson wrote:
> In places, we assume that RCS exists. This has been true forever, but
> let us catch this failure during bringup by adding an explicit check
> that we do have an RCS engine.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_engine_cs.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index 71e89a93fe18..3595209d86cf 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -154,9 +154,9 @@ int intel_engines_init_early(struct drm_i915_private *dev_priv)
> {
> struct intel_device_info *device_info = mkwrite_device_info(dev_priv);
> unsigned int ring_mask = INTEL_INFO(dev_priv)->ring_mask;
If there's buy in for this check, can I make this const ring_mask?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Bail if we do not setup the RCS engine
2017-04-11 15:30 [PATCH] drm/i915: Bail if we do not setup the RCS engine Chris Wilson
2017-04-11 15:41 ` Chris Wilson
@ 2017-04-11 15:48 ` Chris Wilson
2017-04-11 16:01 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-04-11 16:03 ` [PATCH] " Tvrtko Ursulin
3 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-11 15:48 UTC (permalink / raw)
To: intel-gfx
On Tue, Apr 11, 2017 at 04:30:22PM +0100, Chris Wilson wrote:
> In places, we assume that RCS exists. This has been true forever, but
> let us catch this failure during bringup by adding an explicit check
> that we do have an RCS engine.
Note that some might argue that I'm using the RCS engine as a proxy for
a missing dev_priv->gt function table... You know who you are!
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Bail if we do not setup the RCS engine
2017-04-11 15:30 [PATCH] drm/i915: Bail if we do not setup the RCS engine Chris Wilson
2017-04-11 15:41 ` Chris Wilson
2017-04-11 15:48 ` Chris Wilson
@ 2017-04-11 16:01 ` Patchwork
2017-04-11 16:03 ` [PATCH] " Tvrtko Ursulin
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-04-11 16:01 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Bail if we do not setup the RCS engine
URL : https://patchwork.freedesktop.org/series/22860/
State : success
== Summary ==
Series 22860v1 drm/i915: Bail if we do not setup the RCS engine
https://patchwork.freedesktop.org/api/1.0/series/22860/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100125
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:431s
fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:427s
fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:576s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:506s
fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:488s
fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:480s
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:412s
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:407s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:428s
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:479s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:469s
fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:454s
fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:567s
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:452s
fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:570s
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:457s
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:484s
fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:435s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:534s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:403s
1a8653e657e1154a337956033af17740ef5f9dda drm-tip: 2017y-04m-11d-14h-18m-13s UTC integration manifest
5c2b73d drm/i915: Bail if we do not setup the RCS engine
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4475/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Bail if we do not setup the RCS engine
2017-04-11 15:30 [PATCH] drm/i915: Bail if we do not setup the RCS engine Chris Wilson
` (2 preceding siblings ...)
2017-04-11 16:01 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-04-11 16:03 ` Tvrtko Ursulin
3 siblings, 0 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2017-04-11 16:03 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 11/04/2017 16:30, Chris Wilson wrote:
> In places, we assume that RCS exists. This has been true forever, but
> let us catch this failure during bringup by adding an explicit check
> that we do have an RCS engine.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_engine_cs.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index 71e89a93fe18..3595209d86cf 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -154,9 +154,9 @@ int intel_engines_init_early(struct drm_i915_private *dev_priv)
> {
> struct intel_device_info *device_info = mkwrite_device_info(dev_priv);
> unsigned int ring_mask = INTEL_INFO(dev_priv)->ring_mask;
> - unsigned int mask = 0;
> struct intel_engine_cs *engine;
> enum intel_engine_id id;
> + unsigned int mask = 0;
+/- 0 :)
> unsigned int i;
> int err;
>
> @@ -183,6 +183,12 @@ int intel_engines_init_early(struct drm_i915_private *dev_priv)
> if (WARN_ON(mask != ring_mask))
> device_info->ring_mask = mask;
>
> + /* We always presume we have at least RCS available for probing */
> + if (WARN_ON(!(mask & ENGINE_MASK(RCS)))) {
No idea why would you want this. You could also just use HAS_ENGINE
since info->ring_mask is up to date by this point. And you can make
ring_mask const if it makes any difference. :)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> + err = -ENODEV;
> + goto cleanup;
> + }
> +
> device_info->num_rings = hweight32(mask);
>
> return 0;
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-11 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 15:30 [PATCH] drm/i915: Bail if we do not setup the RCS engine Chris Wilson
2017-04-11 15:41 ` Chris Wilson
2017-04-11 15:48 ` Chris Wilson
2017-04-11 16:01 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-04-11 16:03 ` [PATCH] " Tvrtko Ursulin
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.