From: akaFelixAB <[email protected]>

Replace the deprecated mipi_dsi_generic_write() in the manufacturer
command list. Stop on the first failed write and return its error
as before.

Signed-off-by: akaFelixAB <[email protected]>
---
Build-tested on x86_64 (panel-raydium-rm67191.o only).
No hardware testing performed.
---
 drivers/gpu/drm/panel/panel-raydium-rm67191.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c 
b/drivers/gpu/drm/panel/panel-raydium-rm67191.c
index 
8564cb3984bbcb1a97b95d47d400bd05ef35537a..453308cc2cfc1fdc57853cf44d7ddad213c2d8d7
 100644
--- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c
+++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c
@@ -232,18 +232,18 @@ static int rad_panel_push_cmd_list(struct mipi_dsi_device 
*dsi)
 {
        size_t i;
        size_t count = ARRAY_SIZE(manufacturer_cmd_set);
-       int ret = 0;
+       struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
 
        for (i = 0; i < count; i++) {
                const struct cmd_set_entry *entry = &manufacturer_cmd_set[i];
                u8 buffer[2] = { entry->cmd, entry->param };
 
-               ret = mipi_dsi_generic_write(dsi, &buffer, sizeof(buffer));
-               if (ret < 0)
-                       return ret;
+               mipi_dsi_generic_write_multi(&dsi_ctx, &buffer, sizeof(buffer));
+               if (dsi_ctx.accum_err)
+                       break;
        }
 
-       return ret;
+       return dsi_ctx.accum_err;
 };
 
 static int color_format_from_dsi_format(enum mipi_dsi_pixel_format format)

---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261202-rm67191-generic-write-multi-c5be6b989daf

Best regards,
-- 
akaFelixAB <[email protected]>


Reply via email to