drm/i915: Pin backing pages whilst exporting through a dmabuf vmap
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Sep 2012 20:02:54 +0000 (21:02 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Sep 2012 12:22:56 +0000 (14:22 +0200)
commita5570178c059cec59e9835be20bc8546377fa7b5
tree02689b01aa2d069ec59cbc7b1f95af61a1003d31
parent37e680a15ff6375ff02773161f817e90a38c51f7
drm/i915: Pin backing pages whilst exporting through a dmabuf vmap

We need to refcount our pages in order to prevent reaping them at
inopportune times, such as when they currently vmapped or exported to
another driver. However, we also wish to keep the lazy deallocation of
our pages so we need to take a pin/unpinned approach rather than a
simple refcount.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_dmabuf.c