[PATCH 2/2] drm/i915/gem: Migrate to system at dma-buf attach time

2021-07-01 Thread Michael J. Ruhl
() callback. v4: - Migrate in attach Signed-off-by: Thomas Hellström Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 12 +++- drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff

[PATCH 1/2] drm/i915/gem: Correct the locking and pin pattern for dma-buf

2021-07-01 Thread Michael J. Ruhl
support and move the pinning into the attach/detach path. Reported-by: Michael J. Ruhl Signed-off-by: Thomas Hellström Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c| 46 ++-- .../drm/i915/gem/selftests/i915_gem_dmabuf.c | 111 +- 2 files

[PATCH 2/2] drm/i915/gem: Migrate to system at dma-buf attach time

2021-07-01 Thread Michael J. Ruhl
() callback. v4: - Migrate in attach Signed-off-by: Thomas Hellström Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 12 +++- drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff

[PATCH 1/2] drm/i915/gem: Correct the locking and pin pattern for dma-buf

2021-07-01 Thread Michael J. Ruhl
support and move the pinning into the attach/detach path. Reported-by: Michael J. Ruhl Signed-off-by: Thomas Hellström Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c| 46 +-- .../drm/i915/gem/selftests/i915_gem_dmabuf.c | 116 +- 2 files

[PATCH v1 1/2] drm/i915/gem: Correct the locking and pin pattern for dma-buf

2021-07-01 Thread Michael J. Ruhl
support and move the pinning into the attach/detach path. v4: (ruhl) - Put pages does not need to assert on the dma-resv Reported-by: Michael J. Ruhl Signed-off-by: Thomas Hellström Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c| 44 +-- .../drm/i915/gem

[PATCH v1 2/2] drm/i915/gem: Migrate to system at dma-buf attach time

2021-07-01 Thread Michael J. Ruhl
() callback. v4: - Migrate in attach Signed-off-by: Thomas Hellström Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 12 +++- drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff

[PATCH] io-mapping: Indicate mapping failure

2020-07-21 Thread Michael J. Ruhl
Sometimes it is good to know when your mapping failed. Fixes: cafaf14a5d8f ("io-mapping: Always create a struct to hold metadata about the io-mapping" Cc: Andrew Morton Cc: Mike Rapoport Cc: Andy Shevchenko Cc: Chris Wilson Cc: sta...@vger.kernel.org Signed-off-by: Micha

io-mapping: Indicate mapping failure

2020-07-21 Thread Michael J. Ruhl
I found this when my system crashed long after the mapping failure. The expected behavior should have been driver exit. Since this is almost exclusively used for drm, I am posting to the dri mailing list. Should this go to another list as well? Thanks, Mike __

io-mapping: Indicate mapping failure

2020-07-21 Thread Michael J. Ruhl
I found this when my system crashed long after the mapping failure. The expected behavior should have been driver exit. Since this is almost exclusively used for drm, I am posting to the dri mailing list. Should this go to another list as well? Thanks, Mike Cc: Mike Rapoport Cc: Andy Shevchen

[PATCH v1] io-mapping: Indicate mapping failure

2020-07-21 Thread Michael J. Ruhl
ot;io-mapping: Always create a struct to hold metadata about the io-mapping" Cc: Andrew Morton Cc: Mike Rapoport Cc: Andy Shevchenko Cc: Chris Wilson Cc: sta...@vger.kernel.org Signed-off-by: Michael J. Ruhl --- include/linux/io-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v2] io-mapping: Indicate mapping failure

2020-07-21 Thread Michael J. Ruhl
. Fixes: cafaf14a5d8f ("io-mapping: Always create a struct to hold metadata about the io-mapping") Cc: Andrew Morton Cc: Mike Rapoport Cc: Andy Shevchenko Cc: Chris Wilson Cc: sta...@vger.kernel.org Signed-off-by: Michael J. Ruhl --- v2: reflect review comments --- include/linux/io-map

[PATCH 1/5] drm/i915/dmabuf: dmabuf cleanup

2020-04-22 Thread Michael J. Ruhl
Some minor cleanup of some variables to make upcoming patches a little easier. Normalize struct sg_table to sgt. Normalize struct dma_buf_attachment to attach. checkpatch issues sizeof(), !NULL updates. Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 58

[PATCH 2/5] drm/i915/dmabuf: Use scatterlist for_each_sg API

2020-04-22 Thread Michael J. Ruhl
Update open coded for loop to use the standard scatterlist for_each_sg API. Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915

[PATCH 4/5] drm/i915/dmabuf: Add LMEM support for cpu access and vmap interfaces

2020-04-22 Thread Michael J. Ruhl
LMEM backed buffer objects do not have struct page information, and are not WB compatible. Currently the cpu access and vmap interfaces only support struct page backed objects. Update the dma-buf interfaces begin/end_cpu_access and vmap/vunmap to be LMEM aware. Signed-off-by: Michael J. Ruhl

[PATCH 3/5] drm/i915/dmabuf: Add LMEM knowledge to dmabuf map handler

2020-04-22 Thread Michael J. Ruhl
/unmapping functions, based on the LMEM usage of the dma_address to allow LMEM backed buffer objects to be mapped. Before mapping check the peer2peer distance to verify that P2P dma can occur. Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 82 -- 1

[PATCH 5/5] drm/i915/dmabuf Introduce dmabuf mmap to LMEM

2020-04-22 Thread Michael J. Ruhl
_mman path. Signed-off-by: Michael J. Ruhl CC: Brian Welty --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c| 58 -- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 103 ++ drivers/gpu/drm/i915/gem/i915_gem_mman.h | 8 ++ .../drm/i915/gem/selftests/i915_gem_m

drm/i915: Teaching i915 dmabuf about LMEM

2020-04-22 Thread Michael J. Ruhl
With the addition of device memory (lmem) for the i915 driver, the dma-buf interface needs a little polishing. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel