summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorGil Dekel <gildekel@chromium.org>2022-11-10 21:48:52 +0300
committerChun-Kuang Hu <chunkuang.hu@kernel.org>2022-11-14 02:37:01 +0300
commit144d9b2e7abffe6dff3a0ed693d6be337969b947 (patch)
treef4df6dd1f7adb42c92cde0c7b127a28c09013819 /drivers/gpu
parentff446c0f6290185cefafe3b376bb86063a3a9f6a (diff)
downloadlinux-144d9b2e7abffe6dff3a0ed693d6be337969b947.tar.xz
drm/mediatek: Make eDP panel as the first connected connector
[Why] Some userspaces assume that the first connected connector is the "main" display, which supposed to display, for example, the login screen. For laptops, this should be the internal connector. [How] This patch calls drm_helper_move_panel_connectors_to_head() right before crtc creation to ensure internal connectors are at the top of the connector list. Tested by ensuring the internal panels are at the top of the connector list via modetest -c. This patch does to mediatek what the following patch https://www.spinics.net/lists/stable/msg590605.html did for qualcomm. Signed-off-by: Gil Dekel <gildekel@chromium.org> Tested-by: Gil Dekel <gildekel@chromium.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 91f58db5915f..76daaf6a0945 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -387,6 +387,12 @@ static int mtk_drm_kms_init(struct drm_device *drm)
goto put_mutex_dev;
/*
+ * Ensure internal panels are at the top of the connector list before
+ * crtc creation.
+ */
+ drm_helper_move_panel_connectors_to_head(drm);
+
+ /*
* We currently support two fixed data streams, each optional,
* and each statically assigned to a crtc:
* OVL0 -> COLOR0 -> AAL -> OD -> RDMA0 -> UFOE -> DSI0 ...