All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Keith Packard" <keithp@keithp.com>
To: Charles Lohr <lohr85@gmail.com>, dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@redhat.com>
Subject: Re: fbcon non-desktop display use
Date: Thu, 15 Mar 2018 11:30:18 -0700	[thread overview]
Message-ID: <87zi39yyx1.fsf@keithp.com> (raw)
In-Reply-To: <CAGu26P8B-JNPnRrvgKCirE+rE2vGpgo56Hxh_tKYxY2jrwcNRQ@mail.gmail.com>


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

Charles Lohr <lohr85@gmail.com> writes:

> 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.

Oh, it's not supposed to do that. I had intended to write the code so
that if the only device available was a non-desktop device that it would
go ahead and use it. The X server patches did that, but the kernel ones
did not. It looks like that would be an easy patch -- just skip the
non_desktop check in the !strict case for drm_connector_enabled.

However, your patch is a good addition as it will allow you to also
enable the HMD when other monitors are connected.

> 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.

That was definitely not my intention, and thanks for discovering this!

> 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.

We'll get it sorted out; I'm not sure what Dave's preference is these
days anyways.

Aside from some minor formatting issues, this patch looks good to me.

> Signed-off-by:

You'll need to add your name and email address here.

> 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]");
> +

Your email client appears to be wrapping long lines, which breaks the patch.


>  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)

If you added '&& strict' here, it will use the HMD if there aren't any
desktop monitors connected.

-- 
-keith

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 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

  parent reply	other threads:[~2018-03-15 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=87zi39yyx1.fsf@keithp.com \
    --to=keithp@keithp.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lohr85@gmail.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.