From patchwork Fri Sep 15 18:30:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 140615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1244645vqi; Fri, 15 Sep 2023 11:33:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzyQTCjBq84hfnEJKFMAxTALxMpedqNU4zBpW8vh2bfeDVP/3a/skzrD+8s2b8uKD88qQ2 X-Received: by 2002:a17:90a:fe85:b0:268:8ff2:5c0d with SMTP id co5-20020a17090afe8500b002688ff25c0dmr3309791pjb.17.1694802796264; Fri, 15 Sep 2023 11:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694802796; cv=none; d=google.com; s=arc-20160816; b=uMH6Y+AqkyMreHUkADOrSUXCO1J+IzAcxt06K0Jb46FMQ0TFmjCKxdXwSaBI7y5Onp F10HvDOxEycWa+VYdG9kVD8AQD2YfHvYzOpnxE4u4hHz2vqCBYRaVbnI3nRvi/5PHQV5 XTYHkUbjXu4eXP2reLkg7XC+HrpA1wZj2hs0oN5smdarlqoc2LrisrOk2FDV8Te2upvT lio23BWHpnpZiwFpHeOU3mcqRYNvoQreYCaP0PNCoCdWnAR8KpmJNo27D/IWelAyYYSq MBGuYUMh3lfHjeJmAXa4UM3fmlAzgHcdTTayABkoSLjqlUyzrrcK8+haBAMfM661JkIZ IGXQ== 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=R4xBY1UUZCfkSUnpw+JHzAtgUmwmgVegPSoN6/p3CIU=; fh=KjjpDbj/cBfUUaqchDM65npSrO20emfmzqr6Iv8KW+Y=; b=x5N7h7NRnxiIKVvlj20VOXkBWFr1OJo/GS+m8vf35kIf5PLubW0yKjWHljOMEz3Unr 9WKspnlp7/z3Ot3Wt9zRnAT9amJr3ppRPU2NzFR8c8BfaIBCqKX2WpVPxZwr1xfEPdun UMwgxgPSuGBALXY4Mx2GUl9It/kQxxp0DvzEbj3tKGXajeAALHoCYz3FmONe4dyEfZKE YYHzQcmmge7jRzup978KmDYg9yYUYZNHTonZ3cqqeejHlRC8rJEPrvWj3XezqHjArXWN GZG6EsGwm9+mXZtm4C8KJSzALx+s6BGdFflbjBPtxjqPE+jbI/VmIB0BDPOtxbV3SGlY ASaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=d7yX0ANC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u62-20020a638541000000b00565e67df82asi3578717pgd.437.2023.09.15.11.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 11:33:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=d7yX0ANC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id D5FFB808D6B6; Fri, 15 Sep 2023 11:32:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235871AbjIOSbX (ORCPT + 30 others); Fri, 15 Sep 2023 14:31:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236593AbjIOSbO (ORCPT ); Fri, 15 Sep 2023 14:31:14 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F55E6D; Fri, 15 Sep 2023 11:31:07 -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 38FDXXmO026417; Fri, 15 Sep 2023 18:30:26 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=R4xBY1UUZCfkSUnpw+JHzAtgUmwmgVegPSoN6/p3CIU=; b=d7yX0ANCVS4FlggXku0F/7T/c43meGS0VyFEpskwXsXmDEL/08tNIIy077F7DO53wv/2 ejoQmSWVcDKPq/SKqLjTgFesDuqFnmtZecKOszfhOC+is5Q/IsH/DT0r5oHwoTad8+TY 0AjZx9pFnZ9zBPxKfdb81I20YsDXOvu67rxcXsGlRceC9aE99ub/EP4/Iwu6ZHH4vjaP nq5akeaxelSG2coIgv8hiBXz8iAHrd0nNWPel1QfIv0MZutiZav1YJezQQDUOOQ36s/5 h5+/SZrBZjh+SiL57VffndXhZoIRZkk4W/tssoUv7holAaNW/Df6bdxDYjX60AoqVeDU lA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t4g2xhwun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 18:30:25 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38FIUPC7006174 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 18:30:25 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 11:30:24 -0700 From: Abhinav Kumar To: , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , "Daniel Vetter" , Hai Li CC: , , , , Subject: [PATCH] drm/msm/dsi: skip the wait for video mode done if not applicable Date: Fri, 15 Sep 2023 11:30:10 -0700 Message-ID: <20230915183010.32077-1-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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: hndVajsFzIa8dLFhtWYczTtZ2is2qXDo X-Proofpoint-ORIG-GUID: hndVajsFzIa8dLFhtWYczTtZ2is2qXDo 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_15,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1011 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-2309150166 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 11:32:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777129537069917613 X-GMAIL-MSGID: 1777129537069917613 dsi_wait4video_done() API wait 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. Fixes: a689554ba6ed ("drm/msm: Initial add DSI connector support") Signed-off-by: Abhinav Kumar --- 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..31495e423c56 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; + + data = dsi_read(msm_host, REG_DSI_STATUS0); + if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO)) return; + /* 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 */