From: Hsieh Hung-En <hungen3108@gmail.com>
To: neil.armstrong@linaro.org, jesszhan0024@gmail.com,
dianders@chromium.org, akoskovich@pm.me,
luca.weiss@fairphone.com
Cc: dmitry.baryshkov@oss.qualcomm.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Hsieh Hung-En <hungen3108@gmail.com>
Subject: [PATCH 2/3] drm/panel: novatek-nt37705: Use mipi_dsi_*_multi() in prepare()
Date: Thu, 3 Dec 2026 13:10:10 +0800 [thread overview]
Message-ID: <20261203051011.447841-3-hungen3108@gmail.com> (raw)
In-Reply-To: <20261203051011.447841-1-hungen3108@gmail.com>
Replace the deprecated mipi_dsi_picture_parameter_set() call in
nt37705_prepare() with mipi_dsi_picture_parameter_set_multi(), as
suggested in Documentation/gpu/todo.rst. Also convert the subsequent
mipi_dsi_compression_mode() and msleep(28) calls to
mipi_dsi_compression_mode_multi() and mipi_dsi_msleep() so the whole
DSC setup sequence shares one mipi_dsi_multi_context and a single
error check.
The _multi() helpers log transfer errors automatically, removing the
need for the manual dev_err() calls. As before, the 28ms delay is
skipped on failure. The command sequence and error cleanup path are
unchanged.
Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com>
---
drivers/gpu/drm/panel/panel-novatek-nt37705.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37705.c b/drivers/gpu/drm/panel/panel-novatek-nt37705.c
index a37bbd569ee5..55abc4034823 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt37705.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt37705.c
@@ -194,6 +194,7 @@ static int nt37705_off(struct nt37705_panel *ctx)
static int nt37705_prepare(struct drm_panel *panel)
{
struct nt37705_panel *ctx = to_nt37705_panel(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
struct device *dev = &ctx->dsi->dev;
struct drm_dsc_picture_parameter_set pps;
int ret;
@@ -213,20 +214,13 @@ static int nt37705_prepare(struct drm_panel *panel)
}
drm_dsc_pps_payload_pack(&pps, &ctx->dsc);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
+ mipi_dsi_compression_mode_multi(&dsi_ctx, true);
+ mipi_dsi_msleep(&dsi_ctx, 28); /* TODO: Is this panel-dependent? */
- ret = mipi_dsi_picture_parameter_set(ctx->dsi, &pps);
- if (ret < 0) {
- dev_err(panel->dev, "failed to transmit PPS: %d\n", ret);
- goto err;
- }
-
- ret = mipi_dsi_compression_mode(ctx->dsi, true);
- if (ret < 0) {
- dev_err(dev, "failed to enable compression mode: %d\n", ret);
+ ret = dsi_ctx.accum_err;
+ if (ret)
goto err;
- }
-
- msleep(28); /* TODO: Is this panel-dependent? */
return 0;
--
2.43.0
next prev parent reply other threads:[~2026-12-03 5:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 5:10 [PATCH 0/3] drm/panel: Convert nt37705 and rm69220 prepare() to _multi() Hsieh Hung-En
2026-12-03 5:10 ` [PATCH 1/3] drm/panel: novatek-nt37705: Fix prepare error cleanup Hsieh Hung-En
2026-12-03 9:32 ` neil.armstrong
2026-12-03 5:10 ` Hsieh Hung-En [this message]
2026-12-03 9:33 ` [PATCH 2/3] drm/panel: novatek-nt37705: Use mipi_dsi_*_multi() in prepare() neil.armstrong
2026-12-03 5:10 ` [PATCH 3/3] drm/panel: raydium-rm69220: " Hsieh Hung-En
2026-12-03 9:34 ` neil.armstrong
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=20261203051011.447841-3-hungen3108@gmail.com \
--to=hungen3108@gmail.com \
--cc=airlied@gmail.com \
--cc=akoskovich@pm.me \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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®