[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <153dcb4f-4583-427e-83c7-bdd33e3b11aa@collabora.com>
Date: Tue, 20 Sep 2022 12:25:45 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Guillaume Ranquet <granquet@...libre.com>,
Vinod Koul <vkoul@...nel.org>, Stephen Boyd <sboyd@...nel.org>,
David Airlie <airlied@...ux.ie>,
Rob Herring <robh+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Daniel Vetter <daniel@...ll.ch>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
CK Hu <ck.hu@...iatek.com>, Jitao shi <jitao.shi@...iatek.com>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Kishon Vijay Abraham I <kishon@...com>,
Matthias Brugger <matthias.bgg@...il.com>
Cc: linux-mediatek@...ts.infradead.org,
dri-devel@...ts.freedesktop.org,
Pablo Sun <pablo.sun@...iatek.com>, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org,
Mattijs Korpershoek <mkorpershoek@...libre.com>,
linux-arm-kernel@...ts.infradead.org,
linux-phy@...ts.infradead.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v1 07/17] drm/mediatek: extract common functions from the
mtk hdmi driver
Il 19/09/22 18:56, Guillaume Ranquet ha scritto:
> Create a common "framework" that can be used to add support for
> different hdmi IPs within the mediatek range of products.
>
> Signed-off-by: Guillaume Ranquet <granquet@...libre.com>
>
> diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile
> index d4d193f60271..008ec69da67b 100644
> --- a/drivers/gpu/drm/mediatek/Makefile
> +++ b/drivers/gpu/drm/mediatek/Makefile
> @@ -22,7 +22,8 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o
>
> mediatek-drm-hdmi-objs := mtk_cec.o \
> mtk_hdmi.o \
abcd ... mtk_hdmi_common.o goes here :-)
> - mtk_hdmi_ddc.o
> + mtk_hdmi_ddc.o \
> + mtk_hdmi_common.o \
>
> obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index 5cd05d4fe1a9..837d36ec4d64 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -32,187 +32,18 @@
> #include <drm/drm_probe_helper.h>
>
> #include "mtk_cec.h"
> -#include "mtk_hdmi.h"
> #include "mtk_hdmi_regs.h"
> +#include "mtk_hdmi_common.h"
>
> #define NCTS_BYTES 7
>
> -enum mtk_hdmi_clk_id {
> - MTK_HDMI_CLK_HDMI_PIXEL,
> - MTK_HDMI_CLK_HDMI_PLL,
> - MTK_HDMI_CLK_AUD_BCLK,
> - MTK_HDMI_CLK_AUD_SPDIF,
> - MTK_HDMI_CLK_COUNT
> +const char * const mtk_hdmi_clk_names_mt8183[MTK_MT8183_HDMI_CLK_COUNT] = {
Why MT8183? This can be either MT8167 or MT2701... or, IMO more appropriately, you
should name the IP version.
Example: MTK_HDMIV123_CLK_COUNT (I don't know what IP version would that be!).
> + [MTK_MT8183_HDMI_CLK_HDMI_PIXEL] = "pixel",
> + [MTK_MT8183_HDMI_CLK_HDMI_PLL] = "pll",
> + [MTK_MT8183_HDMI_CLK_AUD_BCLK] = "bclk",
> + [MTK_MT8183_HDMI_CLK_AUD_SPDIF] = "spdif",
> };
>
Regards,
Angelo
Powered by blists - more mailing lists