From 67a88885271f0fdb7358fad9c5e22c6bb02f4667 Mon Sep 17 00:00:00 2001 From: Vladimir Bely Date: Mon, 16 Nov 2026 01:45:20 +0300 Subject: [PATCH] drm/msm/dsi: Don't set the link clock rates for every command msm_dsi_host_xfer_prepare() sets the link clock rates before each command transfer. msm_dsi_host_power_on() has already set them, and the link clocks stay enabled until power off. Transfers are refused while the host is powered off. When the PLL can't produce the requested byte clock exactly, the clock core doesn't treat the call as a no-op. It reprograms the DSI PLL for every command, while the video mode stream is running. On a Samsung S6E88A0 panel (MSM8916) the byte clock is 57739160 Hz for a 57741000 Hz request. Every brightness update made the picture lose sync for a moment. Only enable the link clocks in msm_dsi_host_xfer_prepare(). Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Vladimir Bely --- drivers/gpu/drm/msm/dsi/dsi_host.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index db6da99375a185..7f6fa5a0b1bc13 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -2133,7 +2133,10 @@ int msm_dsi_host_xfer_prepare(struct mipi_dsi_host *host, * mdp clock need to be enabled to receive dsi interrupt */ pm_runtime_get_sync(&msm_host->pdev->dev); - cfg_hnd->ops->link_clk_set_rate(msm_host); + /* + * The rates were set at power on. Setting them again reprograms the + * PLL when it can't hit the exact rate, which glitches video mode. + */ cfg_hnd->ops->link_clk_enable(msm_host); /* TODO: vote for bus bandwidth */