ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Josh Triplett <josh@joshtriplett.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	ksummit@lists.linux.dev
Subject: Re: [MAINTAINER SUMMIT] User-space requirements for accelerator drivers
Date: Sun, 12 Sep 2021 01:04:01 +0300	[thread overview]
Message-ID: <YT0n0SaWnM8aVr/S@pendragon.ideasonboard.com> (raw)
In-Reply-To: <YTybN5QwAnLfSBZC@unreal>

Hi Leon,

On Sat, Sep 11, 2021 at 03:04:07PM +0300, Leon Romanovsky wrote:
> On Sat, Sep 11, 2021 at 02:41:52PM +0300, Laurent Pinchart wrote:
> > On Sat, Sep 11, 2021 at 01:31:02PM +0300, Leon Romanovsky wrote:
> > > On Sat, Sep 11, 2021 at 01:55:16AM +0200, Thomas Gleixner wrote:
> > > > On Fri, Sep 10 2021 at 16:45, Josh Triplett wrote:
> > > > 
> > > > > On Sat, Sep 11, 2021 at 12:52:14AM +0200, Mauro Carvalho Chehab wrote:
> > > > >> On media, enforcing userspace to always be open source would
> > > > >> have been very bad, as it would prevent several videoconferencing 
> > > > >> software to exist on Linux.
> > > > >
> > > > > I don't think we should enforce that all userspace users of an interface
> > > > > be Open Source. I do think we should enforce that *some* userspace user
> > > > > of an interface be Open Source before we add the interface.
> > > > 
> > > > The real question is whether the interface is documented in a way that
> > > > an Open Source implementation is possible. It does not matter whether it
> > > > exists at that point in time or not. Even if it exists there is no
> > > > guarantee that it is feature complete.
> > > > 
> > > > Freely accessible documentation is really the key.
> > > 
> > > I have more radical view than you and think that documentation is far
> > > from being enough. I would like to see any userspace API used (or to be
> > > used) in any package which exists in Debiam/Fedora/SuSE.
> > 
> > We probably need to add Android AOSP to that list, as we have
> > Android-specific APIs (not that I believe we *should* have
> > Android-specific APIs, there's been lots of efforts over the past years
> > to develop standard APIs for use cases that stem from Android, slowly
> > replacing Android-specific APIs in some area, but I don't believe we can
> > realisticly bridge that gap completely overnight, if ever).
> 
> Maybe.
> 
> > > Only this will give us some sort of confidence that API and device are usable
> > > to some level. As a side note, we will be able to estimate possible API
> > > deprecation/fix/extension based on simple search in package databases.
> > 
> > Linux supports devices from very diverse markets, from very tiny
> > embedded devices to supercomputers. We have drivers for devices that
> > exist in data centres of a single company only, or for which only a
> > handful of units exist through the world. The set of rules that we'll
> > decide on, if any, should take this into account.
> 
> I'm part of that group (RDMA) who cares about enterprise, cloud and supercomputers. :)
> So for us, working out-of-the box (distro packages and not github code drops) is
> the key to the scalability.

What if we're dealing with a device that only exists in a handful of
machines though ? Would distributions accept the burden of packaging
corresponding userspace code, and maintaining the packages, when only a
handful of people in the world will use it ? It's a genuine question.

> Regarding "embedded devices", I remind that we are talking about
> userspace API and most likely busybox will be used for them, which is
> also part of larger distro anyway, so fails under category "exists in
> Debian/Fedora/SuSE".

We're talking about APIs exposed by drivers, for devices such as GPUs,
cameras or AI/ML accelerators. I don't think busybox will exercise those
:-) We have Masa for GPUs, libcamera for cameras, and other frameworks
I'm less familiar with for AI/ML accelerators, and I expect those to be
packaged by distributions. There are however other kind of devices that
don't fall in existing well-defined categories.

I'm thinking, for instance, about dewarp engines that are used to create
3D surround view for cars. In a nutshell, those devices take a set of
texture and a list of triangles, and perform texture mapping. They're a
bit like GPUs but without 3D, so APIs such as OpenGL or Vulkan don't
apply. There's no standard API for such devices, and no existing
userspace framework similar to Mesa in which a vendor could upstream the
open userspace driver code. I believe that requiring an open userspace
to merge such drivers in the kernel would make sense, but I also don't
think it would be reasonable to ask the first vendor who wants to do so
to create a complete userspace framework with a standard API. The bar to
entry would be too high. An open implementation specific to that device,
with a custom application API, would be a good first step, and it could
serve as a basis to create a framework once a second vendor wants to do
the same. We have to set the end goal, but also consider how it can be
reached.

