From patchwork Sat Oct 22 07:24:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1120971wrr; Sat, 22 Oct 2022 02:27:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5//ECiwAF7vC2DtbrWlzT0wkyE5uPJBrydbHZ4dweSGYHlGBd0qjwLcfOApl6GYoAOWGFL X-Received: by 2002:a17:90b:4f87:b0:212:effe:bdd7 with SMTP id qe7-20020a17090b4f8700b00212effebdd7mr174383pjb.66.1666430823683; Sat, 22 Oct 2022 02:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666430823; cv=none; d=google.com; s=arc-20160816; b=K8PpPhyvn/lqFmyQ6BB82dFOW70TsRf8WPDto3a1BijdKsEtOr7QfNA86g4tlqTo55 pFM7iitZa7uPYxsTseMU07alIH6x10tqLXs1anFzcgURQKO6zrSiYdi5vdjFH7qAOS+J weyoy2Yo8jZSDbsel8t44hcTXdRbsZ6htGwddNwp3KLuHBpD1Y6uadtJBT6avwIUos8y NGXyqPslEKAjlcNAkDmim0ByEHa+ck/rdgMLC1pPBQPVsPoPoIKo+joTAB40/JQkqJzC VW3IALzpAqeqAuoJDGuXPjkLhZRK4cfGjIEQcFeM8nLur/z2o51TdFwxIHHAT4QAXn47 bOXA== 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=xcaWfqNDmOVLdeVF2tK6bZOHJBJmspAALR/QGSsfSLk=; b=XT9hSy6pI/TfrymglyD+IwuA3sCGuOi6n0szhFyp9Z8iumrbv9a+XDjr/aHhwdD0m6 m4G7VFUU2GxqsTfG0j3PZIS7AK0SazMaXgxmCzM/i/sidtQ32FJxFRDomEvPhfq2Za0X 5w6MzSlUgLeqjFcDcjN+nMrmUtFCJ3IEJYJ6EgHYu87yYQQQX12y8f8hJi7kiz7u1y9q d9J1qdgodPxDqDJX6GrOQ9DdGpPPOue868izT4BZd/5p3ta6hOSPPOqMHfvBo14Jv6l4 r8aPxq+oLoKrZI/LXlNQetrtWe5UfgdSNT+elFo0IqZZ/c4XKO94MAn4tuusi863ffOK gnxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CCUDfcxJ; 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 u20-20020a63b554000000b0046ec7b397e1si4024763pgo.759.2022.10.22.02.26.50; Sat, 22 Oct 2022 02:27:03 -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=CCUDfcxJ; 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 S231584AbiJVJEZ (ORCPT + 99 others); Sat, 22 Oct 2022 05:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235021AbiJVJDT (ORCPT ); Sat, 22 Oct 2022 05:03:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5D052FACD1; Sat, 22 Oct 2022 01:18: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 001A960B27; Sat, 22 Oct 2022 07:52:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA873C433D6; Sat, 22 Oct 2022 07:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425149; bh=V8S7SxBGkVwHx+dCHsBMJlF/8c04H0jASveOhijYiOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCUDfcxJSUQhf4D9cMTOoOGjRNPmPIqYLUxQJPRyfQlrpePI/fb8KUaZ+d63c5kRk aTcMuQZACZyOchXc1kmXXH+AD/3/bB/4r3FbM5Dz5uJVT6RW+0amPid2huOL2QUlUL vvi40sSzunW7aIJahqMrEnKJPj9c6Ldsj1sN0Oyc= 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 407/717] clk: mediatek: clk-mt8195-vdo1: Reparent and set rate on vdo1_dpintfs parent Date: Sat, 22 Oct 2022 09:24:46 +0200 Message-Id: <20221022072516.020571043@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?1747379367310866543?= X-GMAIL-MSGID: =?utf-8?q?1747379367310866543?= From: AngeloGioacchino Del Regno [ Upstream commit f24d71feb206631116ff9adaa6d43650c5dd8849 ] Like it was done for the vdo0_dp_intf0_dp_intf clock (used for eDP), add the CLK_SET_RATE_PARENT flag to CLK_VDO1_DPINTF (used for DP) and also fix its parent clock name as it has to be "top_dp" for two reasons: - This is its real parent! - Likewise to eDP/VDO0 counterpart, we need clock source selection on CLK_TOP_DP. Fixes: 269987505ba9 ("clk: mediatek: Add MT8195 vdosys1 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-3-nfraprado@collabora.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/mediatek/clk-mt8195-vdo1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt8195-vdo1.c b/drivers/clk/mediatek/clk-mt8195-vdo1.c index 3378487d2c90..d54d7726d186 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdo1.c +++ b/drivers/clk/mediatek/clk-mt8195-vdo1.c @@ -43,6 +43,10 @@ static const struct mtk_gate_regs vdo1_3_cg_regs = { #define GATE_VDO1_2(_id, _name, _parent, _shift) \ GATE_MTK(_id, _name, _parent, &vdo1_2_cg_regs, _shift, &mtk_clk_gate_ops_setclr) +#define GATE_VDO1_2_FLAGS(_id, _name, _parent, _shift, _flags) \ + GATE_MTK_FLAGS(_id, _name, _parent, &vdo1_2_cg_regs, _shift, \ + &mtk_clk_gate_ops_setclr, _flags) + #define GATE_VDO1_3(_id, _name, _parent, _shift) \ GATE_MTK(_id, _name, _parent, &vdo1_3_cg_regs, _shift, &mtk_clk_gate_ops_setclr) @@ -99,7 +103,7 @@ static const struct mtk_gate vdo1_clks[] = { GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPI0, "vdo1_disp_monitor_dpi0", "top_vpp", 1), GATE_VDO1_2(CLK_VDO1_DPI1, "vdo1_dpi1", "top_vpp", 8), GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPI1, "vdo1_disp_monitor_dpi1", "top_vpp", 9), - GATE_VDO1_2(CLK_VDO1_DPINTF, "vdo1_dpintf", "top_vpp", 16), + GATE_VDO1_2_FLAGS(CLK_VDO1_DPINTF, "vdo1_dpintf", "top_dp", 16, CLK_SET_RATE_PARENT), GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPINTF, "vdo1_disp_monitor_dpintf", "top_vpp", 17), /* VDO1_3 */ GATE_VDO1_3(CLK_VDO1_26M_SLOW, "vdo1_26m_slow", "clk26m", 8),