diff mbox series

drm/mediatek: dsi: Fix EOTp generation

Message ID 20230915075756.263591-1-mwalle@kernel.org (mailing list archive)
State New, archived
Headers show
Series drm/mediatek: dsi: Fix EOTp generation | expand

Commit Message

Michael Walle Sept. 15, 2023, 7:57 a.m. UTC
The commit c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register
definition") inverted the logic of the control bit. Maybe it was because
of the bad naming which was fixed in commit 0f3b68b66a6d ("drm/dsi: Add
_NO_ to MIPI_DSI_* flags disabling features"). In any case, the logic
wrong and there will be no EOTp on the DSI link by default. Fix it.

Fixes: c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register definition")
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

AngeloGioacchino Del Regno Sept. 15, 2023, 8:58 a.m. UTC | #1
Il 15/09/23 09:57, Michael Walle ha scritto:
> The commit c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register
> definition") inverted the logic of the control bit. Maybe it was because
> of the bad naming which was fixed in commit 0f3b68b66a6d ("drm/dsi: Add
> _NO_ to MIPI_DSI_* flags disabling features"). In any case, the logic
> wrong and there will be no EOTp on the DSI link by default. Fix it.
> 
> Fixes: c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register definition")
> Signed-off-by: Michael Walle <mwalle@kernel.org>

Hello Michael,
your commit is missing a small piece! :-)

Besides, I've already sent a fix for what you're trying to do here:
https://lore.kernel.org/linux-arm-kernel/07c93d61-c5fd-f074-abb2-73fdaa81fd65@collabora.com/T/

Cheers,
Angelo

> ---
>   drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index d67e5c61a9b9..8024b20f6b13 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -407,7 +407,7 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
>   	if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
>   		tmp_reg |= HSTX_CKLP_EN;
>   
> -	if (!(dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET))
> +	if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)
>   		tmp_reg |= DIS_EOT;
>   
>   	writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);
Michael Walle Sept. 15, 2023, 9:01 a.m. UTC | #2
Hi,

Am 2023-09-15 10:58, schrieb AngeloGioacchino Del Regno:
> Il 15/09/23 09:57, Michael Walle ha scritto:
>> The commit c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register
>> definition") inverted the logic of the control bit. Maybe it was 
>> because
>> of the bad naming which was fixed in commit 0f3b68b66a6d ("drm/dsi: 
>> Add
>> _NO_ to MIPI_DSI_* flags disabling features"). In any case, the logic
>> wrong and there will be no EOTp on the DSI link by default. Fix it.
>> 
>> Fixes: c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register 
>> definition")
>> Signed-off-by: Michael Walle <mwalle@kernel.org>
> 
> Hello Michael,
> your commit is missing a small piece! :-)
> 
> Besides, I've already sent a fix for what you're trying to do here:
> https://lore.kernel.org/linux-arm-kernel/07c93d61-c5fd-f074-abb2-73fdaa81fd65@collabora.com/T/

Ahh thanks, didn't noticed this. If not already applied, I'll send
a Tested-by: later.

Please disregard this patch then.

-michael
AngeloGioacchino Del Regno Sept. 15, 2023, 9:02 a.m. UTC | #3
Il 15/09/23 11:01, Michael Walle ha scritto:
> Hi,
> 
> Am 2023-09-15 10:58, schrieb AngeloGioacchino Del Regno:
>> Il 15/09/23 09:57, Michael Walle ha scritto:
>>> The commit c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register
>>> definition") inverted the logic of the control bit. Maybe it was because
>>> of the bad naming which was fixed in commit 0f3b68b66a6d ("drm/dsi: Add
>>> _NO_ to MIPI_DSI_* flags disabling features"). In any case, the logic
>>> wrong and there will be no EOTp on the DSI link by default. Fix it.
>>>
>>> Fixes: c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register definition")
>>> Signed-off-by: Michael Walle <mwalle@kernel.org>
>>
>> Hello Michael,
>> your commit is missing a small piece! :-)
>>
>> Besides, I've already sent a fix for what you're trying to do here:
>> https://lore.kernel.org/linux-arm-kernel/07c93d61-c5fd-f074-abb2-73fdaa81fd65@collabora.com/T/
> 
> Ahh thanks, didn't noticed this. If not already applied, I'll send
> a Tested-by: later.
> 

No worries, it happens.

Cheers,
Angelo

> Please disregard this patch then.
> 
> -michael
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index d67e5c61a9b9..8024b20f6b13 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -407,7 +407,7 @@  static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi)
 	if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
 		tmp_reg |= HSTX_CKLP_EN;
 
-	if (!(dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET))
+	if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)
 		tmp_reg |= DIS_EOT;
 
 	writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL);