[PATCH v2 1/2] drm/file: Rehabilitate the firstopen hook for non-legacy drivers

Daniel Stone daniel at fooishbar.org
Fri Mar 29 18:42:28 UTC 2019


Hi,

On Fri, 29 Mar 2019 at 18:14, Eric Anholt <eric at anholt.net> wrote:
> Paul Kocialkowski <paul.kocialkowski at bootlin.com> writes:
> > I'm not totally convinced that it's okay to have a delay outside of
> > init/enumeration, even if it's a smaller delay.
>
> You'll have non-dumb buffers created during GL context creation, so
> early in xserver or other KMS-and-GL-using application init anyway.
> Seems like a perfectly fine plan to me.

Yeah. The alternative is doing it once when Plymouth starts, and then
maybe again when Weston/GNOME/Xorg/... starts, which isn't really
ideal (or maybe even udev helpers). Doing it on probe also complicates
profiling startup for those: if GL context or surface creation takes a
long time, that's easy to reason about. If opening an FD takes ages,
that makes figuring out why stuff is slow a lot more complicated. This
used to happen with RPM resume for PCI devices to read the device ID &
revision, which is why we now have an API that persists that to avoid
the delay.

Sorry this feedback is coming quite late into development.

Cheers,
Daniel


More information about the dri-devel mailing list