On Fri, Jan 27, 2017 at 03:02:42PM +0100, Daniel Vetter wrote: > On Fri, Jan 27, 2017 at 11:00:38AM +0100, Gerd Hoffmann 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? > > fbcon can be switched between different fbdev afaik, but don't ask me how. Hint: Documentation/fb/fbcon.txt says fbcon=map:<ttynumbers> Best regards, Liviu > I'd say if you want to keep fbcon (and not switch to something like > kmscon), then that's where this logic should be. Might even exist already. > Having a per-driver knob won't work, since then the next person complains > about his multi-amd setup using the wrong gpu :-) > -Daniel > > > > > cheers, > > Gerd > > > > > From 19236e412a6f0e9390c1ce77d8702bbdb5511174 Mon Sep 17 00:00:00 2001 > > From: Gerd Hoffmann <kraxel@xxxxxxxxxx> > > Date: Fri, 27 Jan 2017 08:05:40 +0100 > > Subject: [PATCH] drm i915: add fbdev option > > > > Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx> > > --- > > drivers/gpu/drm/i915/intel_fbdev.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c > > index 3e3632c..cc0ba3e 100644 > > --- a/drivers/gpu/drm/i915/intel_fbdev.c > > +++ b/drivers/gpu/drm/i915/intel_fbdev.c > > @@ -45,6 +45,11 @@ > > #include <drm/i915_drm.h> > > #include "i915_drv.h" > > > > +static bool enable_fbdev = true; > > +module_param_named(fbdev, enable_fbdev, bool, 0600); > > +MODULE_PARM_DESC(fbdev, > > + "Enable legacy fbdev emulation [default=true]"); > > + > > static int intel_fbdev_set_par(struct fb_info *info) > > { > > struct drm_fb_helper *fb_helper = info->par; > > @@ -706,6 +711,9 @@ int intel_fbdev_init(struct drm_device *dev) > > struct drm_i915_private *dev_priv = to_i915(dev); > > int ret; > > > > + if (!enable_fbdev) > > + return 0; > > + > > if (WARN_ON(INTEL_INFO(dev)->num_pipes == 0)) > > return -ENODEV; > > > > @@ -747,6 +755,8 @@ void intel_fbdev_initial_config_async(struct drm_device *dev) > > { > > struct intel_fbdev *ifbdev = to_i915(dev)->fbdev; > > > > + if (!ifbdev) > > + return; > > ifbdev->cookie = async_schedule(intel_fbdev_initial_config, ifbdev); > > } > > > > -- > > 1.8.3.1 > > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@xxxxxxxxxxxxxxxxxxxxx > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- ------------------- .oooO ( ) \ ( Oooo. \_) ( ) ) / (_/ One small step for me ... _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel