All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH v2] drm/i915: Assert that the context pin_counts do not overflow
Date: Fri, 17 Mar 2017 09:29:37 +0200	[thread overview]
Message-ID: <1489735777.2892.2.camel@linux.intel.com> (raw)
In-Reply-To: <20170316171628.3228-1-chris@chris-wilson.co.uk>

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

  parent reply	other threads:[~2017-03-17  7:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-03-16 17:59 ` ✓ Fi.CI.BAT: success for drm/i915: Assert that the context pin_counts do not overflow (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489735777.2892.2.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.