From patchwork Wed Oct 19 08:29:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4759 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214719wrs; Wed, 19 Oct 2022 02:13:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6xuy4+leHUGpPm4VCZtjBG03/fJ9CrW9HIPwquiKAPJ1Pcr9i6m4GNBuQ0rdIICG/UoIC3 X-Received: by 2002:a05:6402:5406:b0:452:1560:f9d4 with SMTP id ev6-20020a056402540600b004521560f9d4mr6539350edb.333.1666170815652; Wed, 19 Oct 2022 02:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170815; cv=none; d=google.com; s=arc-20160816; b=ebkevBd6l5a8h+c0fmq85ldCz5OTHUKHCs+Nblx4EdPBCundcxnS4dqknOQG0M7tWg fvTbUt9FA5G8wN2z0tBa41a0JbuzLqjqcrTK3usl9cEXqUGnWynETNR96sFpcdIm9Zvg ke8csSYMcGg8QgkP3Ep7IHavuyKiOl2rVQVIDrJCRtucGHkPLclGH0aWMvL/hZK4B7ts 5bKLfxcLdQPABBIjGlJmU9+q87vzXyN2jhhtUsGWfuNTKE9SGuqSLQ2ZoYHmlDC34yhh u59bgC1N7B4AhXHVyn9kJtNdoRXKMn5S+qbFzpKCvn/yb6jaq+VAPjzReo1Ww8qMBLUO tK3A== 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=jLm5uaBGt4BJh5o4N+sepa/srcYClIlTwl9mZ+EqLJmuxs0x5HyTXlXf1lHJgqcTx9 TzxHdrfbIGOS5LbQolJqfASB8KuOA/tskV25ocYvWXrIgHm35h7vFa4MiY9fR0J/rMSW w6qipRhFX0MVT0lvN+zXDT6kcdD/9RBu9z47eOxO4ajNIi85wqVjBIFIEn3jw3mt97fs VOnU2GKftZmemTKPIuX/ny85LKLf1qA+o+gL//Jr7SL4zCloJCI8gmG0WoQt+2550uxT iIuimD2Rr8ww01e8Q6COKOl19nsHPXKlsR3fPO5L5qEbSlnd67Yd7m8iciz5rNO6pO+d JxwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FSifBRDa; 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 qb7-20020a1709077e8700b007878f030816si13756988ejc.109.2022.10.19.02.13.11; Wed, 19 Oct 2022 02:13:35 -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=FSifBRDa; 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 S232473AbiJSJMO (ORCPT + 99 others); Wed, 19 Oct 2022 05:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbiJSJJb (ORCPT ); Wed, 19 Oct 2022 05:09:31 -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 BE9CC69F7B; Wed, 19 Oct 2022 02:00:37 -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 72B8A61800; Wed, 19 Oct 2022 09:00:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88112C4314B; Wed, 19 Oct 2022 09:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170032; bh=V8S7SxBGkVwHx+dCHsBMJlF/8c04H0jASveOhijYiOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FSifBRDaNfz1vVMht6SF2SR3DZC3+RaHWQOtSvsLVgJcvt2Zz24Xct9AT/slzO7Th ziCvKsVphSvwghAl6t4cFwWl2twc+WK81LCFICpO33hLlfjTyr2YgCpCMoJ7YW7qRg LRZGQx/hTqmYHUuXJ27gk9NJ/0piFw3rqEVFRe4o= 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 501/862] clk: mediatek: clk-mt8195-vdo1: Reparent and set rate on vdo1_dpintfs parent Date: Wed, 19 Oct 2022 10:29:48 +0200 Message-Id: <20221019083312.129838374@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?1747106729271958321?= X-GMAIL-MSGID: =?utf-8?q?1747106729271958321?= 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),