diff options
author | Dave Airlie <airlied@redhat.com> | 2017-10-16 00:08:39 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-11-22 21:45:30 -0500 |
commit | b5f053882ff19a8ce4a3cbc66a136b8bc5e7094f (patch) | |
tree | 221e1b2cd07cd6509b74ff281658c2a1bab91750 /drivers | |
parent | 66660d4cf21b7dfcb258d8a51734963802693796 (diff) |
drm/fb: add support for not enabling fbcon on non-desktop displays [v2]
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
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
2033 | { | 2033 | { |
2034 | bool enable; | 2034 | bool enable; |
2035 | 2035 | ||
2036 | if (connector->display_info.non_desktop) | ||
2037 | return false; | ||
2038 | |||
2036 | if (strict) | 2039 | if (strict) |
2037 | enable = connector->status == connector_status_connected; | 2040 | enable = connector->status == connector_status_connected; |
2038 | else | 2041 | else |
@@ -2052,7 +2055,8 @@ static void drm_enable_connectors(struct drm_fb_helper *fb_helper, | |||
2052 | connector = fb_helper->connector_info[i]->connector; | 2055 | connector = fb_helper->connector_info[i]->connector; |
2053 | enabled[i] = drm_connector_enabled(connector, true); | 2056 | enabled[i] = drm_connector_enabled(connector, true); |
2054 | DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id, | 2057 | DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id, |
2055 | enabled[i] ? "yes" : "no"); | 2058 | connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no"); |
2059 | |||
2056 | any_enabled |= enabled[i]; | 2060 | any_enabled |= enabled[i]; |
2057 | } | 2061 | } |
2058 | 2062 | ||