All of lore.kernel.org
 help / color / mirror / Atom feed
* fbcon non-desktop display use
@ 2018-03-15  3:32 Charles Lohr
  2018-03-15  9:32   ` Daniel Vetter
  2018-03-15 18:30 ` Keith Packard
  0 siblings, 2 replies; 8+ messages in thread
From: Charles Lohr @ 2018-03-15  3:32 UTC (permalink / raw)
  To: dri-devel; +Cc: David Airlie


[-- Attachment #1.1: Type: text/plain, Size: 2130 bytes --]

There was a patch submitted by Keith Packard which prevents fbcon from
using non-desktop displays, but this breaks vive, and other HMD
development/use on embedded and other fbdev systems (
https://patchwork.kernel.org/patch/10053989/ ).

Even if the vive is the only device connected, it will still not permit it
to be operated.  See https://github.com/linux-sunxi/linux-sunxi/issues/291
for dri with a lot of debugging turned on.

I can understand that most users would probably prefer that the vive isn't
automatically used if no other displays are available, however, the current
behavior prevents use of the vive on all devices that use fbdev for their
primary output.

This patch allows enabling of non-desktop devices both as a kernel command
line as well as by setting /sys/module/drm_kms_helper/par
ameters/drm_fbdev_permit_non_desktop.

I've never sent an email to the kernel devel list, so I'm still a little
nervous.  Especially because this is against a different branch, and I'm
starting to think that I should be messaging there, but this is something
that really needs to go upstream.

Signed-off-by:

diff --git a/drivers/gpu/drm/drm_fb_helper.c
b/drivers/gpu/drm/drm_fb_helper.c
index 035784ddd..8bfaf79ff 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -55,6 +55,11 @@ MODULE_PARM_DESC(drm_fbdev_overalloc,
                 "Overallocation of the fbdev buffer (%) [default="
                 __MODULE_STRING(CONFIG_DRM_FBDEV_OVERALLOC) "]");

+static bool drm_fbdev_permit_non_desktop;
+module_param(drm_fbdev_permit_non_desktop, bool, 0644);
+MODULE_PARM_DESC(drm_fbdev_permit_non_desktop,
+               "Allow the framebuffer to use non-desktop displays
[default=off]");
+
 static LIST_HEAD(kernel_fb_helper_list);
 static DEFINE_MUTEX(kernel_fb_helper_lock);

@@ -2109,7 +2114,7 @@ static bool drm_connector_enabled(struct
drm_connector *connector, bool strict)
 {
        bool enable;

-       if (connector->display_info.non_desktop)
+       if (connector->display_info.non_desktop &&
!drm_fbdev_permit_non_desktop)
                return false;

        if (strict)

[-- Attachment #1.2: Type: text/html, Size: 2705 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-15 20:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15  3:32 fbcon non-desktop display use Charles Lohr
2018-03-15  9:32 ` Daniel Vetter
2018-03-15  9:32   ` Daniel Vetter
2018-03-15 18:30 ` Keith Packard
2018-03-15 20:03   ` Charles Lohr
2018-03-15 20:03     ` Charles Lohr
2018-03-15 20:11     ` Daniel Vetter
2018-03-15 20:11       ` Daniel Vetter

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.