All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9 v4] Helper to abstract vma handling in media layer
@ 2015-05-06  7:28 ` Jan Kara
  0 siblings, 0 replies; 77+ messages in thread
From: Jan Kara @ 2015-05-06  7:28 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-media, Hans Verkuil, dri-devel, Pawel Osciak,
	Mauro Carvalho Chehab, mgorman, Marek Szyprowski,
	linux-samsung-soc, Jan Kara

  Hello,

  Sorry for a quick resend but the missing vmalloc include in mm/gup.c is
annoying for archs that need it and I was also told to extend CC list a bit.

I'm sending the fourth version of my patch series to abstract vma handling
from the various media drivers. After this patch set drivers have to know much
less details about vmas, their types, and locking. Also quite some code is
removed from them. As a bonus drivers get automatically VM_FAULT_RETRY
handling. The primary motivation for this series is to remove knowledge about
mmap_sem locking from as many places a possible so that we can change it with
reasonable effort.

The core of the series is the new helper get_vaddr_frames() which is given a
virtual address and it fills in PFNs / struct page pointers (depending on VMA
type) into the provided array. If PFNs correspond to normal pages it also grabs
references to these pages. The difference from get_user_pages() is that this
function can also deal with pfnmap, and io mappings which is what the media
drivers need.

I have tested the patches with vivid driver so at least vb2 code got some
exposure. Conversion of other drivers was just compile-tested (for x86 so e.g.
exynos driver which is only for Samsung platform is completely untested) so I'd
like to ask respective maintainers if they could have a look.  Also I'd like to
ask mm folks to check patch 2/9 implementing the helper. Thanks!

								Honza
Changes since v3:
* Added include <linux/vmalloc.h> into mm/gup.c as it's needed for some archs
* Fixed error path for exynos driver

Changes since v2:
* Renamed functions and structures as Mel suggested
* Other minor changes suggested by Mel
* Rebased on top of 4.1-rc2
* Changed functions to get pointer to array of pages / pfns to perform
  conversion if necessary. This fixes possible issue in the omap I may have
  introduced in v2 and generally makes the API less errorprone.

^ permalink raw reply	[flat|nested] 77+ messages in thread
* [PATCH 0/9 v7] Helper to abstract vma handling in media layer
@ 2015-07-13 14:55 Jan Kara
  2015-07-13 14:55   ` Jan Kara
  0 siblings, 1 reply; 77+ messages in thread
From: Jan Kara @ 2015-07-13 14:55 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Mauro Carvalho Chehab, linux-samsung-soc, linux-mm,
	Andrew Morton, Jan Kara

From: Jan Kara <jack@suse.cz>

  Hello,

I'm sending the seventh version of my patch series to abstract vma handling
from the various media drivers. Since the previous version there are just
minor cleanups and fixes (see detailed changelog at the end of the email).

After this patch set drivers have to know much less details about vmas, their
types, and locking. Also quite some code is removed from them. As a bonus
drivers get automatically VM_FAULT_RETRY handling. The primary motivation for
this series is to remove knowledge about mmap_sem locking from as many places a
possible so that we can change it with reasonable effort.

The core of the series is the new helper get_vaddr_frames() which is given a
virtual address and it fills in PFNs / struct page pointers (depending on VMA
type) into the provided array. If PFNs correspond to normal pages it also grabs
references to these pages. The difference from get_user_pages() is that this
function can also deal with pfnmap, and io mappings which is what the media
drivers need.

I have tested the patches with vivid driver so at least vb2 code got some
exposure. Conversion of other drivers was just compile-tested (for x86 so e.g.
exynos driver which is only for Samsung platform is completely untested).

Hans, can you please pull the changes? Thanks!

								Honza

Changes since v6:
* Fixed compilation error introduced into exynos driver
* Folded patch allowing get_vaddr_pfn() code to be selected by a config option
  into previous patches
* Rebased on top of linux-media tree

Changes since v5:
* Moved mm helper into a separate file and behind a config option
* Changed the first patch pushing mmap_sem down in videobuf2 core to avoid
  possible deadlock

Changes since v4:
* Minor cleanups and fixes pointed out by Mel and Vlasta
* Added Acked-by tags

