From: "Nicolás Antinori" <nico.antinori.7@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "Nicolás Antinori" <nico.antinori.7@gmail.com>,
"Brigham Campbell" <me@brighamcampbell.com>,
"David Airlie" <airlied@gmail.com>,
"Douglas Anderson" <dianders@chromium.org>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Simona Vetter" <simona@ffwll.ch>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev
Subject: [PATCH] drm/panel: novatek-nt37801: Use mipi_dsi_*_multi() functions
Date: Wed, 1 Jul 2026 09:56:06 -0300 [thread overview]
Message-ID: <20260701125624.199786-1-nico.antinori.7@gmail.com> (raw)
Replace mipi_dsi_* functions with their non-deprecated mipi_dsi_*_multi
counterparts. This change reduces error-checking boilerplate and improves
readability.
Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
---
Note: I Compile-tested this patch since I don't own the panel to test it.
drivers/gpu/drm/panel/panel-novatek-nt37801.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37801.c b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
index d6a37d7e0cc6..daa356bbc182 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt37801.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
@@ -128,7 +128,8 @@ static int novatek_nt37801_off(struct novatek_nt37801 *ctx)
static int novatek_nt37801_prepare(struct drm_panel *panel)
{
struct novatek_nt37801 *ctx = to_novatek_nt37801(panel);
- struct device *dev = &ctx->dsi->dev;
+ struct mipi_dsi_device *dsi = ctx->dsi;
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
struct drm_dsc_picture_parameter_set pps;
int ret;
@@ -145,15 +146,10 @@ static int novatek_nt37801_prepare(struct drm_panel *panel)
drm_dsc_pps_payload_pack(&pps, &ctx->dsc);
- 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);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
+ mipi_dsi_compression_mode_multi(&dsi_ctx, true);
+ if (dsi_ctx.accum_err) {
+ ret = dsi_ctx.accum_err;
goto err;
}
--
2.47.3
next reply other threads:[~2026-07-01 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 12:56 Nicolás Antinori [this message]
2026-07-04 15:59 ` [PATCH] drm/panel: novatek-nt37801: Use mipi_dsi_*_multi() functions Doug Anderson
2026-07-06 12:34 ` Nicolás Antinori
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=20260701125624.199786-1-nico.antinori.7@gmail.com \
--to=nico.antinori.7@gmail.com \
--cc=airlied@gmail.com \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=me@brighamcampbell.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--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