Message ID | 20230915204426.19011-1-quic_abhinavk@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1858051vqi; Sat, 16 Sep 2023 14:49:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxY0JsAwYkXQooh34cKo1lCBTeynr3dXTww+B5x8BXARLA6rJKu02Ct9S33TMMDtHYRiX7 X-Received: by 2002:a17:902:ea0a:b0:1c0:9b7c:f82a with SMTP id s10-20020a170902ea0a00b001c09b7cf82amr7007900plg.53.1694900956833; Sat, 16 Sep 2023 14:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694900956; cv=none; d=google.com; s=arc-20160816; b=DehEyGlzYMJGLqcLLz3l0TXJuJVMpswk+wn+woIICX86/PNPoAGT99CVoZFrUpkuQb td/Yf5xfYBGsD7Jz0uc8E6dmPjL6u6sEzRcmfhlsfLAWmVDdYL9NaKQnCgC3CtyfX40D qU/8qn2wxUZIPTETulXas33IhZwQTIN9at/DpQUmfGCEvSrSi1FRGp1HWZTyUdBNUUhs QbdB0LFprixUOLnZe0qlFA7ZXc7d4pDQ2eNXn1DcDsDKHOQWWoAyQGG3f5JGKS8EssbQ gVOG4zjRRUzaQ/jpuIg09u0N4+oCn9nvy657B2qrUydmKZce2sy9xdo1JZUyXF4MjChk Lk7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TwFdUJBoBZv3Jp0TbnAsoL/CZRjAWRikLTj/EymlHiY=; fh=KjjpDbj/cBfUUaqchDM65npSrO20emfmzqr6Iv8KW+Y=; b=miHVH2rOOA4GvELDn1DHEB+nyKyJyr95W8RMguWQ7xfxDXylaGg3bLuFqyxxX7bspB 7bckix7LkRreSUybnmF1PyrXK3uGYRpwiuthpKGCoTycgZCnSX+C+U/6mD0Bsh5dt9go oonvV4QYIrLjGYfcXodVYz0uiD0+akq4FWx7HcRQkyF2tYi54dutPi/vuP7OYAOuf1p2 vltHUM/XeqRp9698fXC0kc0PVbt5+hao48H3T0pRj8IyLuRct13Y5QsUvPAqhJbIVupr Z6gQMRrFG8bDInTTVnCrR9vSavo60QRNPG2CIQ2zA5c2WSxNEeac3DDVtqL0AIZaa/SK 07KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pEKuRDpv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id kb14-20020a170903338e00b001bdfb3c4e0asi5412468plb.326.2023.09.16.14.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 14:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pEKuRDpv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 058D4829BD51; Fri, 15 Sep 2023 13:46:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237378AbjIOUpn (ORCPT <rfc822;realc9580@gmail.com> + 29 others); Fri, 15 Sep 2023 16:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237405AbjIOUp2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 16:45:28 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EBB299; Fri, 15 Sep 2023 13:45:23 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38FJuHn5000812; Fri, 15 Sep 2023 20:44:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=TwFdUJBoBZv3Jp0TbnAsoL/CZRjAWRikLTj/EymlHiY=; b=pEKuRDpvlw7ZKG+NV4FuTr9/vFxVHglZM50wCiSCYqioskILmTox/6cPy5cMGVMNG10f 0D2DBvfmD3i52lGGQCkNYu2VkvNddBXUykBuD9VYKcpNwb/iIt/PRJLyzaQp1/Ua5rHV yFeN10SZAbHQwcj1XvuWHZkYNDWPLQoowtmGcSbLW3ycs0BethoiUpxajA9sUH/MJXJg MhiveogFRtFdM0QWMN1gNEIwLRjts3ri0UFI+CAoXpz4oszFGKDat0aAqqODDggyOG6S ZH8Gocf9WsbGR9yzVVBu38/A+pW3gCx33GH8UZMVlIswJi8E1HsT6sKI6vZ/Lt17E5R1 7w== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t4g2xj7ur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 20:44:36 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38FKiZYZ021895 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 20:44:35 GMT Received: from abhinavk-linux.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.1118.36; Fri, 15 Sep 2023 13:44:35 -0700 From: Abhinav Kumar <quic_abhinavk@quicinc.com> To: <freedreno@lists.freedesktop.org>, Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, Marijn Suijten <marijn.suijten@somainline.org>, David Airlie <airlied@gmail.com>, "Daniel Vetter" <daniel@ffwll.ch>, Hai Li <hali@codeaurora.org> CC: <dri-devel@lists.freedesktop.org>, <quic_jesszhan@quicinc.com>, <quic_parellan@quicinc.com>, <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2] drm/msm/dsi: skip the wait for video mode done if not applicable Date: Fri, 15 Sep 2023 13:44:25 -0700 Message-ID: <20230915204426.19011-1-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: JHAsSsF9gtJJnr0se6qijXhe-eXgAngG X-Proofpoint-ORIG-GUID: JHAsSsF9gtJJnr0se6qijXhe-eXgAngG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-15_17,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 phishscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150186 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 13:46:09 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777153140092016319 X-GMAIL-MSGID: 1777232465746064643 |
Series |
[v2] drm/msm/dsi: skip the wait for video mode done if not applicable
|
|
Commit Message
Abhinav Kumar
Sept. 15, 2023, 8:44 p.m. UTC
dsi_wait4video_done() API waits for the DSI video mode engine to
become idle so that we can transmit the DCS commands in the
beginning of BLLP. However, with the current sequence, the MDP
timing engine is turned on after the panel's pre_enable() callback
which can send out the DCS commands needed to power up the panel.
During those cases, this API will always timeout and print out the
error spam leading to long bootup times and log flooding.
Fix this by checking if the DSI video engine was actually busy before
waiting for it to become idle otherwise this is a redundant wait.
changes in v2:
- move the reg read below the video mode check
- minor fixes in commit text
Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/34
Fixes: a689554ba6ed ("drm/msm: Initial add DSI connector support")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 0c4ec0530efc..1a2afe31fa86 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1075,9 +1075,21 @@ static void dsi_wait4video_done(struct msm_dsi_host *msm_host) static void dsi_wait4video_eng_busy(struct msm_dsi_host *msm_host) { + u32 data; + if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO)) return; + data = dsi_read(msm_host, REG_DSI_STATUS0); + + /* if video mode engine is not busy, its because + * either timing engine was not turned on or the + * DSI controller has finished transmitting the video + * data already, so no need to wait in those cases + */ + if (!(data & DSI_STATUS0_VIDEO_MODE_ENGINE_BUSY)) + return; + if (msm_host->power_on && msm_host->enabled) { dsi_wait4video_done(msm_host); /* delay 4 ms to skip BLLP */