drm/i915: Add TTM offset argument to mmap.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 14 Jul 2021 12:28:33 +0000 (14:28 +0200)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 21 Jul 2021 15:50:35 +0000 (16:50 +0100)
commit7961c5b60f23dff5d82a523f9aeb8ebf34cf9926
tree5bfd8cadb9f2e9da146a1200afc6b719923e744b
parent15eb083bdb561bb4862cd04cd0523e55483e877e
drm/i915: Add TTM offset argument to mmap.

The FIXED mapping is only used for ttm, and tells userspace that the
mapping type is pre-defined. This disables the other type of mmap
offsets when discrete memory is used, so fix the selftests as well.

Document the struct as well, so it shows up in docbook.

Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mauld: Included minor fixes from the review comments]
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210714122833.766586-1-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_mman.c
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
include/uapi/drm/i915_drm.h