]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize()
authorChun-Kuang Hu <chunkuang.hu@kernel.org>
Sat, 10 Aug 2024 09:09:14 +0000 (09:09 +0000)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Mon, 12 Aug 2024 13:31:22 +0000 (13:31 +0000)
For some client driver, it want to reduce latency between excuting
previous packet command and next packet command, so append jump
command to the end of previous packet and the jump destination
address is the start address of next packet command buffer. Before
next packet exist, the previous packet has no information of where
to jump to, so append nop command first. When next packet exist,
change nop command to jump command. For mediatek drm driver, it
never has next packet, so appending nop command is redundant.
Because cmdq_pkt_finalize() would append nop command, so change
calling cmdq_pkt_finalize() to cmdq_pkt_eoc() to prevent append
redundant nop command.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240810090918.7457-2-chunkuang.hu@kernel.org/
drivers/gpu/drm/mediatek/mtk_crtc.c

index 6f34f573e127ecc0a4e8c2345fbce896f40bc8c0..a1976c3ae0017c974746adab9936b46a9eee9f88 100644 (file)
@@ -607,7 +607,7 @@ static void mtk_crtc_update_config(struct mtk_crtc *mtk_crtc, bool needs_vblank)
                cmdq_pkt_clear_event(cmdq_handle, mtk_crtc->cmdq_event);
                cmdq_pkt_wfe(cmdq_handle, mtk_crtc->cmdq_event, false);
                mtk_crtc_ddp_config(crtc, cmdq_handle);
-               cmdq_pkt_finalize(cmdq_handle);
+               cmdq_pkt_eoc(cmdq_handle);
                dma_sync_single_for_device(mtk_crtc->cmdq_client.chan->mbox->dev,
                                           cmdq_handle->pa_base,
                                           cmdq_handle->cmd_buf_size,