From: "Das, Nirmoy" <nirmoy.das@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/dmabuf: Update dma_buf_ops.unmap_dma_buf callback to use drm_gem_unmap_dma_buf()
Date: Mon, 28 Feb 2022 16:23:05 +0100 [thread overview]
Message-ID: <773ee2fc-8035-64c7-e30d-d1adec692763@linux.intel.com> (raw)
In-Reply-To: <20220225131316.1433515-2-gwan-gyeong.mun@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
On 25/02/2022 14:13, Gwan-gyeong Mun wrote:
> The dma_buf_ops.unmap_dma_buf callback used in i915,
> i915_gem_unmap_dma_buf(), has the same code as drm_gem_unmap_dma_buf().
> In order to eliminate defining and using duplicate function, it updates
> the dma_buf_ops.unmap_dma_buf callback to use drm_gem_unmap_dma_buf().
>
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> index 13917231ae81..af899ae1f3c7 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> @@ -66,15 +66,6 @@ static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attachme
> return ERR_PTR(ret);
> }
>
> -static void i915_gem_unmap_dma_buf(struct dma_buf_attachment *attachment,
> - struct sg_table *sg,
> - enum dma_data_direction dir)
> -{
> - dma_unmap_sgtable(attachment->dev, sg, dir, DMA_ATTR_SKIP_CPU_SYNC);
> - sg_free_table(sg);
> - kfree(sg);
> -}
> -
> static int i915_gem_dmabuf_vmap(struct dma_buf *dma_buf,
> struct iosys_map *map)
> {
> @@ -209,7 +200,7 @@ static const struct dma_buf_ops i915_dmabuf_ops = {
> .attach = i915_gem_dmabuf_attach,
> .detach = i915_gem_dmabuf_detach,
> .map_dma_buf = i915_gem_map_dma_buf,
> - .unmap_dma_buf = i915_gem_unmap_dma_buf,
> + .unmap_dma_buf = drm_gem_unmap_dma_buf,
> .release = drm_gem_dmabuf_release,
> .mmap = i915_gem_dmabuf_mmap,
> .vmap = i915_gem_dmabuf_vmap,
next prev parent reply other threads:[~2022-02-28 15:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=773ee2fc-8035-64c7-e30d-d1adec692763@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.