Skip to contentSkip to conversation

drm/panel: raydium-rm67191: Use mipi_dsi_generic_write_multi()

PATCH New akaFelixAB 1 participant 1 message Dec 2

Subsystems (4)
lore
Share & tools
lore

akaFelixAB

author
#0 lore raw

PATCH 1/1 drm/panel: raydium-rm67191: Use mipi_dsi_generic_write_multi()

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

---
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(-)
drivers/gpu/drm/panel/panel-raydium-rm67191.c +5 -5
index 8564cb3984bbcb1a97b95d47d400bd05ef35537a..453308cc2cfc1fdc57853cf44d7ddad213c2d8d7 100644
@@ -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,

Signature · 1 line
akaFelixAB <[email protected]>