[Mesa-dev] [RFC] tegra: Initial support
Ilia Mirkin
imirkin at alum.mit.edu
Thu Nov 27 21:32:43 PST 2014
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
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
With the exception of resource creation, I don't see anything
tegra-specific in here. Is there perhaps something that could be done
to abstract that a little more, e.g. a wrapper driver, or...
something? This is a situation that several mobile GPU's are in,
AFAIK, and it may be nice to make it work for them as well.
Also, can you explain why it's advantageous for the setup to appear as
though it is a single device? i.e. what's wrong with just using
nouveau as a render node or whatever? [The answer may be simple, but
I'm very unfamiliar with a lot of that stuff, and perhaps others are
in a similar predicament.]
> diff --git a/src/gallium/winsys/tegra/drm/Makefile.am b/src/gallium/winsys/tegra/drm/Makefile.am
> new file mode 100644
> index 000000000000..8e3685ee20e8
> --- /dev/null
> +++ b/src/gallium/winsys/tegra/drm/Makefile.am
> @@ -0,0 +1,11 @@
> +include Makefile.sources
> +include $(top_srcdir)/src/gallium/Automake.inc
> +
> +AM_CFLAGS = \
> + -I$(top_srcdir)/src/gallium/drivers \
> + $(GALLIUM_WINSYS_CFLAGS) \
> + $(FREEDRENO_CFLAGS)
oops?
> +
> +noinst_LTLIBRARIES = libtegradrm.la
> +
> +libtegradrm_la_SOURCES = $(C_SOURCES)
More information about the mesa-dev
mailing list