All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: [PATCH 00/15] Retire dma_buf_k(un)map
Date: Mon, 18 Nov 2019 11:35:21 +0100	[thread overview]
Message-ID: <20191118103536.17675-1-daniel.vetter@ffwll.ch> (raw)

Hi all,

Way back when we created the dma-buf spec it made sense to have kmap/unmap
interfaces, since 32bit kernels with limited vmalloc space were still
rather ubiquitous. But that idea (like many others) never caught on, was
quickly replaced by vmaps covering the entire buffer for all real uses,
and nowadays 64bit kernels rule the world. Currently merged upstream
drivers (and we have a pile now) don't even bother to kmap for their
private buffers, much less for anything shared.

So since it was never used, and this idea's time is clearly over, let's
remove it all.

Only real change I had to do (aside from deleting lots of dead code) was
in the tegra driver. But even there I suspect the dma-buf kmap path has
never been run in anger anywhere, it just doesn't make sense to put relocs
into a dma-buf (as opposed to using a dma-buf for the target address of a
reloc).

Comments, reviews and testing very much appreciated.

Cheers, Daniel

Daniel Vetter (15):
  drm/tegra: Map cmdbuf once for reloc processing
  drm/tegra: Delete host1x_bo_ops->k(un)map
  drm/i915: Remove dma_buf_kmap selftest
  staging/android/ion: delete dma_buf->kmap/unmap implemenation
  drm/armada: Delete dma_buf->k(un)map implemenation
  drm/i915: Drop dma_buf->k(un)map
  drm/omapdrm: Drop dma_buf->k(un)map
  drm/tegra: Remove dma_buf->k(un)map
  dma-buf: Drop dma_buf_k(un)map
  drm/vmwgfx: Delete mmaping functions
  media/videobuf2: Drop dma_buf->k(un)map support
  drm/tee_shm: Drop dma_buf_k(unmap) support
  xen/gntdev-dmabuf: Ditch dummy map functions
  sample/vfio-mdev/mbocs: Remove dma_buf_k(un)map support
  dma-buf: Remove kernel map/unmap hooks

 drivers/dma-buf/dma-buf.c                     |  63 +----------
 drivers/gpu/drm/armada/armada_gem.c           |  12 ---
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c    |  36 -------
 .../drm/i915/gem/selftests/i915_gem_dmabuf.c  | 101 ------------------
 .../gpu/drm/i915/gem/selftests/mock_dmabuf.c  |  16 ---
 drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c     |  21 ----
 drivers/gpu/drm/tegra/gem.c                   |  40 -------
 drivers/gpu/drm/vmwgfx/vmwgfx_prime.c         |  33 ------
 drivers/gpu/host1x/job.c                      |  21 ++--
 .../common/videobuf2/videobuf2-dma-contig.c   |   8 --
 .../media/common/videobuf2/videobuf2-dma-sg.c |   8 --
 .../common/videobuf2/videobuf2-vmalloc.c      |   8 --
 drivers/misc/fastrpc.c                        |   8 --
 drivers/staging/android/ion/ion.c             |  14 ---
 drivers/tee/tee_shm.c                         |   6 --
 drivers/xen/gntdev-dmabuf.c                   |  23 ----
 include/linux/dma-buf.h                       |  27 -----
 include/linux/host1x.h                        |  13 ---
 samples/vfio-mdev/mbochs.c                    |  16 ---
 19 files changed, 10 insertions(+), 464 deletions(-)

-- 
2.24.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: [Intel-gfx] [PATCH 00/15] Retire dma_buf_k(un)map
Date: Mon, 18 Nov 2019 11:35:21 +0100	[thread overview]
Message-ID: <20191118103536.17675-1-daniel.vetter@ffwll.ch> (raw)
Message-ID: <20191118103521.m9UXkC5tyCOL0FVWTbfBsKQyOXJcyfsy8PlCSIiQ7DY@z> (raw)

Hi all,

Way back when we created the dma-buf spec it made sense to have kmap/unmap
interfaces, since 32bit kernels with limited vmalloc space were still
rather ubiquitous. But that idea (like many others) never caught on, was
quickly replaced by vmaps covering the entire buffer for all real uses,
and nowadays 64bit kernels rule the world. Currently merged upstream
drivers (and we have a pile now) don't even bother to kmap for their
private buffers, much less for anything shared.

So since it was never used, and this idea's time is clearly over, let's
remove it all.

Only real change I had to do (aside from deleting lots of dead code) was
in the tegra driver. But even there I suspect the dma-buf kmap path has
never been run in anger anywhere, it just doesn't make sense to put relocs
into a dma-buf (as opposed to using a dma-buf for the target address of a
reloc).

Comments, reviews and testing very much appreciated.

Cheers, Daniel

