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)
commit399826037349cbaf556cd264b84bafde3537866f
treec1f107061f9c9206a41adccdbe6f9e695689a0bb
parent4225d5d5e779b859a6661130a3444eb4c5db77e5
drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize()

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