aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c18
-rw-r--r--include/drm/drm_crtc_helper.h2
2 files changed, 20 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
42void 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}
58EXPORT_SYMBOL(drm_helper_move_panel_connectors_to_head);
59
42static bool drm_kms_helper_poll = true; 60static bool drm_kms_helper_poll = true;
43module_param_named(poll, drm_kms_helper_poll, bool, 0600); 61module_param_named(poll, drm_kms_helper_poll, bool, 0600);
44 62
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index e01cc80c9c30..defee28f6b95 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -137,6 +137,8 @@ extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder);
137 137
138extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode); 138extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode);
139 139
140extern void drm_helper_move_panel_connectors_to_head(struct drm_device *);
141
140extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, 142extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
141 struct drm_mode_fb_cmd2 *mode_cmd); 143 struct drm_mode_fb_cmd2 *mode_cmd);
142 144