All of lore.kernel.org
 help / color / mirror / Atom feed
* [Nouveau] [PATCH 0/8] drm: Clean up mmap for TTM-based GEM drivers
@ 2021-04-06  9:08 ` Thomas Zimmermann
  0 siblings, 0 replies; 102+ messages in thread
From: Thomas Zimmermann @ 2021-04-06  9:08 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, bskeggs,
	ray.huang, linux-graphics-maintainer, sroland, zackr,
	shashank.sharma, sam, emil.velikov, Felix.Kuehling, nirmoy.das
  Cc: nouveau, dri-devel, amd-gfx

Implement mmap via struct drm_gem_object_functions.mmap for amdgpu,
radeon and nouveau. This allows for using common DRM helpers for
the mmap-related callbacks in struct file_operations and struct
drm_driver. The drivers have their own vm_ops, which are now set
automatically by the DRM core functions. The code in each driver's
verify_access becomes part of the driver's new mmap implementation.

With the GEM drivers converted, vmwgfx is the only user of
ttm_bo_mmap() and related infrastructure. So move everything into
vmwgfx and delete the rsp code from TTM.

This touches several drivers. Preferably everything would be merged
at once via drm-misc-next.

Thomas Zimmermann (8):
  drm/ttm: Don't override vm_ops callbacks, if set
  drm/amdgpu: Remove unused function amdgpu_bo_fbdev_mmap()
  drm/amdgpu: Implement mmap as GEM object function
  drm/radeon: Implement mmap as GEM object function
  drm/nouveau: Implement mmap as GEM object function
  drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver
  drm/vmwgfx: Inline vmw_verify_access()
  drm/ttm: Remove ttm_bo_mmap() and friends

 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 46 -------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h |  2 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c     |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c     | 64 +++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c  | 19 ------
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h  |  2 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     | 71 ---------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h     |  1 -
 drivers/gpu/drm/nouveau/nouveau_bo.c        | 10 ---
 drivers/gpu/drm/nouveau/nouveau_drm.c       |  3 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c       | 36 +++++++++++
 drivers/gpu/drm/nouveau/nouveau_ttm.c       | 49 --------------
 drivers/gpu/drm/nouveau/nouveau_ttm.h       |  1 -
 drivers/gpu/drm/radeon/radeon_drv.c         |  3 +-
 drivers/gpu/drm/radeon/radeon_gem.c         | 52 +++++++++++++++
 drivers/gpu/drm/radeon/radeon_ttm.c         | 65 -------------------
 drivers/gpu/drm/radeon/radeon_ttm.h         |  1 -
 drivers/gpu/drm/ttm/ttm_bo_vm.c             | 60 ++---------------
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c  |  9 ---
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c    | 51 ++++++++++++++-
 include/drm/ttm/ttm_bo_api.h                | 13 ----
 include/drm/ttm/ttm_device.h                | 15 -----
 22 files changed, 212 insertions(+), 365 deletions(-)

--
2.30.2

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

end of thread, other threads:[~2021-04-14  8:37 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  9:08 [Nouveau] [PATCH 0/8] drm: Clean up mmap for TTM-based GEM drivers Thomas Zimmermann
2021-04-06  9:08 ` Thomas Zimmermann
2021-04-06  9:08 ` Thomas Zimmermann
2021-04-06  9:08 ` [Nouveau] [PATCH 1/8] drm/ttm: Don't override vm_ops callbacks, if set Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:08 ` [Nouveau] [PATCH 2/8] drm/amdgpu: Remove unused function amdgpu_bo_fbdev_mmap() Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:43   ` [Nouveau] " Christian König
2021-04-06  9:43     ` Christian König
2021-04-06  9:43     ` Christian König
2021-04-06 10:21     ` [Nouveau] " Thomas Zimmermann
2021-04-06 10:21       ` Thomas Zimmermann
2021-04-06 10:21       ` Thomas Zimmermann
2021-04-06  9:08 ` [Nouveau] [PATCH 3/8] drm/amdgpu: Implement mmap as GEM object function Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:35   ` [Nouveau] " Christian König
2021-04-06  9:35     ` Christian König
2021-04-06  9:35     ` Christian König
2021-04-06 10:38     ` [Nouveau] " Thomas Zimmermann
2021-04-06 10:38       ` Thomas Zimmermann
2021-04-06 10:38       ` Thomas Zimmermann
2021-04-06 10:56       ` [Nouveau] " Christian König
2021-04-06 10:56         ` Christian König
2021-04-06 10:56         ` Christian König
2021-04-06 11:55         ` [Nouveau] " Thomas Zimmermann
2021-04-06 11:55           ` Thomas Zimmermann
2021-04-06 11:55           ` Thomas Zimmermann
2021-04-06 12:42           ` [Nouveau] " Christian König
2021-04-06 12:42             ` Christian König
2021-04-06 12:42             ` Christian König
2021-04-06 12:52             ` [Nouveau] " Thomas Zimmermann
2021-04-06 12:52               ` Thomas Zimmermann
2021-04-06 12:52               ` Thomas Zimmermann
2021-04-06 13:04               ` [Nouveau] " Christian König
2021-04-06 13:04                 ` Christian König
2021-04-06 13:04                 ` Christian König
2021-04-06 15:22                 ` [Nouveau] " Felix Kuehling
2021-04-06 15:22                   ` Felix Kuehling
2021-04-06 15:22                   ` Felix Kuehling
2021-04-06 15:27       ` [Nouveau] " Felix Kuehling
2021-04-06 15:27         ` Felix Kuehling
2021-04-06 15:27         ` Felix Kuehling
2021-04-07 11:25         ` [Nouveau] " Christian König
2021-04-07 11:25           ` Christian König
2021-04-07 11:25           ` Christian König
2021-04-07 19:34           ` [Nouveau] " Felix Kuehling
2021-04-07 19:34             ` Felix Kuehling
2021-04-07 19:34             ` Felix Kuehling
2021-04-07 19:49             ` [Nouveau] " Felix Kuehling
2021-04-07 19:49               ` Felix Kuehling
2021-04-07 19:49               ` Felix Kuehling
2021-04-08  4:45               ` [Nouveau] " Thomas Zimmermann
2021-04-08  4:45                 ` Thomas Zimmermann
2021-04-08  4:45                 ` Thomas Zimmermann
2021-04-14  7:44               ` [Nouveau] " Thomas Zimmermann
2021-04-14  7:44                 ` Thomas Zimmermann
2021-04-14  7:44                 ` Thomas Zimmermann
2021-04-14  8:37                 ` [Nouveau] " Felix Kuehling
2021-04-14  8:37                   ` Felix Kuehling
2021-04-14  8:37                   ` Felix Kuehling
2021-04-06  9:08 ` [Nouveau] [PATCH 4/8] drm/radeon: " Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:08   ` Thomas Zimmermann
2021-04-06  9:38   ` [Nouveau] " Christian König
2021-04-06  9:38     ` Christian König
2021-04-06  9:38     ` Christian König
2021-04-06 14:18   ` [Nouveau] " Alex Deucher
2021-04-06 14:18     ` Alex Deucher
2021-04-06 14:18     ` Alex Deucher
2021-04-06  9:09 ` [Nouveau] [PATCH 5/8] drm/nouveau: " Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-06  9:09 ` [Nouveau] [PATCH 6/8] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-07 16:52   ` [Nouveau] " Zack Rusin
2021-04-07 16:52     ` Zack Rusin
2021-04-07 16:52     ` Zack Rusin
2021-04-06  9:09 ` [Nouveau] [PATCH 7/8] drm/vmwgfx: Inline vmw_verify_access() Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-07 16:52   ` [Nouveau] " Zack Rusin
2021-04-07 16:52     ` Zack Rusin
2021-04-07 16:52     ` Zack Rusin
2021-04-06  9:09 ` [Nouveau] [PATCH 8/8] drm/ttm: Remove ttm_bo_mmap() and friends Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-06  9:09   ` Thomas Zimmermann
2021-04-06  9:40   ` [Nouveau] " Christian König
2021-04-06  9:40     ` Christian König
2021-04-06  9:40     ` Christian König
2021-04-08 11:19 ` [Nouveau] [PATCH 0/8] drm: Clean up mmap for TTM-based GEM drivers Daniel Vetter
2021-04-08 11:19   ` Daniel Vetter
2021-04-08 11:19   ` Daniel Vetter
2021-04-08 11:38   ` [Nouveau] " Thomas Zimmermann
2021-04-08 11:38     ` Thomas Zimmermann
2021-04-08 11:38     ` Thomas Zimmermann
2021-04-08 11:42     ` [Nouveau] " Daniel Vetter
2021-04-08 11:42       ` Daniel Vetter
2021-04-08 11:42       ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.