2017-11-11 00:22:17

by Keith Packard

[permalink] [raw]
Subject: [PATCH 0/3] drm: Add connector info/property for non-desktop [v2]

This is the same as the series for non-standard displays but uses the
phrase 'non-desktop' instead. No functional changes.


From 1583681902611358210@xxx Fri Nov 10 12:25:55 +0000 2017
X-GM-THRID: 1583681902611358210
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread


2017-11-11 00:23:27

by Keith Packard

[permalink] [raw]
Subject: [PATCH 2/3] drm/fb: add support for not enabling fbcon on non-desktop displays [v2]

From: Dave Airlie <[email protected]>

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 <[email protected]>
---
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


From 1583678887075984851@xxx Fri Nov 10 11:38:00 +0000 2017
X-GM-THRID: 1583306923114608730
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread