Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Assert that the context pin_counts do not overflow
@ 2017-03-16 16:03 Chris Wilson
  2017-03-16 16:27 ` Mika Kuoppala
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Chris Wilson @ 2017-03-16 16:03 UTC (permalink / raw)
  To: intel-gfx

This should be impossible, but let's assert that we do not pin a context
4 billion times before retiring!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c        | 1 +
 drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 32ec06245281..77574dfc48ef 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -747,6 +747,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
 
 	if (ce->pin_count++)
 		return 0;
+	GEM_BUG_ON(ce->pin_count); /* no overflow please! */
 
 	if (!ce->state) {
 		ret = execlists_context_deferred_alloc(ctx, engine);
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index e895c99f5dd9..758191e69403 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1445,6 +1445,7 @@ static int intel_ring_context_pin(struct intel_engine_cs *engine,
 
 	if (ce->pin_count++)
 		return 0;
+	GEM_BUG_ON(ce->pin_count); /* no overflow please! */
 
 	if (ce->state) {
 		ret = context_pin(ctx);
-- 
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] 9+ messages in thread

* Re: [PATCH] drm/i915: Assert that the context pin_counts do not overflow
  2017-03-16 16:03 [PATCH] drm/i915: Assert that the context pin_counts do not overflow Chris Wilson
@ 2017-03-16 16:27 ` Mika Kuoppala
  2017-03-16 16:30   ` Chris Wilson
  2017-03-16 16:45 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Mika Kuoppala @ 2017-03-16 16:27 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> This should be impossible, but let's assert that we do not pin a context
> 4 billion times before retiring!
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c        | 1 +
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 32ec06245281..77574dfc48ef 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -747,6 +747,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
>  
>  	if (ce->pin_count++)
>  		return 0;
> +	GEM_BUG_ON(ce->pin_count); /* no overflow please! */
>

!ce->pin_count?
-Mika

>  	if (!ce->state) {
>  		ret = execlists_context_deferred_alloc(ctx, engine);
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index e895c99f5dd9..758191e69403 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1445,6 +1445,7 @@ static int intel_ring_context_pin(struct intel_engine_cs *engine,
>  
>  	if (ce->pin_count++)
>  		return 0;
> +	GEM_BUG_ON(ce->pin_count); /* no overflow please! */
>  
>  	if (ce->state) {
>  		ret = context_pin(ctx);
> -- 
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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] drm/i915: Assert that the context pin_counts do not overflow
  2017-03-16 16:27 ` Mika Kuoppala
@ 2017-03-16 16:30   ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-03-16 16:30 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Thu, Mar 16, 2017 at 06:27:16PM +0200, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > This should be impossible, but let's assert that we do not pin a context
> > 4 billion times before retiring!
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_lrc.c        | 1 +
> >  drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> > index 32ec06245281..77574dfc48ef 100644
> > --- a/drivers/gpu/drm/i915/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/intel_lrc.c
> > @@ -747,6 +747,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
> >  
> >  	if (ce->pin_count++)
> >  		return 0;
> > +	GEM_BUG_ON(ce->pin_count); /* no overflow please! */
> >
> 
> !ce->pin_count?
You might be right ;)
-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] 9+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915: Assert that the context pin_counts do not overflow
  2017-03-16 16:03 [PATCH] drm/i915: Assert that the context pin_counts do not overflow Chris Wilson
  2017-03-16 16:27 ` Mika Kuoppala
@ 2017-03-16 16:45 ` Patchwork
  2017-03-16 17:16 ` [PATCH v2] " Chris Wilson
  2017-03-16 17:59 ` ✓ Fi.CI.BAT: success for drm/i915: Assert that the context pin_counts do not overflow (rev2) Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-03-16 16:45 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert that the context pin_counts do not overflow
URL   : https://patchwork.freedesktop.org/series/21390/
State : failure

== Summary ==

Series 21390v1 drm/i915: Assert that the context pin_counts do not overflow
https://patchwork.freedesktop.org/api/1.0/series/21390/revisions/1/mbox/

Test core_auth:
        Subgroup basic-auth:
                pass       -> SKIP       (fi-snb-2520m)
                pass       -> SKIP       (fi-snb-2600)
                pass       -> SKIP       (fi-bxt-j4205)
                pass       -> SKIP       (fi-kbl-7500u)
                pass       -> SKIP       (fi-ilk-650)
                pass       -> SKIP       (fi-bxt-t5700)
                pass       -> SKIP       (fi-ivb-3520m)
                pass       -> SKIP       (fi-byt-j1900)
                pass       -> SKIP       (fi-byt-n2820)
                pass       -> SKIP       (fi-hsw-4770)
