OSDN Git Service

drm/i915: Assert that the context pin_counts do not overflow
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Mar 2017 17:16:28 +0000 (17:16 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Mar 2017 20:48:58 +0000 (20:48 +0000)
commita533b4ba776c16bce53b9739c47409ed3cfe5776
tree0adc1d91e9dfc7166677595f2d3da49e7cdfbc49
parentd3df42b76f583c6c4c6235a1b44339505eaff559
drm/i915: Assert that the context pin_counts do not overflow

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>
Link: http://patchwork.freedesktop.org/patch/msgid/20170316171628.3228-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c