Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3901472pxp; Tue, 15 Mar 2022 08:28:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5JahuG/kMq71+SlyNwomj7BIiaI50q+BWNhEYyp3OSN9r06s88Qsv4T79BEReOKf8e405 X-Received: by 2002:a05:6402:5193:b0:416:b3bf:23c3 with SMTP id q19-20020a056402519300b00416b3bf23c3mr24229812edd.163.1647358084366; Tue, 15 Mar 2022 08:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647358084; cv=none; d=google.com; s=arc-20160816; b=xjn/DETh+8x68N611WnKaSfyFKdLLHt1XlMoeuqKYog8WpaBi180xgndsWdfXf6Imd yhRhH/e1FqHCNC9CL3oSJsUXdlGgWuiGYG1byn4mj0r7K1bc+xjhlx9QfGu9RPtdoci5 Ku7b0Rif+RL26WtZEkXWai4jyg3BbYMlMxlI8wLfSz2hZlc6jQ/6T9o85QgA7z3PvNMa Gt+N+6/eOoB/eN3/RV64GE0x/UMcynoX346pKbrlOhbOTLOzhF6wIwOTVMqkaABz4qaC +j+1J+PJJRIktYLZeCKr3i1i6onSG5YfJnO71alNr/ZvNwco/4x0k9OH5SISXEgVS6EQ 8qPw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5WRC2ct8ce7LYoB+207S0DS7edcmGQvdvshtxrguoFk=; b=XB/xkCzR4C2Fgcz6Yo59DsO2BwUM6CMqvxJ2hdR9j7DyKRV7NEcmzrrjJbrz4BeK90 hgn0T+h2vwrdIgdxfWe8FHFm8hz6kHyTNEzlNhr3ZrNWGm7jTCCyMIKDUtvHDfp8jtoj 3MWnDiO6kLmP/zrJdLpeZJ8+DEF3/k3XovwHdRqpk60MWKdOZvmX+YoNHbYr2bqSsV+7 lQGOVqXSCMV+1IaIDDymLfzlAXVCoz2hy4nLqLsi8TU4c417NoZJqBY5mx2laN3wz03/ jen2oEMFbFXSCvm+uYvjxlWBrgb/I4QUUsIM2oRFgg0/vResd7uooEqOytiJfBInu1+K gJgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tjrT8N7S; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j40-20020a05640223a800b00418cc738a03si1120370eda.152.2022.03.15.08.27.39; Tue, 15 Mar 2022 08:28:04 -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=@linuxfoundation.org header.s=korg header.b=tjrT8N7S; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241327AbiCNMZA (ORCPT + 99 others); Mon, 14 Mar 2022 08:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241813AbiCNMSZ (ORCPT ); Mon, 14 Mar 2022 08:18:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9CFF264D; Mon, 14 Mar 2022 05:13:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3256F6139D; Mon, 14 Mar 2022 12:13:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41515C340ED; Mon, 14 Mar 2022 12:13:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259984; bh=x8ZDC68Cp5usz1aT+VE2TNb5XMwJpsLwMUxX0tjgTFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tjrT8N7SqCWf/cFCIQzloXGbB4Sely2ZWWF2fuxsLe3XvALJtx+OQ+vuL629SH71H nwx5jqti+curogXwprtzgCWhINC59m0mtuXncPRQyUKx8tYbGpuWODnDyrRyhKMXAp oMwzXuez8hbthfssfx1GMuap4JObzWGgjZtQ/VSo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Taniya Das , Bjorn Andersson , Stephen Boyd , Sasha Levin Subject: [PATCH 5.16 007/121] clk: qcom: dispcc: Update the transition delay for MDSS GDSC Date: Mon, 14 Mar 2022 12:53:10 +0100 Message-Id: <20220314112744.330030133@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Taniya Das [ Upstream commit 6e6fec3f961c00ca34ffb4bf2ad9febb4b499f8d ] On SC7180 we observe black screens because the gdsc is being enabled/disabled very rapidly and the GDSC FSM state does not work as expected. This is due to the fact that the GDSC reset value is being updated from SW. The recommended transition delay for mdss core gdsc updated for SC7180/SC7280/SM8250. Fixes: dd3d06622138 ("clk: qcom: Add display clock controller driver for SC7180") Fixes: 1a00c962f9cd ("clk: qcom: Add display clock controller driver for SC7280") Fixes: 80a18f4a8567 ("clk: qcom: Add display clock controller driver for SM8150 and SM8250") Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20220223185606.3941-2-tdas@codeaurora.org Reviewed-by: Bjorn Andersson [sboyd@kernel.org: lowercase hex] Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/qcom/dispcc-sc7180.c | 5 ++++- drivers/clk/qcom/dispcc-sc7280.c | 5 ++++- drivers/clk/qcom/dispcc-sm8250.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/dispcc-sc7180.c b/drivers/clk/qcom/dispcc-sc7180.c index 538e4963c915..5d2ae297e741 100644 --- a/drivers/clk/qcom/dispcc-sc7180.c +++ b/drivers/clk/qcom/dispcc-sc7180.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, 2022, The Linux Foundation. All rights reserved. */ #include @@ -625,6 +625,9 @@ static struct clk_branch disp_cc_mdss_vsync_clk = { static struct gdsc mdss_gdsc = { .gdscr = 0x3000, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, .pd = { .name = "mdss_gdsc", }, diff --git a/drivers/clk/qcom/dispcc-sc7280.c b/drivers/clk/qcom/dispcc-sc7280.c index 4ef4ae231794..ad596d567f6a 100644 --- a/drivers/clk/qcom/dispcc-sc7280.c +++ b/drivers/clk/qcom/dispcc-sc7280.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2021-2022, The Linux Foundation. All rights reserved. */ #include @@ -787,6 +787,9 @@ static struct clk_branch disp_cc_sleep_clk = { static struct gdsc disp_cc_mdss_core_gdsc = { .gdscr = 0x1004, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, .pd = { .name = "disp_cc_mdss_core_gdsc", }, diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c index 566fdfa0a15b..db9379634fb2 100644 --- a/drivers/clk/qcom/dispcc-sm8250.c +++ b/drivers/clk/qcom/dispcc-sm8250.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020, 2022, The Linux Foundation. All rights reserved. */ #include @@ -1126,6 +1126,9 @@ static struct clk_branch disp_cc_mdss_vsync_clk = { static struct gdsc mdss_gdsc = { .gdscr = 0x3000, + .en_rest_wait_val = 0x2, + .en_few_wait_val = 0x2, + .clk_dis_wait_val = 0xf, .pd = { .name = "mdss_gdsc", }, -- 2.34.1