From: Maxime Ripard <mripard@kernel.org>
To: Anusha Srivatsa <asrivats@redhat.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Tejas Vipin <tejasvipin76@gmail.com>,
Doug Anderson <dianders@chromium.org>
Subject: Re: [PATCH v2] drm/panel/synaptics-r63353: Use _multi variants
Date: Tue, 11 Mar 2025 08:30:56 +0100 [thread overview]
Message-ID: <20250311-warm-icy-rottweiler-cefcdd@houat> (raw)
In-Reply-To: <20250310-mipi-synaptic-1-v2-1-20ee4397c670@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]
On Mon, Mar 10, 2025 at 04:58:22PM -0400, Anusha Srivatsa wrote:
> Move away from using deprecated API and use _multi
> variants if available. Use mipi_dsi_msleep()
> and mipi_dsi_usleep_range() instead of msleep()
> and usleep_range() respectively.
>
> Used Coccinelle to find the multiple occurences.
> SmPl patch:
> @rule@
> identifier dsi_var;
> identifier r;
> identifier func;
> type t;
> position p;
> expression dsi_device;
> expression list es;
> @@
> t func(...) {
> ...
> struct mipi_dsi_device *dsi_var = dsi_device;
> +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var };
> <+...
> (
> -mipi_dsi_dcs_write_seq(dsi_var,es)@p;
> +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);
> |
> -mipi_dsi_generic_write_seq(dsi_var,es)@p;
> +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);
> |
> -mipi_dsi_generic_write(dsi_var,es)@p;
> +mipi_dsi_generic_write_multi(&dsi_ctx,es);
> |
> -r = mipi_dsi_dcs_nop(dsi_var)@p;
> +mipi_dsi_dcs_nop_multi(&dsi_ctx);
> |
> ....rest of API
> ..
> )
> -if(r < 0) {
> -...
> -}
> ...+>
Again, you need to provide the full coccinelle script here otherwise
it's useless. And I have serious doubts that it's actually the script
you used, because ...
> @@ -106,53 +107,46 @@ static int r63353_panel_power_off(struct r63353_panel *rpanel)
> static int r63353_panel_activate(struct r63353_panel *rpanel)
> {
> struct mipi_dsi_device *dsi = rpanel->dsi;
> - struct device *dev = &dsi->dev;
> - int i, ret;
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
> + int i;
>
> - ret = mipi_dsi_dcs_soft_reset(dsi);
> - if (ret < 0) {
> - dev_err(dev, "Failed to do Software Reset (%d)\n", ret);
> + mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);
> + if (dsi_ctx.accum_err)
> goto fail;
> - }
This changes was definitely not what the script is doing.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-03-11 7:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 20:58 Anusha Srivatsa
2025-03-11 7:30 ` Maxime Ripard [this message]
[not found] ` <CAN9Xe3Qwu=E=VVZZ_8EHPF7Xsk6Zcbp=R_b=cRgF=9SWCkmsqA@mail.gmail.com>
2025-03-12 15:47 ` Doug Anderson
[not found] ` <CAN9Xe3RQ_L5a+PbXCBbzpn3VxyWEL1_wqA5trY0h=Xj-YMcA1g@mail.gmail.com>
2025-03-13 0:21 ` Doug Anderson
2025-03-11 15:51 ` Doug Anderson
[not found] ` <CAN9Xe3RYgnELGymau=EoZQy54sM-WfnR-6dr-wmNaBr4ZLnROg@mail.gmail.com>
2025-03-12 15:42 ` Doug Anderson
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=20250311-warm-icy-rottweiler-cefcdd@houat \
--to=mripard@kernel.org \
--cc=airlied@gmail.com \
--cc=asrivats@redhat.com \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=michael@amarulasolutions.com \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=simona@ffwll.ch \
--cc=tejasvipin76@gmail.com \
--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®