Daniel Vetter (15):
  drm/tegra: Map cmdbuf once for reloc processing
  drm/tegra: Delete host1x_bo_ops->k(un)map
  drm/i915: Remove dma_buf_kmap selftest
  staging/android/ion: delete dma_buf->kmap/unmap implemenation
  drm/armada: Delete dma_buf->k(un)map implemenation
  drm/i915: Drop dma_buf->k(un)map
  drm/omapdrm: Drop dma_buf->k(un)map
  drm/tegra: Remove dma_buf->k(un)map
  dma-buf: Drop dma_buf_k(un)map
  drm/vmwgfx: Delete mmaping functions
  media/videobuf2: Drop dma_buf->k(un)map support
  drm/tee_shm: Drop dma_buf_k(unmap) support
  xen/gntdev-dmabuf: Ditch dummy map functions
  sample/vfio-mdev/mbocs: Remove dma_buf_k(un)map support
  dma-buf: Remove kernel map/unmap hooks

 drivers/dma-buf/dma-buf.c                     |  63 +----------
 drivers/gpu/drm/armada/armada_gem.c           |  12 ---
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c    |  36 -------
 .../drm/i915/gem/selftests/i915_gem_dmabuf.c  | 101 ------------------
 .../gpu/drm/i915/gem/selftests/mock_dmabuf.c  |  16 ---
 drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c     |  21 ----
 drivers/gpu/drm/tegra/gem.c                   |  40 -------
 drivers/gpu/drm/vmwgfx/vmwgfx_prime.c         |  33 ------
 drivers/gpu/host1x/job.c                      |  21 ++--
 .../common/videobuf2/videobuf2-dma-contig.c   |   8 --
 .../media/common/videobuf2/videobuf2-dma-sg.c |   8 --
 .../common/videobuf2/videobuf2-vmalloc.c      |   8 --
 drivers/misc/fastrpc.c                        |   8 --
 drivers/staging/android/ion/ion.c             |  14 ---
 drivers/tee/tee_shm.c                         |   6 --
 drivers/xen/gntdev-dmabuf.c                   |  23 ----
 include/linux/dma-buf.h                       |  27 -----
 include/linux/host1x.h                        |  13 ---
 samples/vfio-mdev/mbochs.c                    |  16 ---
 19 files changed, 10 insertions(+), 464 deletions(-)

-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2019-11-18 10:35 UTC|newest]

