[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAFQd5AsFOau=m_3UPh2tKqwiUJaY4NH9HHrHJ17gbCLDgTNCQ@mail.gmail.com>
Date: Fri, 2 Oct 2020 20:22:49 +0200
From: Tomasz Figa <tfiga@...omium.org>
To: Daniel Vetter <daniel.vetter@...ll.ch>
Cc: DRI Development <dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>,
Daniel Vetter <daniel.vetter@...el.com>,
Inki Dae <inki.dae@...sung.com>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Seung-Woo Kim <sw0312.kim@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Pawel Osciak <pawel@...iak.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Oded Gabbay <oded.gabbay@...il.com>,
Omer Shpigelman <oshpigelman@...ana.ai>,
Tomer Tayar <ttayar@...ana.ai>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Pawel Piskorski <ppiskorski@...ana.ai>,
"list@....net:IOMMU DRIVERS <iommu@...ts.linux-foundation.org>, Joerg
Roedel <joro@...tes.org>," <linux-arm-kernel@...ts.infradead.org>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
linux-mm@...ck.org
Subject: Re: [PATCH 1/2] mm/frame-vec: Drop gup_flags from get_vaddr_frames()
On Fri, Oct 2, 2020 at 7:53 PM Daniel Vetter <daniel.vetter@...ll.ch> wrote:
>
> FOLL_WRITE | FOLL_FORCE is really the only reasonable thing to do for
> simple dma device that can't guarantee write protection. Which is also
> what all the callers are using.
>
> So just simplify this.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>
> Cc: Inki Dae <inki.dae@...sung.com>
> Cc: Joonyoung Shim <jy0922.shim@...sung.com>
> Cc: Seung-Woo Kim <sw0312.kim@...sung.com>
> Cc: Kyungmin Park <kyungmin.park@...sung.com>
> Cc: Kukjin Kim <kgene@...nel.org>
> Cc: Krzysztof Kozlowski <krzk@...nel.org>
> Cc: Pawel Osciak <pawel@...iak.com>
> Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> Cc: Tomasz Figa <tfiga@...omium.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Oded Gabbay <oded.gabbay@...il.com>
> Cc: Omer Shpigelman <oshpigelman@...ana.ai>
> Cc: Tomer Tayar <ttayar@...ana.ai>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Pawel Piskorski <ppiskorski@...ana.ai>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-samsung-soc@...r.kernel.org
> Cc: linux-media@...r.kernel.org
> Cc: linux-mm@...ck.org
> ---
> drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 +--
> drivers/media/common/videobuf2/videobuf2-memops.c | 3 +--
> drivers/misc/habanalabs/common/memory.c | 3 +--
> include/linux/mm.h | 2 +-
> mm/frame_vector.c | 4 ++--
> 5 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> index 967a5cdc120e..ac452842bab3 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> @@ -480,8 +480,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
> goto err_free;
> }
>
> - ret = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE,
> - g2d_userptr->vec);
> + ret = get_vaddr_frames(start, npages, g2d_userptr->vec);
> if (ret != npages) {
> DRM_DEV_ERROR(g2d->dev,
> "failed to get user pages from userptr.\n");
> diff --git a/drivers/media/common/videobuf2/videobuf2-memops.c b/drivers/media/common/videobuf2/videobuf2-memops.c
> index 6e9e05153f4e..9dd6c27162f4 100644
> --- a/drivers/media/common/videobuf2/videobuf2-memops.c
> +++ b/drivers/media/common/videobuf2/videobuf2-memops.c
> @@ -40,7 +40,6 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
> unsigned long first, last;
> unsigned long nr;
> struct frame_vector *vec;
> - unsigned int flags = FOLL_FORCE | FOLL_WRITE;
>
> first = start >> PAGE_SHIFT;
> last = (start + length - 1) >> PAGE_SHIFT;
> @@ -48,7 +47,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
> vec = frame_vector_create(nr);
> if (!vec)
> return ERR_PTR(-ENOMEM);
> - ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec);
> + ret = get_vaddr_frames(start & PAGE_MASK, nr, vec);
> if (ret < 0)
> goto out_destroy;
> /* We accept only complete set of PFNs */
For drivers/media/common/videobuf2/:
Acked-by: Tomasz Figa <tfiga@...omium.org>
Best regards,
Tomasz
Powered by blists - more mailing lists