lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 07/17] drm/mediatek: extract common functions from the mtk hdmi driver
On Tue, 20 Sep 2022 12:25, AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>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@baylibre.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!).

You're right, the naming isn't great.
I'll ask mediatek if they have a good name that would regroup the "legacy"
HDMI IP and the new IP in mt8195.

Thx,
Guillaume.

>
>> + [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
>
>

\
 
 \ /
  Last update: 2022-09-27 15:10    [W:0.189 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site