Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2845520imw; Wed, 6 Jul 2022 12:43:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sNMrvKaRvAJtNIQbF6mLz+Cs2s90lDC9j+32ghVVNvqKmXODCaPinI5Vac0fsRsugqJAl9 X-Received: by 2002:a05:6402:26d6:b0:435:ba41:dbb0 with SMTP id x22-20020a05640226d600b00435ba41dbb0mr56195394edd.242.1657136598004; Wed, 06 Jul 2022 12:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657136597; cv=none; d=google.com; s=arc-20160816; b=SONTzqo4fUfiE8+tLeujwIysHsw1HQ/84bATEKkMiSRnfvjEPpwHgBnGJq914BiXvF 3mDJ6y1o+C2F5GlyJZFDCmOUnwId/38RWLFGDkwxCXP1kX3c9OkFWecgCzlkn++gX+Bz K2C9yqaonc9ut+Io/w+SbWKApNTRt7tl+w16d2no9iXp3yclBIS33qR5/q7A+Nei3jJJ LXXNLjaI7LoDyZ60v/yvFUn9Pjid37JkIN3aAqTsyxpUZuqjdVSTs3a7pOymkHSG47sy +Qz9kopKISKKDpYzcRibcAjDn1gcdgx6sXfLinIhkZfsPg+ABRRenVEDg+d10O+90TYv gH1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=J1HiFZXVh92OrCy5eDkQ/TvRuTS/M+kZGd4pG0Gz2ZU=; b=iW1Jx10LQD9zIrefrg4lA2uwguk2/pnby0i3zo1g3mbYsTstGMQh0n2syXWIoXfS1O eMEIMgHKvct0g9AfHHCfiXLVkgXpWIu5vTyLZixdM6ron/gTv8TfM0majTdx3fZ1EU+j ilftsDZzbNhEVc8cdBU8rGlfM/VunGKIKc7tRt9Wszk47OOhYckpTw1Luq/JeSl5eJgb BIfOy9xBNqD5jF85WI2m3VUPp6pF0VcxUdIwQ/J2Q5LnN5/12Og8a1OWCOghwmYT5Qms dJB6eDWVhREjN+8OxKdwzCy68qxeW5XcvsghMS8VaTs5Lnuoj49OyOr3eoclgz1kMoWo ErEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=GBt3rjp+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb4-20020a1709076d8400b0072ad31f5bfcsi11782417ejc.250.2022.07.06.12.42.42; Wed, 06 Jul 2022 12:43:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=GBt3rjp+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234127AbiGFTcV (ORCPT + 99 others); Wed, 6 Jul 2022 15:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233663AbiGFTcT (ORCPT ); Wed, 6 Jul 2022 15:32:19 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EFAD220EE; Wed, 6 Jul 2022 12:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657135938; x=1688671938; h=from:to:cc:subject:date:message-id:mime-version; bh=J1HiFZXVh92OrCy5eDkQ/TvRuTS/M+kZGd4pG0Gz2ZU=; b=GBt3rjp+5K+IdADNgOIg43SfIz9+30X7l33qC3Zk328aOfNAnfpoy/Ax 8yMvXlEqZa8Rr2KNasvuABj3Qw2qEjb0tR7DIuND5EqJ9mjLfmSrN9JU8 KPeeCkvbCiXRsNCOU8YPUJvRfm6CjpjygwTlEdGaTI/5eho967u6aCrIh o=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 06 Jul 2022 12:32:17 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 12:32:17 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 6 Jul 2022 12:32:16 -0700 Received: from khsieh-linux1.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 6 Jul 2022 12:32:15 -0700 From: Kuogee Hsieh To: , , , , , , , , , CC: , , , , , , , Subject: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector Date: Wed, 6 Jul 2022 12:32:08 -0700 Message-ID: <1657135928-31195-1-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some userspace presumes that the first connected connector is the main display, where it's supposed to display e.g. the login screen. For laptops, this should be the main panel. This patch call drm_helper_move_panel_connectors_to_head() after drm_bridge_connector_init() to make sure eDP stay at head of connected connector list. This fixes unexpected corruption happen at eDP panel if eDP is not placed at head of connected connector list. Changes in v2: -- move drm_helper_move_panel_connectors_to_head() to dpu_kms_drm_obj_init() Changes in v4: -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init() Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/msm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 4a3dda2..4d518c2 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -419,6 +419,8 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv) } } + drm_helper_move_panel_connectors_to_head(ddev); + ddev->mode_config.funcs = &mode_config_funcs; ddev->mode_config.helper_private = &mode_config_helper_funcs; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project