Changes since v3:
* Added include <linux/vmalloc.h> into mm/gup.c as it's needed for some archs
* Fixed error path for exynos driver

Changes since v2:
* Renamed functions and structures as Mel suggested
* Other minor changes suggested by Mel
* Rebased on top of 4.1-rc2
* Changed functions to get pointer to array of pages / pfns to perform
  conversion if necessary. This fixes possible issue in the omap I may have
  introduced in v2 and generally makes the API less errorprone.

^ permalink raw reply	[flat|nested] 77+ messages in thread
* [PATCH 0/9 v5] Helper to abstract vma handling in media layer
@ 2015-05-13 13:08 Jan Kara
  2015-05-13 13:08   ` Jan Kara
  0 siblings, 1 reply; 77+ messages in thread
From: Jan Kara @ 2015-05-13 13:08 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-media, Hans Verkuil, dri-devel, Pawel Osciak,
	Mauro Carvalho Chehab, mgorman, Marek Szyprowski,
	linux-samsung-soc, Jan Kara

  Hello,

I'm sending the fifth version of my patch series to abstract vma handling
from the various media drivers. The patches got some review from mm people and
testing from device driver guys so unless someone objects, patches will be
queued in media tree for the next merge window.

After this patch set drivers have to know much less details about vmas, their
types, and locking. Also quite some code is removed from them. As a bonus
drivers get automatically VM_FAULT_RETRY handling. The primary motivation for
this series is to remove knowledge about mmap_sem locking from as many places a
possible so that we can change it with reasonable effort.

The core of the series is the new helper get_vaddr_frames() which is given a
virtual address and it fills in PFNs / struct page pointers (depending on VMA
type) into the provided array. If PFNs correspond to normal pages it also grabs
references to these pages. The difference from get_user_pages() is that this
function can also deal with pfnmap, and io mappings which is what the media
drivers need.

I have tested the patches with vivid driver so at least vb2 code got some
exposure. Conversion of other drivers was just compile-tested (for x86 so e.g.
exynos driver which is only for Samsung platform is completely untested).

								Honza
Changes since v4:
* Minor cleanups and fixes pointed out by Mel and Vlasta
* Added Acked-by tags

Changes since v3:
* Added include <linux/vmalloc.h> into mm/gup.c as it's needed for some archs
* Fixed error path for exynos driver

Changes since v2:
* Renamed functions and structures as Mel suggested
* Other minor changes suggested by Mel
* Rebased on top of 4.1-rc2
* Changed functions to get pointer to array of pages / pfns to perform
  conversion if necessary. This fixes possible issue in the omap I may have
  introduced in v2 and generally makes the API less errorprone.

^ permalink raw reply	[flat|nested] 77+ messages in thread
* [PATCH 0/9 v3] Helper to abstract vma handling in media layer
@ 2015-05-05 16:01 Jan Kara
  2015-05-05 16:01   ` Jan Kara
  0 siblings, 1 reply; 77+ messages in thread
From: Jan Kara @ 2015-05-05 16:01 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-media, Hans Verkuil, dri-devel, Pawel Osciak,
	Mauro Carvalho Chehab, mgorman, Marek Szyprowski, Jan Kara

  Hello,

  I'm sending the third version of my patch series to abstract vma handling
from the various media drivers. After this patch set drivers have to know much
less details about vmas, their types, and locking. Also quite some code is
removed from them. As a bonus drivers get automatically VM_FAULT_RETRY
handling. The primary motivation for this series is to remove knowledge about
mmap_sem locking from as many places a possible so that we can change it with
reasonable effort.

The core of the series is the new helper get_vaddr_frames() which is given a
virtual address and it fills in PFNs / struct page pointers (depending on VMA
type) into the provided array. If PFNs correspond to normal pages it also grabs
references to these pages. The difference from get_user_pages() is that this
function can also deal with pfnmap, and io mappings which is what the media
drivers need.

I have tested the patches with vivid driver so at least vb2 code got some
exposure. Conversion of other drivers was just compile-tested so I'd like to
ask respective maintainers if they could have a look.  Also I'd like to ask mm
folks to check patch 2/9 implementing the helper. Thanks!

								Honza