Test core_prop_blob:
        Subgroup basic:
                pass       -> SKIP       (fi-snb-2520m)
                pass       -> SKIP       (fi-snb-2600)
                pass       -> SKIP       (fi-bxt-j4205)
                pass       -> SKIP       (fi-kbl-7500u)
                pass       -> SKIP       (fi-ilk-650)
                pass       -> SKIP       (fi-bxt-t5700)
                pass       -> SKIP       (fi-ivb-3520m)
                pass       -> SKIP       (fi-byt-j1900)
                pass       -> SKIP       (fi-byt-n2820)
                pass       -> SKIP       (fi-hsw-4770)
Test drv_getparams_basic:
        Subgroup basic-eu-total:
                pass       -> SKIP       (fi-snb-2520m)
                pass       -> SKIP       (fi-snb-2600)
                pass       -> SKIP       (fi-bxt-j4205)
                pass       -> SKIP       (fi-kbl-7500u)
                pass       -> SKIP       (fi-ilk-650)
                pass       -> SKIP       (fi-bxt-t5700)
                pass       -> SKIP       (fi-ivb-3520m)
                pass       -> SKIP       (fi-byt-j1900)
                pass       -> SKIP       (fi-byt-n2820)
                pass       -> SKIP       (fi-hsw-4770)
        Subgroup basic-subslice-total:
                pass       -> SKIP       (fi-snb-2520m)
                pass       -> SKIP       (fi-snb-2600)
                pass       -> SKIP       (fi-bxt-j4205)
                pass       -> SKIP       (fi-kbl-7500u)
                pass       -> SKIP       (fi-ilk-650)
                pass       -> SKIP       (fi-bxt-t5700)
                pass       -> SKIP       (fi-ivb-3520m)
                pass       -> SKIP       (fi-byt-j1900)
                pass       -> SKIP       (fi-byt-n2820)
                pass       -> SKIP       (fi-hsw-4770)
Test drv_hangman:
        Subgroup error-state-basic:
                pass       -> SKIP       (fi-snb-2520m)
                pass       -> SKIP       (fi-snb-2600)
                pass       -> SKIP       (fi-bxt-j4205)
                pass       -> SKIP       (fi-kbl-7500u)
                pass       -> SKIP       (fi-ilk-650)
                pass       -> SKIP       (fi-bxt-t5700)
                pass       -> SKIP       (fi-ivb-3520m)
                pass       -> SKIP       (fi-byt-j1900)
                pass       -> SKIP       (fi-byt-n2820)
                pass       -> SKIP       (fi-hsw-4770)
Test drv_module_reload:
        Subgroup basic-no-display:
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-ilk-650)
                pass       -> FAIL       (fi-bxt-t5700)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-hsw-4770)
        Subgroup basic-reload:
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-ilk-650) fdo#100045
                pass       -> FAIL       (fi-bxt-t5700)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-hsw-4770)
        Subgroup basic-reload-final:
                pass       -> FAIL       (fi-snb-2520m)
                pass       -> FAIL       (fi-snb-2600)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-ilk-650) fdo#100045
                pass       -> FAIL       (fi-bxt-t5700)
                pass       -> FAIL       (fi-ivb-3520m)
                pass       -> FAIL       (fi-byt-j1900)
                pass       -> FAIL       (fi-byt-n2820)
                pass       -> FAIL       (fi-hsw-4770)
Test gem_basic:
        Subgroup bad-close:
                pass       -> SKIP       (fi-snb-2520m)
                pass       -> SKIP       (fi-snb-2600)
WARNING: Long output truncated
fi-skl-6700k failed to connect after reboot

c1374a7a4a7fb0093d98ad6aa7071c8671fcdf08 drm-tip: 2017y-03m-16d-14h-28m-12s UTC integration manifest
716f41c drm/i915: Assert that the context pin_counts do not overflow

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4204/
_______________________________________________
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

* [PATCH v2] drm/i915: Assert that the context pin_counts do not overflow
  2017-03-16 16:03 [PATCH] drm/i915: Assert that the context pin_counts do not overflow Chris Wilson
  2017-03-16 16:27 ` Mika Kuoppala
  2017-03-16 16:45 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-03-16 17:16 ` Chris Wilson
  2017-03-16 17:23   ` Mika Kuoppala
  2017-03-17  7:29   ` Joonas Lahtinen
  2017-03-16 17:59 ` ✓ Fi.CI.BAT: success for drm/i915: Assert that the context pin_counts do not overflow (rev2) Patchwork
  3 siblings, 2 replies; 9+ messages in thread
From: Chris Wilson @ 2017-03-16 17:16 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

This should be impossible, but let's assert that we do not pin a context
4 billion times before retiring!

v2: Fix the assertion -- the patch had just one job to do!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c        | 1 +
 drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 73386b7b22fa..aad107337530 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -748,6 +748,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
 
 	if (ce->pin_count++)
 		return 0;
+	GEM_BUG_ON(!ce->pin_count); /* no overflow please! */
 
 	if (!ce->state) {
 		ret = execlists_context_deferred_alloc(ctx, engine);
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index e895c99f5dd9..be908e2a52ea 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1445,6 +1445,7 @@ static int intel_ring_context_pin(struct intel_engine_cs *engine,
 
 	if (ce->pin_count++)
 		return 0;
+	GEM_BUG_ON(!ce->pin_count); /* no overflow please! */
 
 	if (ce->state) {
 		ret = context_pin(ctx);
-- 
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] 9+ messages in thread

* Re: [PATCH v2] drm/i915: Assert that the context pin_counts do not overflow
  2017-03-16 17:16 ` [PATCH v2] " Chris Wilson
