From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Keith Packard" Subject: Re: fbcon non-desktop display use Date: Thu, 15 Mar 2018 11:30:18 -0700 Message-ID: <87zi39yyx1.fsf@keithp.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1143191170==" Return-path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id 3428B6E354 for ; Thu, 15 Mar 2018 18:30:34 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Charles Lohr , dri-devel@lists.freedesktop.org Cc: David Airlie List-Id: dri-devel@lists.freedesktop.org --===============1143191170== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Charles Lohr 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 curre= nt > 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=3D" > __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=3Doff]"); > + 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. =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlqqu7oACgkQ2yIaaQAA ABEKmhAAmHMJ2LjbE3o4/o9R8Wcw10MeJX37IRxlfw5LdJ2IIXY1hytfMCaDnVeK 37nyzab5sWZu5IEQ25wrwEOIVXJkvBFRbiIAEowCOroAA41SVTBh0AucLyGY5yQ4 fYmZvCG81Z4kADU8K59mUsvc6sxZrxEk2NfC1UTGZm/i39K6Ym6bDmUP8akr9gdI GJfPjzkC9XDE1LUaNuLZh5W86CqDWfUPR1053z3hWLT2E53GMMFIATNHQkNOjwg5 4CuXqQKl+mNdOaA3WOiPfprE65xm3aPbI/CPCIClrS7Az9ZmUxQED26/y/6oF+Mz inOi/OVuosInCe5Cyb5kbtuAsfsSbyMC8Tlyrck9k8pk1O1B8CjEZYBO9qmcZSvY TgVPiupsvAjcESoWYS0DBSOt/Ssa1SFGNNS6HBcITK0HwXoI73MOAy8WodombN8e e0rikfxQNV5tfdWVW6M8/cpqHXelv6HSNmcROJmotmzYSOdqwkXq85yv891l1y10 Kiz8pqo/Sefc3+t0ud9AlUmZMW7oa/AyVurjdKee5JPINWM6gfaDBHJSi9oSFvh9 am6yAYoRngIj2IstKttXlrXNaxYdW8lamzGNaH78HYv7/V24pA9nmEwlXulQKYgM iuHE7ul47VZctah4zvwJK1w+bUiUygDQcDaNrRESqVxOsvwNm7Q= =He9l -----END PGP SIGNATURE----- --=-=-=-- --===============1143191170== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1143191170==--