]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: unpin backing storage in dmabuf_unmap
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Aug 2013 07:10:37 +0000 (09:10 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 15 Aug 2013 13:40:46 +0000 (15:40 +0200)
commit4db9434c65e2bc838c3e24f4ae55ae517b45c3e3
tree3d8c4757af95676fb7a18b07dcb1ffb7e98a3f9a
parent664b422c2966cd39b8f67e8d53a566ea8c877cd6
drm/i915: unpin backing storage in dmabuf_unmap

This fixes a WARN in i915_gem_free_object when the
obj->pages_pin_count isn't 0.

v2: Add locking to unmap, noticed by Chris Wilson. Note that even
though we call unmap with our own dev->struct_mutex held that won't
result in an immediate deadlock since we never go through the dma_buf
interfaces for our own, reimported buffers. But it's still easy to
blow up and anger lockdep, but that's already the case with our ->map
implementation. Fixing this for real will involve per dma-buf ww mutex
locking by the callers. And lots of fun. So go with the duct-tape
approach for now.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Armin K. <krejzi@email.com> (v1)
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_dmabuf.c