drm/i915: extend i915_vma_pin_iomap()
authorCQ Tang <cq.tang@intel.com>
Fri, 10 Jun 2022 12:12:04 +0000 (15:12 +0300)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 22 Jun 2022 10:17:13 +0000 (11:17 +0100)
commitd976521a995a817007ae3f471ac22b93b1bd39f7
treee7670b9ab2a6aeeb04cb94270716e7ef0ab1d484
parentafd5cb3907eaf43e4ca88c162b92143551f0323e
drm/i915: extend i915_vma_pin_iomap()

In the future display might try call this with a normal smem object,
which doesn't require PIN_MAPPABLE underneath in order to CPU map the
pages (unlike stolen).  Extend i915_vma_pin_iomap() to directly use
i915_gem_object_pin_map() for such cases.

This change was suggested by Chris P Wilson, that we pin
the smem with i915_gem_object_pin_map_unlocked().

v2 (jheikkil): Change i915_gem_object_pin_map_unlocked to
               i915_gem_object_pin_map

Signed-off-by: CQ Tang <cq.tang@intel.com>
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Chris Wilson <chris.p.wilson@intel.com>
Cc: Jari Tahvanainen <jari.tahvanainen@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
[mauld: tweak commit message, plus minor checkpatch fix]
Link: https://patchwork.freedesktop.org/patch/msgid/20220610121205.29645-2-juhapekka.heikkila@gmail.com
drivers/gpu/drm/i915/i915_vma.c