@ 2017-03-16 17:23   ` Mika Kuoppala
  2017-03-16 20:51     ` Chris Wilson
  2017-03-17  7:29   ` Joonas Lahtinen
  1 sibling, 1 reply; 9+ messages in thread
From: Mika Kuoppala @ 2017-03-16 17:23 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> This should be impossible, but let's assert that we do not pin a context
> 4 billion times before retiring!
>
> v2: Fix the assertion -- the patch had just one job to do!
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_lrc.c        | 1 +
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 73386b7b22fa..aad107337530 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -748,6 +748,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
>  
>  	if (ce->pin_count++)
>  		return 0;
> +	GEM_BUG_ON(!ce->pin_count); /* no overflow please! */
>  
>  	if (!ce->state) {
>  		ret = execlists_context_deferred_alloc(ctx, engine);
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index e895c99f5dd9..be908e2a52ea 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1445,6 +1445,7 @@ static int intel_ring_context_pin(struct intel_engine_cs *engine,
>  
>  	if (ce->pin_count++)
>  		return 0;
> +	GEM_BUG_ON(!ce->pin_count); /* no overflow please! */
>  
>  	if (ce->state) {
>  		ret = context_pin(ctx);
> -- 
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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 drm/i915: Assert that the context pin_counts do not overflow (rev2)
  2017-03-16 16:03 [PATCH] drm/i915: Assert that the context pin_counts do not overflow Chris Wilson
                   ` (2 preceding siblings ...)
  2017-03-16 17:16 ` [PATCH v2] " Chris Wilson
@ 2017-03-16 17:59 ` Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-03-16 17:59 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert that the context pin_counts do not overflow (rev2)
URL   : https://patchwork.freedesktop.org/series/21390/
State : success

== Summary ==

Series 21390v2 drm/i915: Assert that the context pin_counts do not overflow
https://patchwork.freedesktop.org/api/1.0/series/21390/revisions/2/mbox/

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 462s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 584s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 533s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 570s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 498s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 494s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 432s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 429s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 443s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 517s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 490s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 475s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 483s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time: 592s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 477s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 510s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 551s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 409s

da5a30c70988b681c2a75b81d283bc66470a2216 drm-tip: 2017y-03m-16d-16h-30m-22s UTC integration manifest
304d2ce drm/i915: Assert that the context pin_counts do not overflow

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4207/
_______________________________________________
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: Assert that the context pin_counts do not overflow
  2017-03-16 17:23   ` Mika Kuoppala
@ 2017-03-16 20:51     ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-03-16 20:51 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Thu, Mar 16, 2017 at 07:23:47PM +0200, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > This should be impossible, but let's assert that we do not pin a context
> > 4 billion times before retiring!
> >
> > v2: Fix the assertion -- the patch had just one job to do!
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

Ta, applied because I like seeing CI churn (still reassuring myself that
the sporadic bug is now fixed).
-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] 9+ messages in thread

* Re: [PATCH v2] drm/i915: Assert that the context pin_counts do not overflow
  2017-03-16 17:16 ` [PATCH v2] " Chris Wilson
  2017-03-16 17:23   ` Mika Kuoppala
@ 2017-03-17  7:29   ` Joonas Lahtinen
  1 sibling, 0 replies; 9+ messages in thread
From: Joonas Lahtinen @ 2017-03-17  7:29 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Mika Kuoppala

On to, 2017-03-16 at 17:16 +0000, Chris Wilson wrote:
> This should be impossible, but let's assert that we do not pin a context
> 4 billion times before retiring!
> 
> v2: Fix the assertion -- the patch had just one job to do!
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

<SNIP>

> @@ -748,6 +748,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
>  
>  	if (ce->pin_count++)
>  		return 0;
> +	GEM_BUG_ON(!ce->pin_count); /* no overflow please! */

An average engineer is able to tell this is about overflow, even
without the comment :P

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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:[~2017-03-17  7:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 16:03 [PATCH] drm/i915: Assert that the context pin_counts do not overflow Chris Wilson
2017-03-16 16:27 ` Mika Kuoppala
2017-03-16 16:30   ` Chris Wilson
2017-03-16 16:45 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-03-16 17:16 ` [PATCH v2] " Chris Wilson
2017-03-16 17:23   ` Mika Kuoppala
2017-03-16 20:51     ` Chris Wilson
2017-03-17  7:29   ` Joonas Lahtinen
2017-03-16 17:59 ` ✓ Fi.CI.BAT: success for drm/i915: Assert that the context pin_counts do not overflow (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox