From: Vladimir Bely <vlwwwwww@gmail.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>
Cc: Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Vladimir Bely <vlwwwwww@gmail.com>
Subject: [PATCH] drm/msm/dsi: skip dsi_wait4video_eng_busy() when BLOCK_DMA_WITHIN_FRAME is set
Date: Sun, 29 Nov 2026 03:05:02 +0300 [thread overview]
Message-ID: <20261129000502.983904-1-vlwwwwww@gmail.com> (raw)
Since DSI 6G v1.2, dsi_ctrl_config() sets
DSI_TRIG_CTRL_BLOCK_DMA_WITHIN_FRAME so the hardware itself defers
SW-triggered command DMA until the blanking period.
Software still runs dsi_wait4video_eng_busy() before every command in
video mode, which waits for VIDEO_DONE and then sleeps 2-4 ms to skip
BLLP. On panels with short vertical blanking (e.g. 24 lines / ~0.41 ms
at 60 Hz on Samsung AMS452EF01), that sleep always misses the blanking
window and pushes the command to the next frame, costing ~2 frames per
DCS transfer (~275 ms for a 7-command backlight update).
Return early from dsi_wait4video_eng_busy() on DSI 6G >= v1.2 where
BLOCK_DMA_WITHIN_FRAME is enabled, matching the existing comment in
msm_dsi_host_xfer_prepare(). Tested on MSM8916 (Samsung Galaxy A3,
SM-A300F), reducing a 7-command backlight update from ~275 ms to ~36 ms.
Signed-off-by: Vladimir Bely <vlwwwwww@gmail.com>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index d92659d80..1f13e64a9 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1222,6 +1222,16 @@ static void dsi_wait4video_eng_busy(struct msm_dsi_host *msm_host)
if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO))
return;
+ /*
+ * With BLOCK_DMA_WITHIN_FRAME enabled in dsi_ctrl_config(), the
+ * hardware holds the DMA until the blanking period itself. Sleeping
+ * past VIDEO_DONE misses short blankings and costs a whole frame per
+ * command.
+ */
+ if (msm_dsi_host_version_geq(msm_host, MSM_DSI_VER_MAJOR_6G,
+ MSM_DSI_6G_VER_MINOR_V1_2))
+ return;
+
data = dsi_read(msm_host, REG_DSI_STATUS0);
/* if video mode engine is not busy, its because
base-commit: dca2f1b25860f8caa0406f858e76a3a21671a012
--
2.43.0
reply other threads:[~2026-11-29 0:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261129000502.983904-1-vlwwwwww@gmail.com \
--to=vlwwwwww@gmail.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®