[Intel-gfx] VGA arbiter support for Intel HD?
Friedrich Oslage
friedrich+intel-gfx at oslage.de
Sat Apr 5 11:42:26 CEST 2014
On Thu, 03 Apr 2014 12:28:27 -0600
Alex Williamson <alex.williamson at redhat.com> wrote:
> I just happened to write-up an explanation this morning:
>
> https://bbs.archlinux.org/viewtopic.php?pid=1400212#p1400212
>
> Last I heard DRI gets disabled whenever Xorg finds that the VGA
> arbiter is managing multiple devices. Therefore, while X still
> works, the typical use case will have a pretty severe performance
> decrease.
>
> I started designing a next-gen VGA arbiter that provides userspace
> with a file descriptor they can use for accessing VGA space,
> including mmap. This seems to work, invalidating the mapping in the
> no-lock-holder, allowing it to fault and block re-mapping until the
> lock can be re-acquired. I got stalled trying to figure out how to
> make use of it in Xorg though. If anyone is interested in working on
> this, I'll happily post my new arbiter code.
>
> Dave Airlie also suggested that maybe all of the VGA arbiter support
> in Xorg could be ripped out without anyone noticing (now I've spilled
> the beans), but that would also solve the DRI problem. We'd probably
> need to keep things as-is in i915 for compatibility for some time
> though.
>
> That brings up another option of including those patches under some
> kind of CONFIG_I915_DONT_LIE_TO_VGA_ARBITER option so a user could
> configure their kernel how they choose. This may just turn the
> complaints into "I want both" though.
>
> As noted in the forum, another option is to avoid VGA in the guest by
> using a "legacy-free" UEFI BIOS. This may circumvent other problems,
> like lack of arbiter support in other drivers, but it relies on a
> compatible legacy-free graphics card BIOS and guest support.
>
> I'd certainly like to make progress on this, so welcome some sort of
> discussion. Thanks,
>
> Alex
>
I did some more tests and managed to reproduce the issue, it seems to
happen only if you use multiple devices for the same xserver:
intel only xorg = OK
nvidia vfio, intel xorg = OK
nvidia only xorg = OK
nvidia :0, intel :1 = OK
nvidia :0.0, intel :0.1 = glxinfo claims everything's OK but glxgears
segfaults
Your next-gen VGA arbiter sounds great, but it also sounds very
complicated and requiring a lot of work and testing, since you need to
modify the kernel, xorg and also possibly wayland.
Perhaps we could enhance your CONFIG_I915_DONT_LIE_TO_VGA_ARBITER idea
as a short term solution:
If it's a config option most distro makes would probably disable it
after reading the help text, therefore I'd go for a module parameter,
disabled by default.
This would save the average user from recompiling (and possibly
patching) the kernel and make using VFIO as easy as adding
"i915.arbiter=1" to /etc/default/grub.
This would also allow the "I want both" guys to unload and reload the
module to change the behaviour.
Regards,
Friedrich
More information about the Intel-gfx
mailing list