drm/i915: Add per client max context ban limit
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 18 Nov 2016 13:10:47 +0000 (15:10 +0200)
committerMika Kuoppala <mika.kuoppala@intel.com>
Mon, 21 Nov 2016 12:36:40 +0000 (14:36 +0200)
commitb083a0870c7937e131762f8b702afa6bac8d08f4
tree9e84cb3132511f88b0de77ab7da4307d779016b0
parent841021713a4d700059774e0d3c77ec6c538daae2
drm/i915: Add per client max context ban limit

If we have a bad client submitting unfavourably across different
contexts, creating new ones, the per context scoring of badness
doesn't remove the root cause, the offending client.
To counter, keep track of per client context bans. Deny access if
client is responsible for more than 3 context bans in
it's lifetime.

v2: move ban check to context create ioctl (Chris)
v3: add commentary about hangs needed to reach client ban (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gpu_error.c