Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E287F606A321 for ; Sun, 29 Nov 2026 00:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FD9Ps6tJ Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5202610E358; Sun, 29 Nov 2026 00:19:19 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C5F110E358 for ; Sun, 29 Nov 2026 00:19:12 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 73AB760CDE; Sun, 29 Nov 2026 00:19:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 168A71F000C1; Sun, 29 Nov 2026 00:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795911551; bh=w0BvXEXdpkbRh7jO5xU0KhOQvVcnHeGieDLoeEYwkx4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=FD9Ps6tJnUj8F/tkUDnvWP5gko8N86NKf8ypSdl7kop5A10dehdqXcfVD/9MxIq0r jta/j71JZwwCC1hWXX0fObcs0ECjTesIj8FTXjodQqJKGk3E1b++dC2ArO7tOqy8MM gj21GSDDQd/a1O0F0SZ30s2cEKSO9UaewT3ZaeRipkZdTMjKaIAEKOgQR9luPfpCfU 67VHgpXR2FpDD5FYrbX611G+dga/6HsrVI4y8oMtY984jDkKcy8Fwa53z2r1Ka+BPi 9OZqAsZk5khLwfPxTGRs0KOPrumNYqux4qWWyhly8zatOw62FaqnZ0HpEbToUTq3Bf azTjVjmW00qfQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] drm/msm/dsi: skip dsi_wait4video_eng_busy() when BLOCK_DMA_WITHIN_FRAME is set To: "Vladimir Bely" Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261129000502.983904-1-vlwwwwww@gmail.com> References: <20261129000502.983904-1-vlwwwwww@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 00:19:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] drm/msm/dsi: dsi_wait4video_eng_busy() skips video sync on cmd_mdp flag -- commit ecab5b36663485746972b4242e09b891775ae38a Author: Vladimir Bely drm/msm/dsi: skip dsi_wait4video_eng_busy() when BLOCK_DMA_WITHIN_FRAME is = set This commit skips waiting for VIDEO_DONE and the subsequent 2-4 ms sleep in dsi_wait4video_eng_busy() on DSI 6G v1.2 and newer controllers. > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi= /dsi_host.c > index d92659d80f172..1f13e64a98268 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; > =20 > + /* > + * 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 =3D dsi_read(msm_host, REG_DSI_STATUS0); > =20 > /* if video mode engine is not busy, its because [Severity: Medium] Does DSI_TRIG_CTRL_BLOCK_DMA_WITHIN_FRAME actually defer command DMA to the video-mode blanking period? The comment in msm_dsi_host_xfer_prepare() describes BLOCK_DMA_WITHIN_FRAME as gating command DMA until the command-mode MDP engine (dsi_cmd_mdp) is idle: drivers/gpu/drm/msm/dsi/dsi_host.c:msm_dsi_host_xfer_prepare() { /* TODO: make sure dsi_cmd_mdp is idle. * Since DSI6G v1.2.0, we can set DSI_TRIG_CTRL.BLOCK_DMA_WITHIN_FRAME * to ask H/W to wait until cmd mdp is idle. S/W wait is not needed. * How to handle the old versions? Wait for mdp cmd done? */ } In video mode, dsi_ctrl_enable() (which replaced dsi_ctrl_config()) sets DSI_VID_CFG0_EOF_BLLP_POWER_STOP and DSI_VID_CFG0_BLLP_POWER_STOP on all controller versions so the command engine transmits during BLLP, with DSI_TRIG_CTRL_DMA_TRIGGER(TRIGGER_SW). When VIDEO_MODE_ENGINE_BUSY is set, waiting for VIDEO_DONE and sleeping 2-4 ms ("to skip BLLP") was written to advance past the current BLLP into the next active video frame before writing REG_DSI_TRIG_DMA, so the transfer is queued for the start of the following BLLP rather than triggered mid-BLLP. Gating this early return on DSI 6G >=3D v1.2 conflates the command-mode MDP idle gate with video-mode BLLP arbitration, removes the wait without accounting for triggering TRIGGER_SW mid-BLLP, leaves DSI v2 and DSI 6G < v1.2 with the two-frame wait, and references the removed dsi_ctrl_config() function in the comment. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129000502.9839= 04-1-vlwwwwww@gmail.com?part=3D1