[Nouveau] [Mesa-dev] [RFC] tegra: Initial support

Thierry Reding thierry.reding at gmail.com
Fri Nov 28 00:46:06 PST 2014


On Thu, Nov 27, 2014 at 11:51:08AM -0500, Rob Clark wrote:
> On Thu, Nov 27, 2014 at 11:39 AM, Thierry Reding
> <thierry.reding at gmail.com> wrote:
> > Tegra K1 and later use a GPU that can be driven by the Nouveau driver.
> > But the GPU is a pure render node and has no display engine, hence the
> > scanout needs to happen on the Tegra display hardware. The GPU and the
> > display engine each have a separate DRM device node exposed by the
> > kernel.
> >
> > To make the setup appear as a single device, this driver instantiates
> > a Nouveau screen with each instance of a Tegra screen and forwards GPU
> > requests to the Nouveau screen. For purposes of scanout it will import
> > buffers created on the GPU into the display driver. Handles that
> > userspace requests are those of the display driver so that they can be
> > used to create framebuffers.
> >
> > This has been tested with some GBM test programs, as well as kmscube and
> > weston. All of those run without modifications, but I'm sure there is a
> > lot that can be improved.
> >
> > TODO:
> > - use Nouveau headers to get at the prototype for creating a screen
> > - implement enough support to seamlessly integrate with X
> > - refactor some of the code to be reusable by other drivers
> 
> I haven't looked too carefully at the implementation yet, but couldn't
> you just put in src/gallium/drivers/shim ?  I guess you'd just want a
> small if/else ladder where you create the *actual* screen, to create a
> nouveau screen for tegra, an etnaviv screen for imx, armada, etc..?

That's not how Mesa's loader works. Typically only a file descriptor is
passed in and helpers determine a name for the driver to load, then the
DRI code will load <name>_dri.so. I don't see how this could be made to
work with a single Gallium driver.

There's also the fact that these drivers need to become very HW-specific
at some point, so sharing a single driver will likely just cause an
explosion of conditionals to special-case for each and everyone of the
drivers.

Lastly, Tegra is also somewhat special in this regard because earlier
generations did have a GPU that's controlled via the same DRM device as
the display part. If ever a Mesa driver shows up for that older GPU we
are going to have a conflict between the shim and the Tegra driver that
isn't going to be easy to untangle. With a separate driver we can use
SoC-specific knowledge to determine whether the driver is running on an
old SoC generation or Tegra K1 and later.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20141128/0250a87a/attachment-0001.sig>


More information about the Nouveau mailing list