Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp329777qtb; Wed, 19 Oct 2022 03:08:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zLzKpMDCVUppbQCv4WzNYISCg8lMksySBOztO/2nSjwekfoxw5sG3oWrq3fNUgKWmDTup X-Received: by 2002:a65:674e:0:b0:43c:3b91:236e with SMTP id c14-20020a65674e000000b0043c3b91236emr6587778pgu.510.1666174101459; Wed, 19 Oct 2022 03:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174101; cv=none; d=google.com; s=arc-20160816; b=Af1ksHZQ+bnyFO7PlrCZoiwS+hpOFodoZ+ZMz1A0aisu4DuOFaumxP5FJrB964vKX9 uDN6bWlpD3zdkP//I6QFjKgESYbHUTM8fsm2+waaRvitTzs6atEz6PtciwkjV8MB5jGm JEqRs/KL5Hxlhfx6CcnZzTB3mvvzyfSnQoHgSyOXuFOIa85wVm3fVNIoRlrUZkV/jeVV P1BFCEDFSAsLHXGVxUEmbChXxtHY34MSksrXE56PA4s7oDSZGppuiWpHAixONkSYrkRS HgcKhWs2Zvvv/ZvOHWp09YoWGPRGi5/e7+uQ9THYJ6T72sRJH3gcnuSv5gV3OkcBtMqm iAiQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a635447000000b0041a4bf40469si18914299pgm.271.2022.10.19.03.08.07; Wed, 19 Oct 2022 03:08:21 -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=20F . =20R . =20A . =20Prado?=" , 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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) -- 2.35.1