From patchwork Sat Oct 22 07:24:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1098289wrr; Sat, 22 Oct 2022 01:10:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HliEUFq9ejMMKv7OkuS8YMu/ge8IffqMqN8VWNUm4rnZr+7oJOIHsh7gtg9TFXm3TaMZD X-Received: by 2002:a63:d145:0:b0:443:c25f:5dd5 with SMTP id c5-20020a63d145000000b00443c25f5dd5mr19621502pgj.554.1666426219290; Sat, 22 Oct 2022 01:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426219; cv=none; d=google.com; s=arc-20160816; b=vOZ8L4i4s29IUF99V6CECAG44IYQt2xmGSH4tCrrS60mNulmclHMVI7KlP3w46J8Ut v7FOJJvcCDVokMhdn6ABL+GuQZuJCiXUuABg8eUQTrsBhcN6iZ9S3WdMsXx/y+m2djeo jAL8qviqsjqXpLrag3TOGt1DkStFEJS73dJXotTA5Dnk/SamMolkmGbw892AYGdFRLNA aOFVTvMBk8+HWbybYB1LT4rQ0AZLRRzfkNdVydoBRcEjM+fokUmZfrWmVoLv0SGo9VXV KtZRfUgU5aMElNwC8kLZPkAHVQf0N8+vHFZs2fk6lRlxoQZYwipBcmX+3P58iSKzkmcb +tsA== 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=1do91zy/QwzyjNEui/ffbNraRH1cttQQJW7EHx/Phmw=; b=xV/rOszxlcbb+COHG6RG29YTDpHHC8YQUe4Hx4gef5uu63HBLAt8I4GGjjSIyrvuBm P3rnPnJV3MnWrc6Jr/jiFz69zCTY+BFTK5SQNqOIPE2ouge7iNTVWULRk+w4dehwz6QC blZwc2k7UqHycQEm2enAA2qbJhODJC73zXj90MUaOc7jtlaBGJ2IQw7GxBTSJJbkVerY NUu6v5M2PNlbZQyKK6Vky+4Tp44aTgbE6w/O7xGMXUiRnQoJi35Vya97cmzWpm1yfWLS tjVZja8XuEp9i5JQ/KHtCDIX9qtkJJ7EhKKFqPWJi6MLckTRL8JQzMeZuN9h9FBlT681 yitg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LhQY8T0T; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a056a00178f00b00536ee478380si31310773pfg.7.2022.10.22.01.10.06; Sat, 22 Oct 2022 01:10:19 -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=LhQY8T0T; 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 S233205AbiJVIJP (ORCPT + 99 others); Sat, 22 Oct 2022 04:09:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233126AbiJVIEz (ORCPT ); Sat, 22 Oct 2022 04:04:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 208B72D447B; Sat, 22 Oct 2022 00:52:27 -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 C564F60AC3; Sat, 22 Oct 2022 07:52:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9E8DC433C1; Sat, 22 Oct 2022 07:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425146; bh=WowgQztTNsEsUrr75qTilpPvrPbPyfSJgZpDw7HExZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LhQY8T0TeNEYLikFWkwFRNsVpN0C02hbgXGw/Cd7xKNZzSs7YuNG0BM4/MmXA1Xdu +xWvor2MzwHZ8p23P2hp2uDVQfl9vi2ZBgue3CTL3O8hAfT46e7ucWWrVFdZUTb4PR qgaJrLDJSA9XaEGgbEoPx2mSF0/esLyXwDJ4X6xI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, AngeloGioacchino Del Regno , Bo-Chen Chen , " =?utf-8?q?N=C3=ADcolas_F_=2E__R_?= =?utf-8?q?=2E__A_=2E__Prado?= " , Stephen Boyd , Sasha Levin Subject: [PATCH 5.19 406/717] clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intfs parent Date: Sat, 22 Oct 2022 09:24:45 +0200 Message-Id: <20221022072515.937196337@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_HI,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747374539036181474?= X-GMAIL-MSGID: =?utf-8?q?1747374539036181474?= From: AngeloGioacchino Del Regno [ Upstream commit 3f0dadd230cc2630202a977fe52cd1dd7a7579a7 ] Add the CLK_SET_RATE_PARENT flag to the CLK_VDO0_DP_INTF0_DP_INTF clock: this is required to trigger clock source selection on CLK_TOP_EDP, while avoiding to manage the enablement of the former separately from the latter in the displayport driver. Fixes: 70282c90d4a2 ("clk: mediatek: Add MT8195 vdosys0 clock support") Signed-off-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Reviewed-by: Bo-Chen Chen Signed-off-by: NĂ­colas F. R. A. Prado Link: https://lore.kernel.org/r/20220816193257.658487-2-nfraprado@collabora.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/mediatek/clk-mt8195-vdo0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt8195-vdo0.c b/drivers/clk/mediatek/clk-mt8195-vdo0.c index 261a7f76dd3c..07b46bfd5040 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdo0.c +++ b/drivers/clk/mediatek/clk-mt8195-vdo0.c @@ -37,6 +37,10 @@ static const struct mtk_gate_regs vdo0_2_cg_regs = { #define GATE_VDO0_2(_id, _name, _parent, _shift) \ GATE_MTK(_id, _name, _parent, &vdo0_2_cg_regs, _shift, &mtk_clk_gate_ops_setclr) +#define GATE_VDO0_2_FLAGS(_id, _name, _parent, _shift, _flags) \ + GATE_MTK_FLAGS(_id, _name, _parent, &vdo0_2_cg_regs, _shift, \ + &mtk_clk_gate_ops_setclr, _flags) + static const struct mtk_gate vdo0_clks[] = { /* VDO0_0 */ GATE_VDO0_0(CLK_VDO0_DISP_OVL0, "vdo0_disp_ovl0", "top_vpp", 0), @@ -85,7 +89,8 @@ static const struct mtk_gate vdo0_clks[] = { /* VDO0_2 */ GATE_VDO0_2(CLK_VDO0_DSI0_DSI, "vdo0_dsi0_dsi", "top_dsi_occ", 0), GATE_VDO0_2(CLK_VDO0_DSI1_DSI, "vdo0_dsi1_dsi", "top_dsi_occ", 8), - GATE_VDO0_2(CLK_VDO0_DP_INTF0_DP_INTF, "vdo0_dp_intf0_dp_intf", "top_edp", 16), + GATE_VDO0_2_FLAGS(CLK_VDO0_DP_INTF0_DP_INTF, "vdo0_dp_intf0_dp_intf", + "top_edp", 16, CLK_SET_RATE_PARENT), }; static int clk_mt8195_vdo0_probe(struct platform_device *pdev)