]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Unpin last_context at reset
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Jun 2014 19:04:48 +0000 (22:04 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 7 Jul 2014 15:21:56 +0000 (17:21 +0200)
commit324b1c3adbb491c07945b3bad2b7cbb2be7b3510
tree84e1ced842d9e172cb9854ec1f9cd133156d59d4
parent30c09dbb91a12a66c43c1cf64b07ed293f2e550f
drm/i915: Unpin last_context at reset

We're forgetting to unpin the last_context from the ggtt at GPU reset
time. This leads to the vma pin_count leaking at every reset if the
last context wasn't the ring default context. Further use of the same
context will trigger the pin_count check in i915_gem_object_pin() and
userspace will be faced with EBUSY as a result.

This plaques kms_flip rather badly since it performs lots of resets,
and every fd has its own default context these days.

Fix the problem by properly unpinning the last context at reset.

This regression seems to back to

commit c48907db0449a3a4e8523908ffbdca579193dbda
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Fri Dec 6 14:11:03 2013 -0800

   drm/i915: Better reset handling for contexts

Testcase: igt/gem_ctx_exec/reset-pin-leak
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_context.c