From: Daniel Vetter <daniel@ffwll.ch>
To: Greg Hackmann <ghackmann@google.com>
Cc: devel@driverdev.osuosl.org,
"Daniel Stone" <daniels@collabora.com>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
"ML dri-devel" <dri-devel@lists.freedesktop.org>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Emil Velikov" <emil.l.velikov@gmail.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Riley Andrews" <riandrews@android.com>,
"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
"John Harrison" <John.C.Harrison@intel.com>
Subject: Re: [PATCH v2 01/11] dma-buf/sync_file: de-stage sync_file
Date: Thu, 28 Jan 2016 10:23:55 +0100 [thread overview]
Message-ID: <20160128092355.GS11240@phenom.ffwll.local> (raw)
In-Reply-To: <56A9396F.8010803@google.com>
On Wed, Jan 27, 2016 at 01:41:03PM -0800, Greg Hackmann wrote:
> On 01/27/2016 12:25 PM, Gustavo Padovan wrote:
> >>>>Is there a value in keeping the abi unchanged?
> >>>>If not, then Documentation/ioctl/botching-up-ioctls.txt is worth a read.
> >>>
> >>>None from me. I'll look where we can improve the ABI.
>
> Android has existing clients of the current ABI. Thankfully they're all
> contained in system services like SurfaceFlinger, since end-user apps don't
> get direct access to fence fds.
>
> As long the ABI breaks don't remove functionality we depend on, we can wrap
> around them in our userspace libsync. I'd rather not have to do that, but
> it's a price I'm willing to pay to get this moved out of staging.
>
> >> - struct sync_file_info_data::fence_info is of type __u8 yet it is "a
> >>fence_info struct for every fence in the sync_file". Thus shouldn't
> >>one use "struct fence_info" as the type ?
> >
> >Agreed. But I'm currently thinking if we really should keep this ioctl.
> >
> > Gustavo
> >
>
> I'm not seeing any consumers of driver_data in our tree. OTOH completely
> getting rid of the ioctl would be a problem, since SurfaceFlinger depends on
> the timestamp information for its own bookkeeping.
If we remove driver_data (and len is superflous too), then I think we
should also make the master struct use common ioctl pattern:
- Add a num_fences field or similar that the kernel fills out.
- Make pt_info an __u64 pointer instead of a variable-length array (and
length) - ioctl payload sizes are somewhat limited.
This way the interface is future-proofed for truly patalogical number of
fences (which surface flinger won't do, but could happen in
server/opencl/media workloads I'd imagine).
And I think driver_data really shouldn't be there, it makes things
complicated with the array of variable-sized objects, and generic
userspace can't really use it - for debug output we already have
obj/driver_name per fence point, which I think is good enough.
Would that be ok for you from the Android side if Gustavo also provides a
patch to update libsync? I don't think the ABI is fundamentally broken,
but this light cleanup would be nice.
Wrt keeping SYNC_WAIT: I think that's totally fine. Redundant since
polling is supported, but not really an issue imo either. If we're totally
lazy we could implement SYNC_WAIT internally using poll and shave off a
few lines of the implementation.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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: Daniel Vetter <daniel@ffwll.ch>
To: Greg Hackmann <ghackmann@google.com>
Cc: "Gustavo Padovan" <gustavo@padovan.org>,
"Emil Velikov" <emil.l.velikov@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
devel@driverdev.osuosl.org,
"ML dri-devel" <dri-devel@lists.freedesktop.org>,
"Daniel Stone" <daniels@collabora.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Riley Andrews" <riandrews@android.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Rob Clark" <robdclark@gmail.com>,
"John Harrison" <John.C.Harrison@intel.com>,
"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH v2 01/11] dma-buf/sync_file: de-stage sync_file
Date: Thu, 28 Jan 2016 10:23:55 +0100 [thread overview]
Message-ID: <20160128092355.GS11240@phenom.ffwll.local> (raw)
In-Reply-To: <56A9396F.8010803@google.com>
On Wed, Jan 27, 2016 at 01:41:03PM -0800, Greg Hackmann wrote:
> On 01/27/2016 12:25 PM, Gustavo Padovan wrote:
> >>>>Is there a value in keeping the abi unchanged?
> >>>>If not, then Documentation/ioctl/botching-up-ioctls.txt is worth a read.
> >>>
> >>>None from me. I'll look where we can improve the ABI.
>
> Android has existing clients of the current ABI. Thankfully they're all
> contained in system services like SurfaceFlinger, since end-user apps don't
> get direct access to fence fds.
>
> As long the ABI breaks don't remove functionality we depend on, we can wrap
> around them in our userspace libsync. I'd rather not have to do that, but
> it's a price I'm willing to pay to get this moved out of staging.
>
> >> - struct sync_file_info_data::fence_info is of type __u8 yet it is "a
> >>fence_info struct for every fence in the sync_file". Thus shouldn't
> >>one use "struct fence_info" as the type ?
> >
> >Agreed. But I'm currently thinking if we really should keep this ioctl.
> >
> > Gustavo
> >
>
> I'm not seeing any consumers of driver_data in our tree. OTOH completely
> getting rid of the ioctl would be a problem, since SurfaceFlinger depends on
> the timestamp information for its own bookkeeping.
If we remove driver_data (and len is superflous too), then I think we
should also make the master struct use common ioctl pattern:
- Add a num_fences field or similar that the kernel fills out.
- Make pt_info an __u64 pointer instead of a variable-length array (and
length) - ioctl payload sizes are somewhat limited.
This way the interface is future-proofed for truly patalogical number of
fences (which surface flinger won't do, but could happen in
server/opencl/media workloads I'd imagine).
And I think driver_data really shouldn't be there, it makes things
complicated with the array of variable-sized objects, and generic
userspace can't really use it - for debug output we already have
obj/driver_name per fence point, which I think is good enough.
Would that be ok for you from the Android side if Gustavo also provides a
patch to update libsync? I don't think the ABI is fundamentally broken,
but this light cleanup would be nice.
Wrt keeping SYNC_WAIT: I think that's totally fine. Redundant since
polling is supported, but not really an issue imo either. If we're totally
lazy we could implement SYNC_WAIT internally using poll and shave off a
few lines of the implementation.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2016-01-28 9:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 13:30 [PATCH v2 00/11] sync framework de-staging: part 2 - de-stage Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 01/11] dma-buf/sync_file: de-stage sync_file Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 14:31 ` Maarten Lankhorst
2016-01-27 14:31 ` Maarten Lankhorst
2016-01-27 17:03 ` Gustavo Padovan
2016-01-27 17:03 ` Gustavo Padovan
2016-01-27 18:17 ` Emil Velikov
2016-01-27 20:25 ` Gustavo Padovan
2016-01-27 20:25 ` Gustavo Padovan
2016-01-27 21:41 ` Greg Hackmann
2016-01-27 21:41 ` Greg Hackmann
2016-01-28 9:23 ` Daniel Vetter [this message]
2016-01-28 9:23 ` Daniel Vetter
2016-01-29 17:46 ` Greg Hackmann
2016-01-27 13:30 ` [PATCH v2 02/11] staging/android: store last signaled value on sync timeline Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 03/11] staging/android: remove .fill_driver_data() timeline ops Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 04/11] staging/android: remove .{fence, timeline}_value_str() from timeline_ops Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 04/11] staging/android: remove .{fence,timeline}_value_str() " Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 05/11] staging/android: remove struct sync_timeline_ops Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 06/11] staging/android: remove sw_sync_timeline and sw_sync_pt Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 07/11] staging/android: remove sw_sync.[ch] files Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 08/11] staging/android: rename android_fence to timeline_fence Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 09/11] dma-buf/sync_timeline: de-stage sync_timeline Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 10/11] dma-buf/sync_file: bring debug back to sync file Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 11/11] dma-buf/sync_file: bring sync_dump() back Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan
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=20160128092355.GS11240@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=John.C.Harrison@intel.com \
--cc=arve@android.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniels@collabora.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=ghackmann@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=riandrews@android.com \
/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.