Patch "drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-mediatek-mtk_dsi-fix-no_eot_packet-settings-hand.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 92af9604cf6217e9f73f99acc855ba3d1fce13bd
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
Date:   Tue May 23 12:42:34 2023 +0200

    drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling
    
    [ Upstream commit 5855d422a6f250f3518f43b49092c8e87a5e42be ]
    
    Due to the initial confusion about MIPI_DSI_MODE_EOT_PACKET, properly
    renamed to MIPI_DSI_MODE_NO_EOT_PACKET, reflecting its actual meaning,
    both the DSI_TXRX_CON register setting for bit (HSTX_)DIS_EOT and the
    later calculation for horizontal sync-active (HSA), back (HBP) and
    front (HFP) porches got incorrect due to the logic being inverted.
    
    This means that a number of settings were wrong because....:
     - DSI_TXRX_CON register setting: bit (HSTX_)DIS_EOT should be
       set in order to disable the End of Transmission packet;
     - Horizontal Sync and Back/Front porches: The delta used to
       calculate all of HSA, HBP and HFP should account for the
       additional EOT packet.
    
    Before this change...
     - Bit (HSTX_)DIS_EOT was being set when EOT packet was enabled;
     - For HSA/HBP/HFP delta... all three were wrong, as words were
       added when EOT disabled, instead of when EOT packet enabled!
    
    Invert the logic around flag MIPI_DSI_MODE_NO_EOT_PACKET in the
    MediaTek DSI driver to fix the aforementioned issues.
    
    Fixes: 8b2b99fd7931 ("drm/mediatek: dsi: Fine tune the line time caused by EOTp")
    Fixes: c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register definition")
    Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
    Reviewed-by: Alexandre Mergnat <amergnat@xxxxxxxxxxxx>
    Tested-by: Michael Walle <mwalle@xxxxxxxxxx>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/20230523104234.7849-1-angelogioacchino.delregno@xxxxxxxxxxxxx/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 7d52503511936..b0ab38e59db9d 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);
@@ -484,7 +484,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
 			  timing->da_hs_zero + timing->da_hs_exit + 3;
 
 	delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
-	delta += dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET ? 2 : 0;
+	delta += dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET ? 0 : 2;
 
 	horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
 	horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux