Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3040983rdg; Tue, 17 Oct 2023 02:48:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+RUZ03wT29jezHwpZ+8xxnaJR0yErVkyzC5lk9d8D0HuqB/1jnrjur4MBt6mSVrKxxP6X X-Received: by 2002:a05:6358:e820:b0:134:c37f:4b64 with SMTP id gi32-20020a056358e82000b00134c37f4b64mr1816578rwb.30.1697536096845; Tue, 17 Oct 2023 02:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697536096; cv=none; d=google.com; s=arc-20160816; b=EUca5nu6tTS1cJ6qvgm8ilNL1smDnhuwO/BKN+mk5cxAVvGum//dShGWX2C4hCz9qt SGo3WI4S7G3VDInmde43RtxX2Qi59+EmfPr/bvvCHinDpi7chZpR62L32XC1U0NiOhZY Fs5Li1VNvSIR+h6emU+LKOdy8+mB1VgmWAVYnUxpedwtCT4bkyrtNxZ4JqTg++XErXie bjpVPY6UIdgDzdV4pK4aReF32BqGvdX1NKm1r/r8R2y1b61YFcW9cM2CDTI2fnA1aNad ZSHUzpDTSWHN4/FpjbzjyVll8SNj4JlS/v7tW2VSVN4aOFnCQ4/f24NxerGCjgdXY+ZN +K2A== 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=OgnXaIDQZ3FYllOEY/M4ocMGMtdMS54WcuppmaHyUlU=; fh=W34SOItl1lj8wl9YrT4TiuLL50OQcdfIb7Xa0dpmCs0=; b=hCiM1RQ1UOb+iSu91H3V6NP4G3O2phIzPS9oO8uQXIUV9E7KF6WG9uVbZE8rfhyeJf 4tuu6L6bggdfN2MKnp+C5UuUMTps9GxefVqaVdUHNr+8qsDnAWprcNZeTriGmNa8uRkp ah8i1toyHiyBPORASlDBS1pmBv7bMr4+syv5v6xyMgus5n2AlBsPn25d/Vd/RFVcV650 kQ5MwawZp8itkNt9j41FX3568MbD76w72Gu33QYHdqAJalcYGM7buq6v4hTtlPtn/0oW oiMEy6qJshXejPEJneDZwvhdJ0sfJNE2Yc3TlYsaNkFh6lhxyhcpJYznWIL0gy+7eo/C sjRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=JnbVjhfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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. [23.128.96.38]) by mx.google.com with ESMTPS id v15-20020a056a00148f00b006b59f4771c5si1305332pfu.277.2023.10.17.02.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=JnbVjhfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 74289802CE60; Tue, 17 Oct 2023 02:48:14 -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 S234812AbjJQJsG (ORCPT + 99 others); Tue, 17 Oct 2023 05:48:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234788AbjJQJsF (ORCPT ); Tue, 17 Oct 2023 05:48:05 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EC4098; Tue, 17 Oct 2023 02:48:03 -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 01DCD66072C1; Tue, 17 Oct 2023 10:48:00 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697536082; bh=zm94jx7YZtaVKlcERgXxBphdF5yGXsd/A0Fvmcj8+3Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=JnbVjhfam8ag2lMmYL9z5UQJY6ILzE5PDc8fGi+zbhQlJmYKOL3oWmpa0cRix16Pj G1jsUUpafvlh+nWy/3FvpT3tyJ+vCRuuu2hNysRB5HR4NoGG/CNTkV5UP+GHEM1zoO tm4iTQvYNkjIi3TxmDtnlbwmNA9YZd96mJJ85ELBvfxntsf55F7N/Nz6zovDi7MhAe ixSt8gY8eMmtDe83XS2o9l/dmW3aUmdf1PTKOdXvHlXz92h7aU9wt/o0MhfxMYdKFy U7O6r3FoF0njaPNvx99l3bexMcYAEKtjqSbF9OrMzgARru7gS4YfSt+9TSEcT7MU7q YdC13KKrQGmkg== Message-ID: <91932706-c42c-4c10-96bd-c8a91b7d82f0@collabora.com> Date: Tue, 17 Oct 2023 11:47:57 +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: Hsiao Chien Sung , CK Hu , Krzysztof Kozlowski , Matthias Brugger , Rob Herring Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Fei Shao , Sean Paul , Johnson Wang , "Nancy . Lin" , Moudy Ho , "Jason-JH . Lin" , Nathan Lu , Yongqiang Niu , Hans Verkuil , Mauro Carvalho Chehab , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20231016104010.3270-1-shawn.sung@mediatek.com> <20231016104010.3270-16-shawn.sung@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20231016104010.3270-16-shawn.sung@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 02:48:14 -0700 (PDT) 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