From: Tiago Vignatti <tiago.vignatti@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
LKML <linux-kernel@vger.kernel.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>,
laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH] staging/android: Update ION TODO per LPC discussion
Date: Fri, 21 Aug 2015 18:10:44 -0300 [thread overview]
Message-ID: <55D793D4.4050500@intel.com> (raw)
In-Reply-To: <1440190977-10050-1-git-send-email-daniel.vetter@ffwll.ch>
sgtm. Thanks for keeping me in the loop.
Tiago
On 08/21/2015 06:02 PM, Daniel Vetter wrote:
> We discussed a bit with the folks on the Cc: list below what to do
> with ION. Two big take-aways:
>
> - High-performance drivers (like gpus) always want to play tricks with
> coherency and will lie to the dma api (radeon, nouveau, i915 gpu
> drivers all do so in upstream). What needs to be done here is fill
> gaps in dma-buf so that we can do this without breaking the dma-api
> expections of other clients like v4l. The consesus is that hw won't
> stop needing these tricks anytime soon.
>
> - Placement constraints for shared buffers won't be solved any other
> way than through something platform-specific like ion with
> platform-specific knowledge in userspace in something like gralloc.
> For general-purpose devices where this assumption would be painful
> for userspace (like servers) the consensus is that such devices will
> have proper MMUs where placement constraint handling is fairly
> irrelevant.
>
> Hence it is reasonable to destage ion as-is without changing the
> overall design to enable these use-cases and just fixing up a these
> few fairly minor things. Since there won't relly be an open-source
> userspace for ion (and hence drm maintainers won't take it) the
> proposal is to eventually move it to drivers/android/ion.[hc]. Laura
> would be ok with being maintainer once this is all done and ion is
> destaged.
>
> Note that Thiago is working on exposing the cpu cache flushing for
> cpu access from userspace through mmaps so this is alread in progress.
> Also adding him to the Cc: list.
>
> v2: Add ION_IOC_IMPORT to the list of ioctl that probably should go.
>
> Cc: Laura Abbott <labbott@redhat.com>
> Cc: sumit.semwal@linaro.org
> Cc: laurent.pinchart@ideasonboard.com
> Cc: ghackmann@google.com
> Cc: robdclark@gmail.com
> Cc: david.brown@arm.com
> Cc: romlem@google.com
> Cc: Tiago Vignatti <tiago.vignatti@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/staging/android/TODO | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO
> index 06954cdf3dba..bc84a72af32d 100644
> --- a/drivers/staging/android/TODO
> +++ b/drivers/staging/android/TODO
> @@ -13,5 +13,25 @@ TODO:
> - This bug is introduced by Xiong Zhou in the patch bd471258f2e09
> - ("staging: android: logger: use kuid_t instead of uid_t")
>
> +
> +ion/
> + - Remove ION_IOC_SYNC: Flushing for devices should be purely a kernel internal
> + interface on top of dma-buf. flush_for_device needs to be added to dma-buf
> + first.
> + - Remove ION_IOC_CUSTOM: Atm used for cache flushing for cpu access in some
> + vendor trees. Should be replaced with an ioctl on the dma-buf to expose the
> + begin/end_cpu_access hooks to userspace.
> + - Clarify the tricks ion plays with explicitly managing coherency behind the
> + dma api's back (this is absolutely needed for high-perf gpu drivers): Add an
> + explicit coherency management mode to flush_for_device to be used by drivers
> + which want to manage caches themselves and which indicates whether cpu caches
> + need flushing.
> + - With those removed there's probably no use for ION_IOC_IMPORT anymore either
> + since ion would just be the central allocator for shared buffers.
> + - Add dt-binding to expose cma regions as ion heaps, with the rule that any
> + such cma regions must already be used by some device for dma. I.e. ion only
> + exposes existing cma regions and doesn't reserve unecessarily memory when
> + booting a system which doesn't use ion.
> +
> Please send patches to Greg Kroah-Hartman <greg@kroah.com> and Cc:
> Brian Swetland <swetland@google.com>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Tiago Vignatti <tiago.vignatti@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
LKML <linux-kernel@vger.kernel.org>
Cc: DRI Development <dri-devel@lists.freedesktop.org>,
Greg KH <gregkh@linuxfoundation.org>,
Laura Abbott <labbott@redhat.com>,
sumit.semwal@linaro.org, laurent.pinchart@ideasonboard.com,
ghackmann@google.com, robdclark@gmail.com, david.brown@arm.com,
romlem@google.com, Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] staging/android: Update ION TODO per LPC discussion
Date: Fri, 21 Aug 2015 18:10:44 -0300 [thread overview]
Message-ID: <55D793D4.4050500@intel.com> (raw)
In-Reply-To: <1440190977-10050-1-git-send-email-daniel.vetter@ffwll.ch>
sgtm. Thanks for keeping me in the loop.
Tiago
On 08/21/2015 06:02 PM, Daniel Vetter wrote:
> We discussed a bit with the folks on the Cc: list below what to do
> with ION. Two big take-aways:
>
> - High-performance drivers (like gpus) always want to play tricks with
> coherency and will lie to the dma api (radeon, nouveau, i915 gpu
> drivers all do so in upstream). What needs to be done here is fill
> gaps in dma-buf so that we can do this without breaking the dma-api
> expections of other clients like v4l. The consesus is that hw won't
> stop needing these tricks anytime soon.
>
> - Placement constraints for shared buffers won't be solved any other
> way than through something platform-specific like ion with
> platform-specific knowledge in userspace in something like gralloc.
> For general-purpose devices where this assumption would be painful
> for userspace (like servers) the consensus is that such devices will
> have proper MMUs where placement constraint handling is fairly
> irrelevant.
>
> Hence it is reasonable to destage ion as-is without changing the
> overall design to enable these use-cases and just fixing up a these
> few fairly minor things. Since there won't relly be an open-source
> userspace for ion (and hence drm maintainers won't take it) the
> proposal is to eventually move it to drivers/android/ion.[hc]. Laura
> would be ok with being maintainer once this is all done and ion is
> destaged.
>
> Note that Thiago is working on exposing the cpu cache flushing for
> cpu access from userspace through mmaps so this is alread in progress.
> Also adding him to the Cc: list.
>
> v2: Add ION_IOC_IMPORT to the list of ioctl that probably should go.
>
> Cc: Laura Abbott <labbott@redhat.com>
> Cc: sumit.semwal@linaro.org
> Cc: laurent.pinchart@ideasonboard.com
> Cc: ghackmann@google.com
> Cc: robdclark@gmail.com
> Cc: david.brown@arm.com
> Cc: romlem@google.com
> Cc: Tiago Vignatti <tiago.vignatti@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/staging/android/TODO | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO
> index 06954cdf3dba..bc84a72af32d 100644
> --- a/drivers/staging/android/TODO
> +++ b/drivers/staging/android/TODO
> @@ -13,5 +13,25 @@ TODO:
> - This bug is introduced by Xiong Zhou in the patch bd471258f2e09
> - ("staging: android: logger: use kuid_t instead of uid_t")
>
> +
> +ion/
> + - Remove ION_IOC_SYNC: Flushing for devices should be purely a kernel internal
> + interface on top of dma-buf. flush_for_device needs to be added to dma-buf
> + first.
> + - Remove ION_IOC_CUSTOM: Atm used for cache flushing for cpu access in some
> + vendor trees. Should be replaced with an ioctl on the dma-buf to expose the
> + begin/end_cpu_access hooks to userspace.
> + - Clarify the tricks ion plays with explicitly managing coherency behind the
> + dma api's back (this is absolutely needed for high-perf gpu drivers): Add an
> + explicit coherency management mode to flush_for_device to be used by drivers
> + which want to manage caches themselves and which indicates whether cpu caches
> + need flushing.
> + - With those removed there's probably no use for ION_IOC_IMPORT anymore either
> + since ion would just be the central allocator for shared buffers.
> + - Add dt-binding to expose cma regions as ion heaps, with the rule that any
> + such cma regions must already be used by some device for dma. I.e. ion only
> + exposes existing cma regions and doesn't reserve unecessarily memory when
> + booting a system which doesn't use ion.
> +
> Please send patches to Greg Kroah-Hartman <greg@kroah.com> and Cc:
> Brian Swetland <swetland@google.com>
>
next prev parent reply other threads:[~2015-08-21 21:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 21:02 [PATCH] staging/android: Update ION TODO per LPC discussion Daniel Vetter
2015-08-21 21:02 ` Daniel Vetter
2015-08-21 21:10 ` Tiago Vignatti [this message]
2015-08-21 21:10 ` Tiago Vignatti
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=55D793D4.4050500@intel.com \
--to=tiago.vignatti@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.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.