Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp381945rwd; Thu, 8 Jun 2023 01:58:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6gDdT7aUTg7wzF0SmApY9fj1bcldMF3MYpGztBREi/FbB5Ujn3ZlTMvfLNmulgSV18gIyA X-Received: by 2002:a05:6808:3c2:b0:396:25bd:5eb3 with SMTP id o2-20020a05680803c200b0039625bd5eb3mr7532029oie.33.1686214692078; Thu, 08 Jun 2023 01:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686214692; cv=none; d=google.com; s=arc-20160816; b=EuXm5C2ZMEMZF3yKhzJcMRtf38WRIqgpEX1khTVPIL2Y55yhzfoUWlNGLVUv0R8vfE j5DsAInPK8laFipvC9wWR25e7xbFMZlFrKSPqnaYzCnAlXX4297J7b5Rw+oIvSH+ZxUi kWGYdtt/NyndPsf01X2HA1GUsooRWcBJ8jY9RvyOyGDGJBETWMP54SgKSTdBsVGfNdwH DypYiou9vwRJkNjFr3Zx+yG7y5NR1T3sa0ZenCV2QGWc305pMNq+JNXyjBKrSkwhhSIa kKT2rMg/jPY4CelTlvPfpHSx3p4mDgf7FSd7SfgqXOk6wvQx3uoJcHxakzsPogOgJslB /XZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=adTcZBz9OWDd0YL3dj8Mz3hmg8bus1P++ghuh8zcc84=; b=BckAimtwsZk5/PhF5x636xFXK41Ckq/9Uc7Hcz/shrYmebhAgE4wTvM2GPX8e5l/iE nzsotuyXwFO3Zc1DTK+5+jy91caTblMnYZrfaqCoEsOR43Ewv66bHpKyRvbRVZVBU9bG +hRd8EFSKybxE5/ECLNNq0LwQXZipB1RQiK41+KoxM4pItPy1eh0+c80KVt3EJEXU7Ma gDCBCIOVCeKDL7UneBXu2ookMqb/+IZFuqiPxrxH0u9ovkMgV+Fsx94gBf495TEPBGWO HIUYCAbM0FB35snvMOLudIqVS0BnJ8WfkPHWeF0F5B7EQgYJ0rzU2/8isskEhLayUF1j 7OLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U3ly+JKp; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b0053fbacdaf5asi648713pgv.759.2023.06.08.01.57.58; Thu, 08 Jun 2023 01:58:12 -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=@collabora.com header.s=mail header.b=U3ly+JKp; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235213AbjFHIx6 (ORCPT + 99 others); Thu, 8 Jun 2023 04:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234447AbjFHIxy (ORCPT ); Thu, 8 Jun 2023 04:53:54 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D71EF2729; Thu, 8 Jun 2023 01:53:52 -0700 (PDT) Received: from [IPV6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab] (unknown [IPv6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 9C8D66606F17; Thu, 8 Jun 2023 09:53:50 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1686214431; bh=96X6k5oqBvIX1dBppWoB2S5z/C5qU+MMBXm3vBPWtl0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=U3ly+JKpH51mwz8/4HmOI/6l6O91KLGeLtbNFx5lDpKMqv7TQ1mITadLrC40Su0BQ QeRZtJIOhqTf/qwTJm/cqhT5+Cs1sp0y/uUMpZqu0LsaPGIDH0oVMkYtrTQ0THqqWS 8/31HkQESvhMEK2XMNloIwjBBUbQzCgQa1fvDLhbn32ipbD0dqkUJM6HsEuAteAkib WYfcG5cleEOcK2/o+RH6gjQqsF0Qjo4AfOZPwUgeWGsX/7LccV0RiClCGDyabE/rd2 VzzDqxDow1OjcBisJ9WaIL7Pvhpi33MgY5E+SdEhBPyilu9EIz8kimWqBEhVTMnaIg kYcYMRlXm2qDw== Message-ID: <38e5ffa2-93bd-ce70-ec00-6d61bad969c7@collabora.com> Date: Thu, 8 Jun 2023 10:53:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2 4/5] clk: mediatek: mt8183: Add CLK_VDEC_ACTIVE to vdec Content-Language: en-US To: Chen-Yu Tsai , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Cc: Matthias Brugger , Hans Verkuil , kernel@collabora.com, Conor Dooley , Krzysztof Kozlowski , Michael Turquette , Miles Chen , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org References: <20230607205714.510012-1-nfraprado@collabora.com> <20230607205714.510012-5-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Il 08/06/23 09:43, Chen-Yu Tsai ha scritto: > On Thu, Jun 8, 2023 at 4:57 AM Nícolas F. R. A. Prado > wrote: >> >> Add the CLK_VDEC_ACTIVE clock to the vdec clock driver. This clock is >> enabled by the VPU once it starts decoding. >> >> Signed-off-by: Nícolas F. R. A. Prado >> >> --- >> >> Changes in v2: >> - Added CLK_IGNORE_UNUSED flag >> >> drivers/clk/mediatek/clk-mt8183-vdec.c | 5 +++++ >> include/dt-bindings/clock/mt8183-clk.h | 3 ++- >> 2 files changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/clk/mediatek/clk-mt8183-vdec.c b/drivers/clk/mediatek/clk-mt8183-vdec.c >> index 513b7956cbea..03c4f1acfdb8 100644 >> --- a/drivers/clk/mediatek/clk-mt8183-vdec.c >> +++ b/drivers/clk/mediatek/clk-mt8183-vdec.c >> @@ -27,6 +27,10 @@ static const struct mtk_gate_regs vdec1_cg_regs = { >> GATE_MTK(_id, _name, _parent, &vdec0_cg_regs, _shift, \ >> &mtk_clk_gate_ops_setclr_inv) >> >> +#define GATE_VDEC0(_id, _name, _parent, _shift) \ >> + GATE_MTK_FLAGS(_id, _name, _parent, &vdec0_cg_regs, _shift, \ >> + &mtk_clk_gate_ops_setclr, CLK_IGNORE_UNUSED) > > I think what you want is a read-only gate clock only used for reading back > the status. The ops would only have .is_enabled. Technically, you're right... but I would delay the introduction of a RO GATE_MTK clock for later, as it's not worth adding that for just one clock driver usage. We're checking if the same can be applied to other SoCs as well - if it can, then it would make sense to do that (small, yes), work... the point here is to enable MT8183 decoders ASAP to enable decoder tests in KernelCI, along with all of the other MediaTek Chromebooks. Though, if you think that it is a good idea to add a RO gate right now, I don't have any strong opinions against that. Cheers, Angelo