All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: John Stultz <john.stultz@linaro.org>
Cc: Ezequiel Garcia <ezequiel@collabora.com>,
	Liam Mark <lmark@codeaurora.org>, "Andrew F . Davis" <afd@ti.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Laura Abbott <labbott@kernel.org>,
	kernel@collabora.com, linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] dma-buf: heap-helpers: Set dma-buf exporter name
Date: Sat, 15 Aug 2020 00:04:28 -0300	[thread overview]
Message-ID: <CAAEAJfCEkhD8jcsmE4R+G7nv+8+N0+u1cUxW_ivUZVSxm_eHAg@mail.gmail.com> (raw)
In-Reply-To: <CALAqxLWytSnPugPH2Ux5=C_bzC0DLGKQyB+Szcp4LOVfhKPFqg@mail.gmail.com>

On Fri, 14 Aug 2020 at 23:20, John Stultz <john.stultz@linaro.org> wrote:
>
> On Fri, Aug 14, 2020 at 7:25 AM Ezequiel Garcia <ezequiel@collabora.com> wrote:
> >
> > Currently the heap helper uses DEFINE_DMA_BUF_EXPORT_INFO,
> > which uses KBUILD_MODNAME for the dma_buf_export_info.exp_name.
> >
> > This effectively makes all dma-bufs exported by the heap
> > helper as coming from "heap-helpers", instead of the actual heap name
> > (cma, system, etc).
> >
> > Fix this by adding a dma-heap name getter, and then setting
> > dma_buf_export_info.exp_name.
> >
> > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
>
> Untested, but looks sane to me.
>
> Acked-by: John Stultz <john.stultz@linaro.org>
>

Cool.

> On a slightly related note, I'm starting to regret the current
> heap-helpers approach (Andrew probably gets an "I told you so" there
> :). While it avoids a lot of duplication, it's really an all or
> nothing approach, and doesn't really compare well to other drm style
> helper functions.  I may eventually try to break the system and cma
> implementations out of the helper code and try to consider a different
> approach to avoid the duplication.
>

Fully agreed :-) It definitely looks too rigid right now.

Cheers,
Ezequiel

WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: John Stultz <john.stultz@linaro.org>
Cc: Liam Mark <lmark@codeaurora.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Andrew F . Davis" <afd@ti.com>,
	Laura Abbott <labbott@kernel.org>,
	kernel@collabora.com, Ezequiel Garcia <ezequiel@collabora.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] dma-buf: heap-helpers: Set dma-buf exporter name
Date: Sat, 15 Aug 2020 00:04:28 -0300	[thread overview]
Message-ID: <CAAEAJfCEkhD8jcsmE4R+G7nv+8+N0+u1cUxW_ivUZVSxm_eHAg@mail.gmail.com> (raw)
In-Reply-To: <CALAqxLWytSnPugPH2Ux5=C_bzC0DLGKQyB+Szcp4LOVfhKPFqg@mail.gmail.com>

On Fri, 14 Aug 2020 at 23:20, John Stultz <john.stultz@linaro.org> wrote:
>
> On Fri, Aug 14, 2020 at 7:25 AM Ezequiel Garcia <ezequiel@collabora.com> wrote:
> >
> > Currently the heap helper uses DEFINE_DMA_BUF_EXPORT_INFO,
> > which uses KBUILD_MODNAME for the dma_buf_export_info.exp_name.
> >
> > This effectively makes all dma-bufs exported by the heap
> > helper as coming from "heap-helpers", instead of the actual heap name
> > (cma, system, etc).
> >
> > Fix this by adding a dma-heap name getter, and then setting
> > dma_buf_export_info.exp_name.
> >
> > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
>
> Untested, but looks sane to me.
>
> Acked-by: John Stultz <john.stultz@linaro.org>
>

Cool.

> On a slightly related note, I'm starting to regret the current
> heap-helpers approach (Andrew probably gets an "I told you so" there
> :). While it avoids a lot of duplication, it's really an all or
> nothing approach, and doesn't really compare well to other drm style
> helper functions.  I may eventually try to break the system and cma
> implementations out of the helper code and try to consider a different
> approach to avoid the duplication.
>

Fully agreed :-) It definitely looks too rigid right now.

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

  reply	other threads:[~2020-08-15 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 14:25 [PATCH] dma-buf: heap-helpers: Set dma-buf exporter name Ezequiel Garcia
2020-08-14 14:25 ` Ezequiel Garcia
2020-08-15  2:19 ` John Stultz
2020-08-15  2:19   ` John Stultz
2020-08-15  3:04   ` Ezequiel Garcia [this message]
2020-08-15  3:04     ` Ezequiel Garcia

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=CAAEAJfCEkhD8jcsmE4R+G7nv+8+N0+u1cUxW_ivUZVSxm_eHAg@mail.gmail.com \
    --to=ezequiel@vanguardiasur.com.ar \
    --cc=afd@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@collabora.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel@collabora.com \
    --cc=labbott@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lmark@codeaurora.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.