dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: linux-kernel@vger.kernel.org, Dave Airlie <airlied@redhat.com>,
	Daniel Vetter <daniel@ffwll.ch>
Cc: Keith Packard <keithp@keithp.com>, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/3] drm/fb: add support for not enabling fbcon on non-desktop displays [v2]
Date: Fri, 10 Nov 2017 16:20:08 -0800	[thread overview]
Message-ID: <20171111002009.2340-3-keithp@keithp.com> (raw)
In-Reply-To: <20171111002009.2340-1-keithp@keithp.com>

From: Dave Airlie <airlied@redhat.com>

We don't want fbcon to get used on non-desktop dislays,
don't pass them as enabled connectors to the fb helper setup.

This prevents my HMD from getting disorted fbcon, and from
affecting other displays console.

v2: Change description from non-standard to non-desktop

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 116d1f1337c7..07374008f146 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2033,6 +2033,9 @@ static bool drm_connector_enabled(struct drm_connector *connector, bool strict)
 {
 	bool enable;
 
+	if (connector->display_info.non_desktop)
+		return false;
+
 	if (strict)
 		enable = connector->status == connector_status_connected;
 	else
@@ -2052,7 +2055,8 @@ static void drm_enable_connectors(struct drm_fb_helper *fb_helper,
 		connector = fb_helper->connector_info[i]->connector;
 		enabled[i] = drm_connector_enabled(connector, true);
 		DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id,
-			  enabled[i] ? "yes" : "no");
+			      connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no");
+
 		any_enabled |= enabled[i];
 	}
 
-- 
2.15.0.rc0

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

  parent reply	other threads:[~2017-11-11  0:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  6:30 [PATCH 1/3] drm: add connector info/property for non-desktop displays Dave Airlie
2017-10-25  6:30 ` [PATCH 2/3] drm/fb: add support for not enabling fbcon on " Dave Airlie
2017-10-25  6:30 ` [PATCH 3/3] drm/edid: quirk HTC vive headset as non-desktop Dave Airlie
2017-10-25 11:15 ` [PATCH 1/3] drm: add connector info/property for non-desktop displays Daniel Stone
2017-10-25 19:24   ` Dave Airlie
2017-10-25 19:27     ` Dave Airlie
2017-10-25 20:23   ` Keith Packard
2017-10-30 10:13     ` Daniel Vetter
2017-11-02 11:04 ` Philipp Zabel
2017-11-11  0:20 ` [PATCH 0/3] drm: Add connector info/property for non-desktop [v2] Keith Packard
2017-11-11  0:20   ` [PATCH 1/3] drm: add connector info/property for non-desktop displays [v2] Keith Packard
2017-11-11  0:20   ` Keith Packard [this message]
2017-11-11  0:20   ` [PATCH 3/3] drm/edid: quirk HTC vive headset as non-desktop. [v2] Keith Packard

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=20171111002009.2340-3-keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).