]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Migrate to system at dma-buf attach time (v7)
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 23 Jul 2021 17:21:42 +0000 (12:21 -0500)
committerMatthew Auld <matthew.auld@intel.com>
Mon, 26 Jul 2021 15:37:38 +0000 (16:37 +0100)
commit456d9605a14a1359b866f2d7412687c1d997c724
tree0ab8c06f1f73a46813e3a00ada85431a13dfb8d7
parentc187f1ef7294db206a573122a222d788fef748ce
drm/i915/gem: Migrate to system at dma-buf attach time (v7)

Until we support p2p dma or as a complement to that, migrate data
to system memory at dma-buf attach time if possible.

v2:
- Rebase on dynamic exporter. Update the igt_dmabuf_import_same_driver
  selftest to migrate if we are LMEM capable.
v3:
- Migrate also in the pin() callback.
v4:
- Migrate in attach
v5: (jason)
- Lock around the migration
v6: (jason)
- Move the can_migrate check outside the lock
- Rework the selftests to test more migration conditions.  In
  particular, SMEM, LMEM, and LMEM+SMEM are all checked.
v7: (mauld)
- Misc style nits

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210723172142.3273510-9-jason@jlekstrand.net
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c