make fbdev/fbcon switchable per driver?

Alex Williamson alex.williamson at redhat.com
Fri Jan 27 18:30:19 UTC 2017


On Fri, 27 Jan 2017 11:00:38 +0100
Gerd Hoffmann <kraxel at redhat.com> wrote:

>   Hi folks,
> 
> Problem at hand:  A virtual machine, equipped with two display devices,
> one virtual, one physical (using pci pass-through, or kvmgt-based vgpu).
> 
> There is no easy way for the user to configure which of the two display
> devices fbcon should run on.  i915 happens to win over bochs-drm or qxl,
> so you can't use the emulated gfx device as text console.
> 
> One way out would be to add a module option to each driver, to turn off
> fbdev emulation.  Attached patch does that for i915.
> 
> Comments?  Better ideas?

The vgaarb code has a concept of a vga_default_device(), it's rather
PCI-centric, but maybe better than nothing.  This is typically the
first VGA class code device found with I/O and MMIO enabled.  If fbcon
defaulted to running on the vga_default_device(), a user could select
which to use by re-ordering the VM hardware.

The problem isn't absent on bare metal, though re-ordering hardware
isn't always as simple, or necessarily possible.  The problem might run
deeper there too dealing with vesafb and simplefb, as well as the more
device specific drivers.  Rerouting legacy resources isn't always an
option, but some sort of primary selection for non-encumbered devices
would be useful.  Thanks,

Alex


More information about the dri-devel mailing list