tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: libdrm+kernel patches/fixes from wayland porting work
On Thu, Jan 30, 2025 at 11:32 PM Taylor R Campbell <riastradh%netbsd.org@localhost> wrote:
>
> > Date: Thu, 30 Jan 2025 23:13:45 -0800
> > From: Jeff Frasca <thatguy%jeff-frasca.name@localhost>
> >
> > The libdrm routines that Mesa uses to initialize itself for both the
> > compositor and the client apps leans heavily on the GET_UNIQUE ioctl.
> > However, only the master node has a unique string, and the render
> > nodes do not. For both the compositor and the client, Mesa calls
> > GET_UNIQUE on the render node's device fd, gets back an error and
> > then gives up on setting up full acceleration.
>
> Last year I made some changes to HEAD to address this:
I'll take a look a -current this weekend and see how things run.
> PR kern/58180: render nodes are busted https://gnats.NetBSD.org/58180
> https://mail-index.NetBSD.org/source-changes/2024/04/21/msg150921.html
> https://mail-index.NetBSD.org/source-changes/2024/04/21/msg150922.html
>
> The approach was to pass the same information through the GET_UNIQUE
> ioctl and expose it to render nodes.
So, the problem I hit was when I added DRM_RENDER_ALLOW, I hit an immediate
kernel panic. I suspect unique doesn't get set for the render node's
data structures, but I haven't gone and traced through the code that sets
that up.
Rather than try to figure that out, I realized libdrm just needed four bits
of information, and no one else has DRM_RENDER_ALLOW on the GET_UNIQUE, so
it might have been a better idea to crib from Dragonfly and OpenBSD.
> However, that exposed some other bug which broke Firefox or something,
> so it's not getting pulled up to 10.
Yeah, that's for the best. Whichever chunk of code is the right idea, it's
definitely something for NetBSD 11. (Or people who can figure out how to
patch their 10.x machines.)
> Will take a look at the rest later when I have a moment!
Awesome! Thank you. And again, I'll take a look at what -current is doing.
Jeff
Home |
Main Index |
Thread Index |
Old Index