]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: drm/i915: Fix recursive calls to unmap
authorBen Widawsky <ben@bwidawsk.net>
Wed, 25 Jan 2012 04:36:15 +0000 (20:36 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Jan 2012 10:25:51 +0000 (11:25 +0100)
commit8436473a4b10243fd4c3009b97b6646c2ba642f7
treed7b97ef24e342f2fe0d04415d0149ab41fd71d29
parentb93f9cf14e714c20ce9a544ed1a6070ee7604588
drm/i915: drm/i915: Fix recursive calls to unmap

After the ILK vt-d workaround patches it became clear that we had
introduced a bug.  Chris Wilson tracked down the issue to recursive
calls to unmap. This happens because we try to optimize waiting on
requests by calling retire requests after the wait, which may drop the
last reference on an object and end up freeing the object (and then
unmap the object from the gtt).

After the last patch we can now choose to defer processing the retire
list.

Kudos to Chris Wilson for tracking this one down.

This patch fixes gem_unref_active_buffers from i-g-t. It was tested by
forcing do_idle_maps to true.

This also fixes tests/gem_linear_blits in intel-gpu-tools.

Reported-by: guang.a.yang@intel.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42180
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c