]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mediatek: implement the DSI HS packets aligned
authorRex-BC Chen <rex-bc.chen@mediatek.com>
Wed, 9 Mar 2022 07:36:36 +0000 (15:36 +0800)
committerRobert Foss <robert.foss@linaro.org>
Wed, 9 Mar 2022 13:14:38 +0000 (14:14 +0100)
commit5df3206fe2688e173166551e8e656c9d447fc0aa
treedd1537dee761d21f9d15b8f703b21e3a4641ed4e
parentab141d0357fce2c46c77a12ecc49d1e2ab1932f4
drm/mediatek: implement the DSI HS packets aligned

Some DSI RX devices (for example, anx7625) require last alignment of
packets on all lanes after each row of data is sent.
Otherwise, there will be some issues of shift or scroll for screen.

Take horizontal_sync_active_byte for a example,
we roundup the HSA packet data to lane number, and the subtraction of 2
is the packet data value added by the roundup operation, making the
long packets are integer multiples of lane number.
This value (2) varies with the lane number, and that is the reason we
do this operation when the lane number is 4.

In the previous operation of function "mtk_dsi_config_vdo_timing",
the length of HSA and HFP data packets has been adjusted to an
integration multiple of lane number.
Since the number of RGB data packets cannot be guaranteed to be an
integer multiple of lane number, we modify the data packet length of
HBP so that the number of HBP + RGB is equal to the lane number.
So after sending a line of data (HSA + HBP + RGB + HFP), the data
lanes are aligned.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220309073637.3591-3-rex-bc.chen@mediatek.com
drivers/gpu/drm/mediatek/mtk_dsi.c