Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3101317rdg; Tue, 17 Oct 2023 04:57:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7FnrtA6mPeB0aXwi+vTLYHVJY/ETepGpyBzlSMJ3HF4h0zEzoE5Dwvhi9lTjq6ZgnuRX2 X-Received: by 2002:a17:903:1246:b0:1c9:bca1:d70c with SMTP id u6-20020a170903124600b001c9bca1d70cmr2143949plh.30.1697543847666; Tue, 17 Oct 2023 04:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697543847; cv=none; d=google.com; s=arc-20160816; b=WYQSdxTgjoqPr2aQZ7mJMpuUhmMp9qeJ6Gq/ugKGCJeL7C+5vyW15fyJrKtBcJM+Va B2fSgTH1mskRVvOt8FDnvlOvnCxyGfLaUXNMCvAXVWB79A9vbzDQQcTtI48j0Te0KzQt cm8JGMnsookv+mHzlRY2kB8zxsl4aRrtSH3Ab+KBFmclc+cYDIPJm3N3o1cf0SPEMJRf QeQ7AEkYIT0iIxwnFm9AxM1es1V3SeKguJ04eHuwn6dgtEz7nVmWJCmY0cEM7fBmquoI h4tkIvX22KhTmsCqEHzlTaFiodYJAiBvkn9XlMxGmL5LikDXkK6ZyI5s12APigq05pP2 V4uw== 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=3f8o9PjXxUPwVElK1Y3ywIy3QQmJTQGDlfsj+b6JTwE=; fh=ZN/QytbyffgE7QepGv1tVdBQs9fxPzEzY3m+Ghu7r2I=; b=GJVen82hBGXpzo3n5hp/+VTU6mCiv6H5L3yN9e2YCg1u7ekfZ7bk/UR6ZTRPPkkKH0 wQ59Q1z/ckVggjmkPbamXBXafSnbTWDkOtEzURdE34SUcNBBhwYnFtUt9RC1wndWYv8k 1OzFNbHhNxqF6xk48gpNCrcnGs6IE2GvZYcn9nuqGLMl694hzOQOGAYIVvodWBrqVk92 VQSN5gj8DRqAklP/eAfDAzm22F1mcfOA4nWvsHe6P9PWdQc3zg90tPdIDwko5iUDUz9t MO2R27bdQaq0kMiIWlWoia292LB8SfRz1M7fasjmnnxqHJDS60lflZ6smMmKkcOX9SOP Sq9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ww2qGQ2R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id d18-20020a170903231200b001c5f5153e41si1751094plh.535.2023.10.17.04.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 04:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ww2qGQ2R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 597A180AB58C; Tue, 17 Oct 2023 04:57:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234608AbjJQL5T (ORCPT + 99 others); Tue, 17 Oct 2023 07:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233670AbjJQL5S (ORCPT ); Tue, 17 Oct 2023 07:57:18 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F82A4; Tue, 17 Oct 2023 04:57:16 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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 3F06566084C6; Tue, 17 Oct 2023 12:57:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697543835; bh=AyuqoMdszEZGzIWvv2uoi2F/5G+cqfsrjpIs6w3mh0I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ww2qGQ2R4Q6QkN5em1t0y5CZi7yoro3gEHwoYsemaDDR9jjn28lISZtaFBK22Z1fk Qi92yYJksMQk3MpU7+yeaK/LgcMWwAA5RfaB/1U51LpTELkztPmxND2KmcXhICOHtn GPmzSZVJjMD5HZGPIWJmpRH782qrcpshwshkEQlHvFs3fNlf4SV9qhEZcIJNgweKDI u4YeRzIOvORqPiLscuglPAvVuURm6xg6p4fCF08oJkvFpUMKxIpUu6nA2z+ZS9EhMX 53zsfsZi75dcGYTTo5cDDirk2VaTeIzEgyAEG0zjFTeaIbeXeQiEMPZeRHApfijy3r 9f6y9uDcT5T3A== Message-ID: Date: Tue, 17 Oct 2023 13:57:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 15/23] drm/mediatek: Manage component's clock with function pointers Content-Language: en-US To: =?UTF-8?B?U2hhd24gU3VuZyAo5a6L5a2d6KyZKQ==?= , =?UTF-8?B?Q0sgSHUgKOiDoeS/iuWFiSk=?= , "matthias.bgg@gmail.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" Cc: =?UTF-8?B?WW9uZ3FpYW5nIE5pdSAo54mb5rC45by6KQ==?= , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "chunkuang.hu@kernel.org" , =?UTF-8?B?SmFzb24tSkggTGluICjmnpfnnb/npaUp?= , "devicetree@vger.kernel.org" , =?UTF-8?B?TmFuY3kgTGluICjmnpfmrKPonqIp?= , =?UTF-8?B?TW91ZHkgSG8gKOS9leWul+WOnyk=?= , "daniel@ffwll.ch" , "p.zabel@pengutronix.de" , "mchehab@kernel.org" , "dri-devel@lists.freedesktop.org" , =?UTF-8?B?TmF0aGFuIEx1ICjlkYLmnbHpnJYp?= , "airlied@gmail.com" , "sean@poorly.run" , "hverkuil-cisco@xs4all.nl" , "linux-arm-kernel@lists.infradead.org" , "fshao@chromium.org" , "johnson.wang@mediatek.corp-partner.google.com" References: <20231016104010.3270-1-shawn.sung@mediatek.com> <20231016104010.3270-16-shawn.sung@mediatek.com> <91932706-c42c-4c10-96bd-c8a91b7d82f0@collabora.com> <714697a54f449cbc78620f7482ca78173fc94230.camel@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <714697a54f449cbc78620f7482ca78173fc94230.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 17 Oct 2023 04:57:25 -0700 (PDT) Il 17/10/23 12:50, Shawn Sung (宋孝謙) ha scritto: > Hi Angelo, > > On Tue, 2023-10-17 at 11:47 +0200, AngeloGioacchino Del Regno wrote: >> Il 16/10/23 12:40, Hsiao Chien Sung ha scritto: >>> By registering component related functions to the pointers, >>> we can easily manage them within a for-loop and simplify the >>> logic of clock control significantly. >>> >>> Reviewed-by: CK Hu >>> Signed-off-by: Hsiao Chien Sung >>> --- >>> .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 111 +++++++---- >>> ------- >>> 1 file changed, 44 insertions(+), 67 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c >>> b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c >>> index 60e5dfe9ef0d..fffef2a4f919 100644 >>> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c >>> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c >>> @@ -53,6 +53,7 @@ struct ovl_adaptor_comp_match { >>> enum mtk_ovl_adaptor_comp_type type; >>> enum mtk_ddp_comp_id comp_id; >>> int alias_id; >>> + const struct mtk_ddp_comp_funcs *funcs; >>> }; >>> >>> struct mtk_disp_ovl_adaptor { >>> @@ -67,20 +68,35 @@ static const char * const >>> private_comp_stem[OVL_ADAPTOR_TYPE_NUM] = { >>> [OVL_ADAPTOR_TYPE_MERGE] = "merge", >>> }; >>> >>> +static const struct mtk_ddp_comp_funcs _ethdr = { >> >> Sorry I just noticed that; can you please remove the leading "_" from >> all >> of those? >> >> _ethdr -> ethdr or mtk_ethdr >> _merge -> merge or mtk_merge >> _rdma -> rdma or mtk_rdma >> >> Thanks, >> Angelo >> > > Sure. Will do in the next version. > The reason I didn't use mtk_* is simply because of the column width > will exceed 100 characaters. > Okay that would not be good, I guess that just `ethdr`, `merge`, `rdma` will be fine then. Cheers, Angelo > Thanks, > Shawn