public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [RFC 0/5] Adding CPU mmap support to DRM_IOCTL_I915_GEM_MMAP_GTT
@ 2016-01-26 14:53 Tvrtko Ursulin
  2016-01-26 14:53 ` [RFC 1/5] drm: Allow drivers setting vm_ops per vma offset node Tvrtko Ursulin
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Tvrtko Ursulin @ 2016-01-26 14:53 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

I had this code laying around from an abandoned project and decided to float it
in case someone can see the usefulness of it. Assuming the approach is even
remotely reasonable.

Currently the driver implements two ioctls to implement mmap(2) functionality.
Between the i915_gem_mmap_ioctl being not the right way to do it (it makes using
Valgrind impossible etc.), and i915_gem_mmap_gtt only supporting mapping via
GTT, there is an obvious way to improve things.

So this patch series tries to do that by extending the proper ioctl to support
mapping via CPU.

Approach I took was to extend the DRM offset manager to support assigning
vm operations with each node, instead of only having one set per-driver.

Won't spend too much time describing it unless there is real interest to
develop this or something like this further and the approach is at least
generally okay-ish.

Tvrtko Ursulin (5):
  drm: Allow drivers setting vm_ops per vma offset node
  drm/i915: Extract code mapping errno to vm fault code
  drm/i915: Add support for CPU mapping to DRM_IOCTL_I915_GEM_MMAP_GTT
  drm/i915: Add support for write-combined CPU mapping to
    DRM_IOCTL_I915_GEM_MMAP_GTT
  drm/i915: Announce the new DRM_IOCTL_I915_GEM_MMAP_GTT capabilities

 drivers/gpu/drm/drm_gem.c         |  53 ++++++----
 drivers/gpu/drm/drm_vma_manager.c |   1 +
 drivers/gpu/drm/i915/i915_dma.c   |   3 +
 drivers/gpu/drm/i915/i915_gem.c   | 207 +++++++++++++++++++++++++++++---------
 include/drm/drm_vma_manager.h     |  13 +++
 include/uapi/drm/i915_drm.h       |   5 +
 6 files changed, 216 insertions(+), 66 deletions(-)

-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-01-28 16:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 14:53 [RFC 0/5] Adding CPU mmap support to DRM_IOCTL_I915_GEM_MMAP_GTT Tvrtko Ursulin
2016-01-26 14:53 ` [RFC 1/5] drm: Allow drivers setting vm_ops per vma offset node Tvrtko Ursulin
2016-01-26 14:53 ` [RFC 2/5] drm/i915: Extract code mapping errno to vm fault code Tvrtko Ursulin
2016-01-26 15:18   ` Chris Wilson
2016-01-26 16:24     ` Tvrtko Ursulin
2016-01-26 16:42       ` Chris Wilson
2016-01-26 14:53 ` [RFC 3/5] drm/i915: Add support for CPU mapping to DRM_IOCTL_I915_GEM_MMAP_GTT Tvrtko Ursulin
2016-01-26 15:10   ` Chris Wilson
2016-01-26 16:23     ` Tvrtko Ursulin
2016-01-26 16:59       ` Chris Wilson
2016-01-27 15:24         ` Tvrtko Ursulin
2016-01-27 16:36           ` Chris Wilson
2016-01-27 16:40           ` Chris Wilson
2016-01-27 15:21   ` [PATCH v2 " Tvrtko Ursulin
2016-01-27 15:51     ` Daniel Vetter
2016-01-27 16:01       ` Tvrtko Ursulin
2016-01-27 16:10         ` Daniel Vetter
2016-01-27 16:32       ` Chris Wilson
2016-01-26 14:53 ` [RFC 4/5] drm/i915: Add support for write-combined " Tvrtko Ursulin
2016-01-26 15:11   ` Chris Wilson
2016-01-27 15:22   ` [PATCH v2 " Tvrtko Ursulin
2016-01-26 14:53 ` [RFC 5/5] drm/i915: Announce the new DRM_IOCTL_I915_GEM_MMAP_GTT capabilities Tvrtko Ursulin
2016-01-28  9:18 ` ✓ Fi.CI.BAT: success for Adding CPU mmap support to DRM_IOCTL_I915_GEM_MMAP_GTT (rev3) Patchwork
2016-01-28 16:10 ` Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox