]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Clean up VMAs before freeing
authorBen Widawsky <ben@bwidawsk.net>
Fri, 6 Dec 2013 22:11:23 +0000 (14:11 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Dec 2013 15:15:40 +0000 (16:15 +0100)
commit2e56f48e8d23e7809f938b0a1e510c7f384e9882
tree4312b3582b6fce2b71c6e20b3cf9bc390dc2e214
parent0847475a87a0c1ceee0d5bee3983df273c6c9341
drm/i915: Clean up VMAs before freeing

It's quite common for an object to simply be on the inactive list (and
not unbound) when we want to free the context. This of course happens
with lazy unbinding. Simply, this is needed when an object isn't fully
unbound but we want to free one VMA of the object, for whatever reason.

NOTE: The aliasing PPGTT is not a proper VM, so it needs special casing.

This addresses the fixup requirement mentioned in:
drm/915: Better reset handling for contexts

In the flink, and dmabuf case, we can't assert that the object isn't
still active. To keep it more generic, just check the vma's link in the
object vma list. If we wanted to do a better job, we could track last
seqno (and active) per VMA. It was decided not to do this in the last
iteration. Unfortunately this means the assertion can miss real bugs
when using flink/dmabuf.

v2: Use the newer introduced i915_gem_evict_vm(). Note that handling the
aliasing PPGTT is special.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h