Thread overview: 142+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 10:35 Daniel Vetter [this message]
2019-11-18 10:35 ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35 ` [PATCH 01/15] drm/tegra: Map cmdbuf once for reloc processing Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-25  9:58   ` Daniel Vetter
2019-11-25  9:58     ` [Intel-gfx] " Daniel Vetter
2019-11-25  9:58     ` Daniel Vetter
2019-11-25 10:47     ` Thierry Reding
2019-11-25 10:47       ` [Intel-gfx] " Thierry Reding
2019-11-25 10:47       ` Thierry Reding
2019-11-25 11:02   ` Thierry Reding
2019-11-25 11:02     ` [Intel-gfx] " Thierry Reding
2019-11-25 11:02     ` Thierry Reding
2019-11-18 10:35 ` [PATCH 02/15] drm/tegra: Delete host1x_bo_ops->k(un)map Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-25 11:04   ` Thierry Reding
2019-11-25 11:04     ` [Intel-gfx] " Thierry Reding
2019-11-25 11:04     ` Thierry Reding
2019-11-18 10:35 ` [PATCH 03/15] drm/i915: Remove dma_buf_kmap selftest Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 12:58   ` Chris Wilson
2019-11-18 12:58     ` [Intel-gfx] " Chris Wilson
2019-11-18 12:58     ` Chris Wilson
2019-11-18 10:35 ` [PATCH 04/15] staging/android/ion: delete dma_buf->kmap/unmap implemenation Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 11:26   ` Greg KH
2019-11-18 11:26     ` [Intel-gfx] " Greg KH
2019-11-18 11:26     ` Greg KH
2019-11-18 11:26     ` Greg KH
2019-11-18 14:55   ` Laura Abbott
2019-11-18 14:55     ` [Intel-gfx] " Laura Abbott
2019-11-18 14:55     ` Laura Abbott
2019-11-18 10:35 ` [PATCH 05/15] drm/armada: Delete dma_buf->k(un)map implemenation Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-25 21:44   ` Daniel Vetter
2019-11-25 21:44     ` [Intel-gfx] " Daniel Vetter
2019-11-26  0:35     ` Russell King - ARM Linux admin
2019-11-26  0:35       ` [Intel-gfx] " Russell King - ARM Linux admin
2019-11-26  8:33       ` Daniel Vetter
2019-11-26  8:33         ` [Intel-gfx] " Daniel Vetter
2019-11-26  8:33         ` Daniel Vetter
2019-11-18 10:35 ` [PATCH 06/15] drm/i915: Drop dma_buf->k(un)map Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 11:38   ` Christian König
2019-11-18 11:38     ` [Intel-gfx] " Christian König
2019-11-18 11:38     ` Christian König
2019-11-18 12:53   ` Chris Wilson
2019-11-18 12:53     ` [Intel-gfx] " Chris Wilson
2019-11-18 12:53     ` Chris Wilson
2019-11-18 10:35 ` [PATCH 07/15] drm/omapdrm: " Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 12:44   ` Tomi Valkeinen
2019-11-18 12:44     ` [Intel-gfx] " Tomi Valkeinen
2019-11-18 12:44     ` Tomi Valkeinen
2019-11-18 10:35 ` [PATCH 08/15] drm/tegra: Remove dma_buf->k(un)map Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-25 11:06   ` Thierry Reding
2019-11-25 11:06     ` [Intel-gfx] " Thierry Reding
2019-11-18 10:35 ` [PATCH 09/15] dma-buf: Drop dma_buf_k(un)map Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:35 ` [PATCH 10/15] drm/vmwgfx: Delete mmaping functions Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 17:25   ` Thomas Hellstrom
2019-11-18 17:25     ` [Intel-gfx] " Thomas Hellstrom
2019-11-18 17:25     ` Thomas Hellstrom
2019-11-18 17:42     ` Daniel Vetter
2019-11-18 17:42       ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35 ` [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:58   ` Marek Szyprowski
2019-11-18 10:58     ` [Intel-gfx] " Marek Szyprowski
2019-11-18 10:58     ` Marek Szyprowski
2019-11-18 10:58     ` Marek Szyprowski
2019-11-18 11:02   ` Hans Verkuil
2019-11-18 11:02     ` [Intel-gfx] " Hans Verkuil
2019-11-18 11:02     ` Hans Verkuil
2019-11-18 10:35 ` [PATCH 12/15] drm/tee_shm: Drop dma_buf_k(unmap) support Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 11:26   ` Greg Kroah-Hartman
2019-11-18 11:26     ` [Intel-gfx] " Greg Kroah-Hartman
2019-11-18 12:02   ` Jens Wiklander
2019-11-18 12:02     ` [Intel-gfx] " Jens Wiklander
2019-11-18 12:02     ` Jens Wiklander
2019-11-18 10:35 ` [PATCH 13/15] xen/gntdev-dmabuf: Ditch dummy map functions Daniel Vetter
2019-11-18 10:35   ` [Xen-devel] " Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:50   ` [Xen-devel] " Oleksandr Andrushchenko
2019-11-18 10:50     ` Oleksandr Andrushchenko
2019-11-18 10:50     ` [Intel-gfx] " Oleksandr Andrushchenko
2019-11-18 10:50     ` Oleksandr Andrushchenko
2019-11-18 10:53   ` Jürgen Groß
2019-11-18 10:53     ` [Xen-devel] " Jürgen Groß
2019-11-18 10:53     ` [Intel-gfx] " Jürgen Groß
2019-11-18 10:53     ` Jürgen Groß
2019-11-18 10:35 ` [PATCH 14/15] sample/vfio-mdev/mbocs: Remove dma_buf_k(un)map support Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 11:41   ` Gerd Hoffmann
2019-11-18 11:41     ` [Intel-gfx] " Gerd Hoffmann
2019-11-18 11:41     ` Gerd Hoffmann
2019-11-18 11:41     ` Gerd Hoffmann
2019-11-18 10:35 ` [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks Daniel Vetter
2019-11-18 10:35   ` [Intel-gfx] " Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 10:35   ` Daniel Vetter
2019-11-18 15:22   ` kbuild test robot
2019-11-18 15:22     ` [Intel-gfx] " kbuild test robot
2019-11-18 15:22     ` kbuild test robot
2019-11-18 15:22     ` kbuild test robot
2019-11-18 16:43     ` Daniel Vetter
2019-11-18 16:43       ` [Intel-gfx] " Daniel Vetter
2019-11-18 16:43       ` Daniel Vetter
2019-11-25  0:46       ` [kbuild-all] " Rong Chen
2019-11-25  0:46         ` [Intel-gfx] " Rong Chen
2019-11-25  0:46         ` Rong Chen
2019-11-26 10:54   ` Daniel Vetter
2019-11-26 10:54     ` [Intel-gfx] " Daniel Vetter
2019-11-26 10:54     ` Daniel Vetter
2019-11-18 12:36 ` ✗ Fi.CI.CHECKPATCH: warning for Retire dma_buf_k(un)map Patchwork
2019-11-18 12:36   ` [Intel-gfx] " Patchwork
2019-11-18 13:01 ` ✓ Fi.CI.BAT: success " Patchwork
2019-11-18 13:01   ` [Intel-gfx] " Patchwork
2019-11-18 15:58 ` [PATCH 00/15] " Sumit Semwal
2019-11-18 15:58   ` [Intel-gfx] " Sumit Semwal
2019-11-18 15:58   ` Sumit Semwal
2019-11-18 18:45 ` ✓ Fi.CI.IGT: success for " Patchwork
2019-11-18 18:45   ` [Intel-gfx] " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191118103536.17675-1-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --subject='Re: [PATCH 00/15] Retire dma_buf_k(un)map' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.