Hi,

On 28 November 2014 at 09:17, Thierry Reding <thierry.red...@gmail.com>
wrote:

> On Fri, Nov 28, 2014 at 12:32:43AM -0500, Ilia Mirkin wrote:> 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.]
>
> There are two reasons. For one, pretty much every software out there
> that runs on the "bare metal" (i.e. GBM) uses the same initialization
> sequence and it doesn't involve opening two DRM devices. So in order to
> support Tegra and other SoCs with a similar architecture, each of these
> applications would need to be patched. Now typically a lot of the
> applications would run under X or Wayland, so the number of applications
> that need patching is somewhat reduced. However, it would still mean
> that every Wayland compositor would need to be patched in order to
> support this, and each of them would use a mostly identical copy of that
> code.
>

More specifically, the gbm/EGL API works thusly:
  drm_fd = drmOpen("display_controller");
  gbm_dev = gbm_create_device(drm_fd);
  egl_dpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_EXT, gbm_dev, NULL);

So in the last stage, you have to magically infer a relationship between
your display controller's device and your GPU's. On most mobile devices you
can just work this out (there's only one GPU), but it also breaks in the
multi-GPU case.

The best idea I've come up with to fix this in the long term, is to use
EGL_EXT_device_base to enumerate the GPUs and then feed the device ID you
get from that as a new attrib to eglGetPlatformDisplayEXT. It's either
that, or a new gbm_device_create_multi(display_controller_fd, gpu_fd)
entrypoint.

Of course, the first complication in all of this is that Weston doesn't
support platform_base at all anyway ...

Cheers,
Daniel
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to