From: Liviu Dudau <liviu@dudau.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "alex.williamson" <alex.williamson@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: make fbdev/fbcon switchable per driver?
Date: Fri, 27 Jan 2017 14:41:41 +0000 [thread overview]
Message-ID: <20170127144140.GD899@bart.dudau.co.uk> (raw)
In-Reply-To: <20170127140242.kt3d6nsfzczecyru@phenom.ffwll.local>
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@redhat.com>
> > Date: Fri, 27 Jan 2017 08:05:40 +0100
> > Subject: [PATCH] drm i915: add fbdev option
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> > 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@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
-------------------
.oooO
( )
\ ( Oooo.
\_) ( )
) /
(_/
One small step
for me ...
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-01-27 14:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 10:00 make fbdev/fbcon switchable per driver? Gerd Hoffmann
2017-01-27 14:02 ` Daniel Vetter
2017-01-27 14:41 ` Liviu Dudau [this message]
2017-01-27 18:30 ` Alex Williamson
2017-01-30 8:15 ` Gerd Hoffmann
2017-01-30 17:45 ` Alex Williamson
2017-01-31 8:00 ` Daniel Vetter
2017-01-31 10:06 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170127144140.GD899@bart.dudau.co.uk \
--to=liviu@dudau.co.uk \
--cc=alex.williamson@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.