[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250921183720.237761-2-rtapadia730@gmail.com>
Date: Mon, 22 Sep 2025 00:07:18 +0530
From: rtapadia730@...il.com
To: neil.armstrong@...aro.org,
maarten.lankhorst@...ux.intel.com
Cc: mripard@...nel.org,
tzimmermann@...e.de,
airlied@...il.com,
simona@...ll.ch,
jessica.zhang@....qualcomm.com,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org,
corbet@....net,
Rajeev Tapadia <rtapadia730@...il.com>
Subject: [PATCH 1/4] drm/panel/lpm102a188a: Switch to mipi_dsi_generic_write_seq_multi()
From: Rajeev Tapadia <rtapadia730@...il.com>
Replace deprecated mipi_dsi_generic_write_seq() calls with
mipi_dsi_generic_write_seq_multi(). This avoids hidden early returns
and matches the direction of other panel drivers.
No functional change intended.
Signed-off-by: Rajeev Tapadia <rtapadia730@...il.com>
---
Question for reviewers:
In this patch, I switched to using mipi_dsi_generic_write_seq_multi().
Currently, if both link1 and link2 return errors, only one error is
reported via accum_err. How should this ideally be handled? Should we
report the first error, the last, or combine them somehow?
drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
index 5f897e143758..982cb61849a0 100644
--- a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
+++ b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
@@ -162,27 +162,34 @@ static int jdi_setup_symmetrical_split(struct mipi_dsi_device *left,
static int jdi_write_dcdc_registers(struct jdi_panel *jdi)
{
/* Clear the manufacturer command access protection */
- mipi_dsi_generic_write_seq(jdi->link1, MCS_CMD_ACS_PROT,
+ struct mipi_dsi_multi_context dsi_ctx1 = {.dsi = jdi->link1};
+ struct mipi_dsi_multi_context dsi_ctx2 = {.dsi = jdi->link2};
+
+ mipi_dsi_generic_write_seq_multi(&dsi_ctx1, MCS_CMD_ACS_PROT,
MCS_CMD_ACS_PROT_OFF);
- mipi_dsi_generic_write_seq(jdi->link2, MCS_CMD_ACS_PROT,
+ mipi_dsi_generic_write_seq_multi(&dsi_ctx2, MCS_CMD_ACS_PROT,
MCS_CMD_ACS_PROT_OFF);
/*
* Change the VGH/VGL divide rations to move the noise generated by the
* TCONN. This should hopefully avoid interaction with the backlight
* controller.
*/
- mipi_dsi_generic_write_seq(jdi->link1, MCS_PWR_CTRL_FUNC,
+ mipi_dsi_generic_write_seq_multi(&dsi_ctx1, MCS_PWR_CTRL_FUNC,
MCS_PWR_CTRL_PARAM1_VGH_330_DIV |
MCS_PWR_CTRL_PARAM1_DEFAULT,
MCS_PWR_CTRL_PARAM2_VGL_410_DIV |
MCS_PWR_CTRL_PARAM2_DEFAULT);
- mipi_dsi_generic_write_seq(jdi->link2, MCS_PWR_CTRL_FUNC,
+ mipi_dsi_generic_write_seq_multi(&dsi_ctx2, MCS_PWR_CTRL_FUNC,
MCS_PWR_CTRL_PARAM1_VGH_330_DIV |
MCS_PWR_CTRL_PARAM1_DEFAULT,
MCS_PWR_CTRL_PARAM2_VGL_410_DIV |
MCS_PWR_CTRL_PARAM2_DEFAULT);
+ if (dsi_ctx1.accum_err < 0)
+ return dsi_ctx1.accum_err;
+ if (dsi_ctx2.accum_err < 0)
+ return dsi_ctx2.accum_err;
return 0;
}
--
2.51.0
Powered by blists - more mailing lists