diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-27 09:52:04 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-11 17:51:28 -0500 |
commit | cfc1a062063bb5b8e3fa2b007043dfc9e27b5a40 (patch) | |
tree | af4aec7b23866d870a91d5a763f0307d09651e7d /drivers/gpu/drm/drm_crtc_helper.c | |
parent | ab4d966c522f84b385d87f5ed2b622a7e4c22a6b (diff) |
drm: add helper to sort panels to the head of the connector list
Userspace seems to like this, see
commit cb0953d734348e8862d6d7edc666cfb3bf6d8fae
Author: Adam Jackson <ajax@redhat.com>
Date: Fri Jul 16 14:46:29 2010 -0400
drm/i915: Initialize LVDS and eDP outputs before anything else
This makes them sort to the front in X, which makes them likely to be
the primary outputs if you haven't specified a preference in your DE,
which is likely to be what you want.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Sorting the connector list after the fact is much easier than trying
to be clever with the init sequence.
Acked-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 1227adf74dbc..710516815de7 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -39,6 +39,24 @@ | |||
39 | #include <drm/drm_fb_helper.h> | 39 | #include <drm/drm_fb_helper.h> |
40 | #include <drm/drm_edid.h> | 40 | #include <drm/drm_edid.h> |
41 | 41 | ||
42 | void drm_helper_move_panel_connectors_to_head(struct drm_device *dev) | ||
43 | { | ||
44 | struct drm_connector *connector, *tmp; | ||
45 | struct list_head panel_list; | ||
46 | |||
47 | INIT_LIST_HEAD(&panel_list); | ||
48 | |||
49 | list_for_each_entry_safe(connector, tmp, | ||
50 | &dev->mode_config.connector_list, head) { | ||
51 | if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS || | ||
52 | connector->connector_type == DRM_MODE_CONNECTOR_eDP) | ||
53 | list_move_tail(&connector->head, &panel_list); | ||
54 | } | ||
55 | |||
56 | list_splice(&panel_list, &dev->mode_config.connector_list); | ||
57 | } | ||
58 | EXPORT_SYMBOL(drm_helper_move_panel_connectors_to_head); | ||
59 | |||
42 | static bool drm_kms_helper_poll = true; | 60 | static bool drm_kms_helper_poll = true; |
43 | module_param_named(poll, drm_kms_helper_poll, bool, 0600); | 61 | module_param_named(poll, drm_kms_helper_poll, bool, 0600); |
44 | 62 | ||