public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Alexandre Mergnat <amergnat@baylibre.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Shuijing Li <shuijing.li@mediatek.com>,
	chunkuang.hu@kernel.org, p.zabel@pengutronix.de,
	airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	matthias.bgg@gmail.com, jitao.shi@mediatek.com
Cc: dri-devel@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v3,3/3] drm/mediatek: dp: Add the audio divider to mtk_dp_data struct
Date: Thu, 20 Jul 2023 14:29:47 +0200	[thread overview]
Message-ID: <16d2f0d7-f150-823b-b568-18f3bb6b2f77@baylibre.com> (raw)
In-Reply-To: <a48e9f99-2b93-9eb6-daef-be95a956c3d8@collabora.com>



On 20/07/2023 14:08, AngeloGioacchino Del Regno wrote:
> Il 20/07/23 14:07, Alexandre Mergnat ha scritto:
>>
>>
>> On 20/07/2023 13:54, AngeloGioacchino Del Regno wrote:
>>> Il 20/07/23 12:14, Alexandre Mergnat ha scritto:
>>>>
>>>>
>>>> On 20/07/2023 10:26, Shuijing Li wrote:
>>>>> Due to the difference of HW, different dividers need to be set.
>>>>>
>>>>> Signed-off-by: Shuijing Li <shuijing.li@mediatek.com>
>>>>> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
>>>>> ---
>>>>> Changes in v3:
>>>>> Separate these two things into two different patches.
>>>>> per suggestion from the previous thread:
>>>>> https://lore.kernel.org/lkml/e2ad22bcba31797f38a12a488d4246a01bf0cb2e.camel@mediatek.com/
>>>>> Changes in v2:
>>>>> - change the variables' name to be more descriptive
>>>>> - add a comment that describes the function of 
>>>>> mtk_dp_audio_sample_arrange
>>>>> - reduce indentation by doing the inverse check
>>>>> - add a definition of some bits
>>>>> - add support for mediatek, mt8188-edp-tx
>>>>> per suggestion from the previous thread:
>>>>> https://lore.kernel.org/lkml/ac0fcec9-a2fe-06cc-c727-189ef7babe9c@collabora.com/
>>>>> ---
>>>>>   drivers/gpu/drm/mediatek/mtk_dp.c     | 7 ++++++-
>>>>>   drivers/gpu/drm/mediatek/mtk_dp_reg.h | 1 +
>>>>>   2 files changed, 7 insertions(+), 1 deletion(-)
>>>>>
>> ...
>>>>> b/drivers/gpu/drm/mediatek/mtk_dp_reg.h
>>>>> index f38d6ff12afe..6d7f0405867e 100644
>>>>> --- a/drivers/gpu/drm/mediatek/mtk_dp_reg.h
>>>>> +++ b/drivers/gpu/drm/mediatek/mtk_dp_reg.h
>>>>> @@ -162,6 +162,7 @@
>>>>>   #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_MUL_2    (1 << 8)
>>>>>   #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_MUL_4    (2 << 8)
>>>>>   #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_MUL_8    (3 << 8)
>>>>> +#define MT8188_AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_DIV_2    (4 << 8)
>>>>
>>>> IMO, it's a bit weird to have SoC specific define in the generic 
>>>> header.
>>>> Are you sure this bit is only available for MT8188 ?
>>>>
>>>
>>> Eh, the P0_DIV2 bit is 5<<8 for MT8195, while for 8188 it's 4<<8, 
>>> clearly :-)
>>>
>>
>> Ok then, to avoid this kind of issue for other SoCs in the future, is 
>> that make sense for you to do a SoC specific header file beside the 
>> generic one?
>>
> 
> For just one definition? That's a bit overkill :-)
> 

You're right, but we must start somewhere ^^, and show the proper way 
for future patches. Actually, I gave my Reviewed-by because it's only 
one definition. This will be fixed later (I hope).

>>>>>   #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_DIV_2    (5 << 8)
>>>>>   #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_DIV_4    (6 << 8)
>>>>>   #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_DIV_8    (7 << 8)
>>>>
>>>> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
>>>>
>>>
>>>
>>
> 
> 

-- 
Regards,
Alexandre


  reply	other threads:[~2023-07-20 12:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20  8:26 [PATCH v3,0/3] Add compatible to increase MT8188 audio control Shuijing Li
2023-07-20  8:26 ` [PATCH v3,1/3] dt-bindings: display: mediatek: dp: Add compatible for MediaTek MT8188 Shuijing Li
2023-07-20  8:26 ` [PATCH v3,2/3] drm/mediatek: dp: Add the audio packet flag to mtk_dp_data struct Shuijing Li
2023-07-20  9:28   ` AngeloGioacchino Del Regno
2023-07-20  9:35   ` Alexandre Mergnat
2023-07-26  3:14   ` [PATCH v3, 2/3] " CK Hu (胡俊光)
2023-07-20  8:26 ` [PATCH v3,3/3] drm/mediatek: dp: Add the audio divider " Shuijing Li
2023-07-20  9:28   ` AngeloGioacchino Del Regno
2023-07-20 10:14   ` Alexandre Mergnat
2023-07-20 11:54     ` AngeloGioacchino Del Regno
2023-07-20 12:07       ` Alexandre Mergnat
2023-07-20 12:08         ` AngeloGioacchino Del Regno
2023-07-20 12:29           ` Alexandre Mergnat [this message]
2023-07-20 12:49             ` AngeloGioacchino Del Regno
2023-07-26  3:35   ` [PATCH v3, 3/3] " CK Hu (胡俊光)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16d2f0d7-f150-823b-b568-18f3bb6b2f77@baylibre.com \
    --to=amergnat@baylibre.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jitao.shi@mediatek.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=shuijing.li@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox