public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/2] Fix prime_mmap to work when using LMEM
@ 2022-02-25 13:13 Gwan-gyeong Mun
  2022-02-25 13:13 ` [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: Update dma_buf_ops.unmap_dma_buf callback to use drm_gem_unmap_dma_buf() Gwan-gyeong Mun
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2022-02-25 13:13 UTC (permalink / raw)
  To: intel-gfx; +Cc: thomas.hellstrom, matthew.auld, daniel.vetter

The current implementation of i915 prime mmap only worked when initializing
drm_i915_gem_object with shmem_region.
When using LMEM, drm_i915_gem_object is initialized with ttm_system_region.
In order to make prime mmap work even this case, when using LMEM
(when using ttm in i915), dma_buf_ops.mmap callback calls drm_gem_prime_mmap().
drm_gem_prime_mmap() of drm core calls internally i915_gem_mmap() so that
prime mmap can perform normally.
The fake offset is processed inside drm_gem_prime_mmap().
    
Testcase: igt/prime_mmap
This patch makes  all of igt/prime_mmap tests success on gpus which use LMEM.

And these series remove defining and using a duplicate function: i915_gem_unmap_dma_buf()

After landing this patch. I'm going to send refactoring rfc patches that
handles the drm_driver.gem_prime_mmap callback, drm_gem_object_funcs.mmap
callback and drm_gem_object_funcs.vm_ops calllback.
ref: https://01.org/linuxgraphics/gfx-docs/drm/gpu/todo.html?#clean-up-mmap-forwarding
     https://www.kernel.org/doc/html/latest/gpu/todo.html#struct-drm-gem-object-funcs

Gwan-gyeong Mun (2):
  drm/i915/dmabuf: Update dma_buf_ops.unmap_dma_buf callback to use
    drm_gem_unmap_dma_buf()
  drm/i915/dmabuf: Fix prime_mmap to work when using LMEM

 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2022-03-02 14:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-25 13:13 [Intel-gfx] [PATCH 0/2] Fix prime_mmap to work when using LMEM Gwan-gyeong Mun
2022-02-25 13:13 ` [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: Update dma_buf_ops.unmap_dma_buf callback to use drm_gem_unmap_dma_buf() Gwan-gyeong Mun
2022-02-28 15:23   ` Das, Nirmoy
2022-02-25 13:13 ` [Intel-gfx] [PATCH 2/2] drm/i915/dmabuf: Fix prime_mmap to work when using LMEM Gwan-gyeong Mun
2022-03-02 11:56   ` Das, Nirmoy
2022-02-25 16:02 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-02-25 16:33 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-26 13:12 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-28 14:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Fix prime_mmap to work when using LMEM (rev2) Patchwork
2022-02-28 14:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-28 18:25 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-03-02 14:29   ` Gwan-gyeong Mun

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