[RFC] new uapi policy for drm

Dave Airlie airlied at gmail.com
Wed Oct 16 21:43:12 UTC 2019


On Thu, 17 Oct 2019 at 03:28, Matt Roper <matthew.d.roper at intel.com> wrote:
>
> On Tue, Oct 15, 2019 at 04:16:00AM +1000, Dave Airlie wrote:
> > I've kicked this around in my head over the past few weeks but wanted
> > to get some feedback on whether it's a good idea or what impact it
> > might have that I haven't considered.
> >
> > We are getting requests via both amdgpu/amdkfd and i915 for new user
> > APIs for userspace drivers that throw code over the wall instead of
> > being open source developed projects, but we are also seeing it for
> > android drivers and kms properties, and we had that i915 crappy crtc
> > background thing that was for Chrome but Chrome didn't want it.
>
> Having submitted "that i915 crappy crtc background thing" it's unclear
> to me what you're trying to say here.  If you're trying to claim that
> this was "thrown over the wall" or that there was an attempt to try to
> sneak this work in under the radar and circumvent uapi policy then you're
> way off track and you probably need to review the (long) history of this
> feature.  We've very religiously followed both the spirit and the letter
> of your upstream uapi policy with regards to that feature and taken great
> care to ensure it would *not* land upstream without an actual opensource
> userspace consumer.  There was some confusion recently about how
> ChromeOS was/wasn't using this interface, but the Google guys helped
> clear that up, and the kernel changes have now returned to their holding
> pattern and will not go upstream unless new userspace emerges.  To
> refresh your memory on the history:
>
>  * The proposed interface was originally posted in 2015/2016 as an FYI
>    to find out if any opensource userspace projects might have a use for
>    this functionality (we already had the patches written since there's
>    non-opensource software that requires it).  The cover letters at the
>    time clearly stated that it should not be merged upstream since there
>    was no userspace:
>
>         "Note that this series isn't mergeable yet since we don't (yet)
>         have an open source userspace that can make use of it"
>         (https://lists.freedesktop.org/archives/intel-gfx/2016-February/087382.html)
>
>  * About 2.5 years later there was suddenly interest expressed both from
>    people involved in Weston and people involved in ChromeOS, and they
>    independently asked for refreshed kernel patches.  When the refreshed
>    patches were posted  they again included a disclaimer that we needed
>    proper userspace before it could land:
>
>         "As always, we'll still need the patches for at least one of
>         those projects to get posted (and reviewed) somewhere public
>         before we actually merge these kernel patches."
>         (https://lists.freedesktop.org/archives/intel-gfx/2018-October/178202.html)
>
>  * The Weston effort apparently fizzled out, but at the beginning of
>    2019 we were directed to some patches to the ChromeOS ozone layer
>    (https://chromium-review.googlesource.com/c/chromium/src/+/1278858)
>    that utilized the interface.  I'm not at all familiar with the
>    ChromeOS userspace stack, but since the Ozone code was reviewed by
>    non-Intel folks and shows as 'merged' that sounded like a legitimate
>    open source userspace consumer.  From that point on the Chromium
>    review links were clearly advertised in the cover letter each time
>    the series was respun so that it would be very clear what the
>    expected userspace was and so any concerns could be raised.
>
>  * Daniele and Sean from Google recently brought it to our attention
>    that even though that ozone code made use of the background color
>    property, the ozone interfaces themselves don't get used at higher
>    levels of the ChromeOS stack (and had probably been merged to the
>    ozone layer in error).  Once they helped us understand that the
>    properties wouldn't ultimately be utilized in a meaningful way with a
>    real ChromeOS setup today, we put a halt to the upstreaming effort:
>
>         "Hmm, in that case it sounds like we probably don't actually
>         have enough userspace support yet to justify merging the kernel
>         changes at this time."
>         (https://lists.freedesktop.org/archives/dri-devel/2019-October/239436.html)
>
> So long story short, we've been very transparent about what's going on
> with this feature for the whole ~4 years it's been floating around.  I
> would hope that you, as DRM maintainer, would have spoken up at some
> point if you felt there was something else that needed to be handled
> differently.  No code for this api has ever landed in any of the driver
> trees, so I'm not sure why you called out this work in an email
> proposing a change to uapi pull requests.

I understand that but someone merged this to ozone without going
through proper procedures, I'm not sure who that was, you probably do.

The procedure is develop in the open in parallel, get everyone to sign
off on it, merge to kernel, then merge to userspace, in this case it
looked like
it got merged to ozone before the kernel, and then the kernel was left
thinking it was a done deal from the userspace side so it should be
merged, without anyone really checking if there was a userspace stack
on top.

This is just one of the examples of where it's impossible for me as a
kernel maintainer to follow all the pieces of the puzzle, and I have
to trust the process is being followed, but when I find out I can't
trust it I have to adjust the process to catch this sort of thing next
time.

Dave.


More information about the dri-devel mailing list