Changes since v2:
* Renamed functions and structures as Mel suggested
* Other minor changes suggested by Mel
* Rebased on top of 4.1-rc2
* Changed functions to get pointer to array of pages / pfns to perform
  conversion if necessary. This fixes possible issue in the omap I may have
  introduced in v2 and generally makes the API less errorprone.

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

end of thread, other threads:[~2015-07-21 20:26 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06  7:28 [PATCH 0/9 v4] Helper to abstract vma handling in media layer Jan Kara
2015-05-06  7:28 ` Jan Kara
2015-05-06  7:28 ` Jan Kara
2015-05-06  7:28 ` [PATCH 1/9] [media] vb2: Push mmap_sem down to memops Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28 ` [PATCH 2/9] mm: Provide new get_vaddr_frames() helper Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06 10:45   ` Vlastimil Babka
2015-05-06 10:45     ` Vlastimil Babka
2015-05-06 14:58     ` Jan Kara
2015-05-06 14:58       ` Jan Kara
2015-05-06 14:58       ` Jan Kara
2015-05-08 14:49   ` Mel Gorman
2015-05-08 14:49     ` Mel Gorman
2015-05-11 14:00     ` Jan Kara
2015-05-11 14:00       ` Jan Kara
2015-05-11 14:00       ` Jan Kara
2015-05-11 14:47       ` Mel Gorman
2015-05-11 14:47         ` Mel Gorman
2015-05-06  7:28 ` [PATCH 3/9] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns() Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06 10:46   ` Vlastimil Babka
2015-05-06 10:46     ` Vlastimil Babka
2015-05-06 15:01     ` Jan Kara
2015-05-06 15:01       ` Jan Kara
2015-05-06  7:28 ` [PATCH 4/9] vb2: Provide helpers for mapping virtual addresses Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28 ` [PATCH 5/9] media: vb2: Convert vb2_dma_sg_get_userptr() to use frame vector Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28 ` [PATCH 6/9] media: vb2: Convert vb2_vmalloc_get_userptr() " Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28 ` [PATCH 7/9] media: vb2: Convert vb2_dc_get_userptr() " Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28 ` [PATCH 8/9] media: vb2: Remove unused functions Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28 ` [PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames() Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06  7:28   ` Jan Kara
2015-05-06 10:47   ` Vlastimil Babka
2015-05-06 10:47     ` Vlastimil Babka
2015-05-06 15:02     ` Jan Kara
2015-05-06 15:02       ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2015-07-13 14:55 [PATCH 0/9 v7] Helper to abstract vma handling in media layer Jan Kara
2015-07-13 14:55 ` [PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames() Jan Kara
2015-07-13 14:55   ` Jan Kara
2015-07-17 10:20   ` Hans Verkuil
2015-07-17 10:20     ` Hans Verkuil
2015-07-17 10:29     ` Inki Dae
2015-07-17 10:29       ` Inki Dae
2015-07-17 10:31       ` Hans Verkuil
2015-07-17 10:31         ` Hans Verkuil
2015-07-18  3:14         ` Inki Dae
2015-07-18  3:14           ` Inki Dae
2015-07-20  8:03           ` Jan Kara
2015-07-20  8:03             ` Jan Kara
2015-05-13 13:08 [PATCH 0/9 v5] Helper to abstract vma handling in media layer Jan Kara
2015-05-13 13:08 ` [PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames() Jan Kara
2015-05-13 13:08   ` Jan Kara
2015-05-13 13:08   ` Jan Kara
2015-05-14 10:51   ` Inki Dae
2015-05-14 10:51     ` Inki Dae
2015-05-14 10:51     ` Inki Dae
2015-05-14 11:39     ` Jan Kara
2015-05-14 11:39       ` Jan Kara
2015-05-14 11:39       ` Jan Kara
2015-06-10  9:07   ` Hans Verkuil
2015-06-10  9:07     ` Hans Verkuil
2015-06-10  9:07     ` Hans Verkuil
2015-05-05 16:01 [PATCH 0/9 v3] Helper to abstract vma handling in media layer Jan Kara
2015-05-05 16:01 ` [PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames() Jan Kara
2015-05-05 16:01   ` Jan Kara
2015-05-05 16:01   ` Jan Kara

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.