From patchwork Wed Oct 19 08:29:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4762 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214805wrs; Wed, 19 Oct 2022 02:13:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DVajo4MCG+dX49+69yy/Yksc6cGzXLnxjgv/38NiO3Sfg+Zb1wKPJK4cItrUqgcymhf7S X-Received: by 2002:a17:907:25c9:b0:77b:a343:bd62 with SMTP id ae9-20020a17090725c900b0077ba343bd62mr5960384ejc.660.1666170828888; Wed, 19 Oct 2022 02:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170828; cv=none; d=google.com; s=arc-20160816; b=U4N4tgnvbNYHsCX6+02KH4+WrDOW4mHT04PeegG2n3lYaxdvxT474mYuIZfMCCX5Q8 VNqbtcTRsUu5gBTSfK40FaFblct+9waH6E0H4vu9oaF6tV2APAlE/iMUggCjnJUxK0W7 HfUM7GuaQ8G+KXYssHL61pCUpHnd44p9YH1BarEiAqGXXxl1U/rOVV42NG8VLOHtweHK gvZ/xIGjsLsT1iGwxLgjE429VCeFmy7iijxOl2Aem9oYyyk7QIrytYyCHBxaduJ78kCn 1UI2PbWVT/4Tv7ns8xn1n78Ff+Y6WnILFsF3g1c0QqzPmDpp307hn2Md0MCpJLA0b/0j IcIA== 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=qINBIQLufZx7UEoj8Aw4dHAgFz9OkImXkbkeWwdYRJ+TVoho873q6uUX5EdWC0LXAm XMNdQiYnAa+kYrLyempIxe0AgU96/ZCGqXBqjR0JoMay67IpspeKb81piAcoj7Ddz/Z3 iSyp16SitV/8eVe1O+kvvqPEuAcdsT4yOgnZB+djeKTwqf0ON7KtMUk+xTp7hFWkD7rJ Lr4r7ZNerrukpxDTvyRSh9pEhvmZOMNBS+P+Hy3AZ9wi0a0yWbfZ8TFDNOFgmnVhb+uj 42OTM5tPYUOIaKJKJ0zmNb3HO/1mWDYGNaPA/RNlAEzt5ytDUF0jvPvTaGhllHdIR7o+ KNjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ljOVz0sQ; 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 v1-20020a056402348100b0045483f0426csi14494625edc.10.2022.10.19.02.13.24; Wed, 19 Oct 2022 02:13:48 -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=ljOVz0sQ; 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 S232929AbiJSJM1 (ORCPT + 99 others); Wed, 19 Oct 2022 05:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232949AbiJSJJp (ORCPT ); Wed, 19 Oct 2022 05:09:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B19180BE0; Wed, 19 Oct 2022 02:00:34 -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 BD7436174B; Wed, 19 Oct 2022 09:00:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1CECC433C1; Wed, 19 Oct 2022 09:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170030; bh=WowgQztTNsEsUrr75qTilpPvrPbPyfSJgZpDw7HExZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ljOVz0sQutCIfngdUI+FhnX7VaNezfIxWyKouA0YeuVIjxFypDLlr2wJGfeqPiA3X Rog+PZqkJ/GKIrdrn0Gzo/Ga8Kww62+2WjOTIDgCIHaLtivP4xa/KIGC2Lm+78aca/ 6hZkcJh80b35IZyA0SaRqDWVu5v3Q6m6zMLrAFzA= 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 6.0 500/862] clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intfs parent Date: Wed, 19 Oct 2022 10:29:47 +0200 Message-Id: <20221019083312.080562480@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106743442235080?= X-GMAIL-MSGID: =?utf-8?q?1747106743442235080?= 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)