kernel_samsung_a53x/drivers/gpu/drm/mediatek
AngeloGioacchino Del Regno 10ee6afef6 drm/mediatek: dsi: Fix DSI RGB666 formats and definitions
[ Upstream commit fae6f815505301b92d9113764f4d76d0bfe45607 ]

The register bits definitions for RGB666 formats are wrong in multiple
ways: first, in the DSI_PS_SEL bits region, the Packed 18-bits RGB666
format is selected with bit 1, while the Loosely Packed one is bit 2,
and second - the definition name "LOOSELY_PS_18BIT_RGB666" is wrong
because the loosely packed format is 24 bits instead!

Either way, functions mtk_dsi_ps_control_vact() and mtk_dsi_ps_control()
do not even agree on the DSI_PS_SEL bit to set in DSI_PSCTRL: one sets
loosely packed (24) on RGB666, the other sets packed (18), and the other
way around for RGB666_PACKED.

Fixing this entire stack of issues is done in one go:
 - Use the correct bit for the Loosely Packed RGB666 definition
 - Rename LOOSELY_PS_18BIT_RGB666 to LOOSELY_PS_24BIT_RGB666
 - Change ps_bpp_mode in mtk_dsi_ps_control_vact() to set:
    - Loosely Packed, 24-bits for MIPI_DSI_FMT_RGB666
    - Packed, 18-bits for MIPI_DSI_FMT_RGB666_PACKED

Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver")
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240215085316.56835-3-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 08:44:54 +01:00
..
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_cec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_cec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_disp_color.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_disp_ovl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_disp_rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_dpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_dpi_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_crtc.c drm/mediatek: Add spinlock for setting vblank event in atomic_begin 2024-11-18 12:11:56 +01:00
mtk_drm_crtc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_ddp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_ddp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_ddp_comp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_ddp_comp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_drv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_drv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_gem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_gem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_plane.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_drm_plane.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_dsi.c drm/mediatek: dsi: Fix DSI RGB666 formats and definitions 2024-11-19 08:44:54 +01:00
mtk_hdmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_hdmi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_hdmi_ddc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_hdmi_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_mipi_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_mipi_tx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_mt8173_mipi_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk_mt8183_mipi_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00