drm/i915: Implement dma_buf_ops->kmap
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 May 2017 20:25:17 +0000 (21:25 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 May 2017 22:15:02 +0000 (23:15 +0100)
commitc944a308a95ab456c9cee4df4b4fa01763b94621
tree169188405f22fdfb443d659a9a62f943c643aecc
parentad15f74ac6c7ed1c7c252a760b017da042ec83fb
drm/i915: Implement dma_buf_ops->kmap

Since kmap allows us to block we can pin the pages and use our normal
page lookup routine making the implementation simple, or as some might
say quick and dirty.

Testcase: igt/drv_selftest/dmabuf
Testcase: igt/prime_rw
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170503202517.16797-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_dmabuf.c
drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c