> > > IMHO, github projects to show API usage are the worst possible way to
> > > allow acceptance for new userspace API.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2021-09-11 22:04 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 21:00 [MAINTAINER SUMMIT] User-space requirements for accelerator drivers Jonathan Corbet
2021-09-10 21:32 ` Josh Triplett
2021-09-13 13:50   ` Christian Brauner
2021-09-13 13:57     ` Daniel Vetter
2021-09-14  2:07       ` Laurent Pinchart
2021-09-14 14:40   ` Jani Nikula
2021-09-14 14:45     ` Geert Uytterhoeven
2021-09-14 14:59       ` Jani Nikula
2021-09-14 15:10         ` Geert Uytterhoeven
2021-09-10 21:51 ` James Bottomley
2021-09-10 21:59   ` Alexandre Belloni
2021-09-10 22:35     ` James Bottomley
2021-09-11 14:51       ` Jonathan Corbet
2021-09-11 15:24         ` James Bottomley
2021-09-11 21:52           ` Laurent Pinchart
2021-09-14 13:22             ` Johannes Berg
2021-09-11  0:08   ` Laurent Pinchart
2021-09-10 22:52 ` Mauro Carvalho Chehab
2021-09-10 23:45   ` Josh Triplett
2021-09-10 23:48     ` Dave Hansen
2021-09-11  0:13       ` Laurent Pinchart
2021-09-10 23:55     ` Thomas Gleixner
2021-09-11  0:20       ` Laurent Pinchart
2021-09-11 14:20         ` Steven Rostedt
2021-09-11 22:08           ` Laurent Pinchart
2021-09-11 22:42             ` Steven Rostedt
2021-09-11 23:10               ` Laurent Pinchart
2021-09-13 11:10               ` Mark Brown
2021-09-11 22:51           ` Mauro Carvalho Chehab
2021-09-11 23:22           ` Mauro Carvalho Chehab
2021-09-11 10:31       ` Leon Romanovsky
2021-09-11 11:41         ` Laurent Pinchart
2021-09-11 12:04           ` Leon Romanovsky
2021-09-11 22:04             ` Laurent Pinchart [this message]
2021-09-12  4:27               ` Leon Romanovsky
2021-09-12  7:26                 ` Greg KH
2021-09-12  8:29                   ` Leon Romanovsky
2021-09-12 13:25                     ` Greg KH
2021-09-12 14:15                       ` Leon Romanovsky
2021-09-12 14:34                         ` Greg KH
2021-09-12 16:41                           ` Laurent Pinchart
2021-09-12 20:35                           ` Dave Airlie
2021-09-12 20:41                           ` Dave Airlie
2021-09-12 20:49                             ` Daniel Vetter
2021-09-12 21:12                               ` Dave Airlie
2021-09-12 22:51                                 ` Linus Walleij
2021-09-12 23:15                                   ` Dave Airlie
2021-09-13 13:20                                   ` Arnd Bergmann
2021-09-13 13:54                                     ` Daniel Vetter
2021-09-13 22:04                                       ` Arnd Bergmann
2021-09-13 23:33                                         ` Dave Airlie
2021-09-14  9:08                                           ` Arnd Bergmann
2021-09-14  9:23                                             ` Daniel Vetter
2021-09-14 10:47                                               ` Laurent Pinchart
2021-09-14 12:58                                               ` Arnd Bergmann
2021-09-14 19:45                                                 ` Daniel Vetter
2021-09-14 15:43                                             ` Luck, Tony
2021-09-13 14:52                                     ` James Bottomley
2021-09-14 13:07                                     ` Linus Walleij
2021-09-13 14:03                           ` Mark Brown
2021-09-12 15:55                       ` Laurent Pinchart
2021-09-12 16:43                         ` James Bottomley
2021-09-12 16:58                           ` Laurent Pinchart
2021-09-12 17:08                             ` James Bottomley
2021-09-12 19:52                   ` Dave Airlie
2021-09-12  7:46                 ` Mauro Carvalho Chehab
2021-09-12  8:00                   ` Leon Romanovsky
2021-09-12 14:53                     ` Laurent Pinchart
2021-09-12 15:41                       ` Mauro Carvalho Chehab
2021-09-10 23:46   ` Laurent Pinchart
2021-09-11  0:38     ` Mauro Carvalho Chehab
2021-09-11  9:27       ` Laurent Pinchart
2021-09-11 22:33         ` Mauro Carvalho Chehab
2021-09-13 12:04         ` Mark Brown
2021-09-12 19:13 ` Dave Airlie
2021-09-12 19:48   ` Laurent Pinchart
2021-09-13  2:26     ` Dave Airlie

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=YT0n0SaWnM8aVr/S@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=corbet@lwn.net \
    --cc=josh@joshtriplett.org \
    --cc=ksummit@lists.linux.dev \
    --cc=leon@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).