Skip to contentSkip to conversation

drm/panel: osd101t2587: migrate to newer mipi_dsi* functions

PATCH Applied Robert-Andrei Mercea 2 participants 3 messages Jul 20 – Jul 22

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: osd101t2587: migrate to newer mipi_dsi* functions

Migrate osd101t2587-53ts panel driver from deprecated mipi_dsi* functions to their *_multi variants for improved error handling, as specified in the GPU subsystem TODO list.

---
 drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c +6 -8
index 2334b77f348c..63ae9dc5712f 100644
@@ -32,11 +32,11 @@ static inline struct osd101t2587_panel *ti_osd_panel(struct drm_panel *panel)
 static int osd101t2587_panel_disable(struct drm_panel *panel)
 {
 	struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
-	int ret;
+	struct mipi_dsi_multi_context ctx = { .dsi = osd101t2587->dsi };
 
-	ret = mipi_dsi_shutdown_peripheral(osd101t2587->dsi);
+	mipi_dsi_shutdown_peripheral_multi(&ctx);
 
-	return ret;
+	return ctx.accum_err;
 }
 
 static int osd101t2587_panel_unprepare(struct drm_panel *panel)
@@ -58,13 +58,11 @@ static int osd101t2587_panel_prepare(struct drm_panel *panel)
 static int osd101t2587_panel_enable(struct drm_panel *panel)
 {
 	struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
-	int ret;
+	struct mipi_dsi_multi_context ctx = { .dsi = osd101t2587->dsi };
 
-	ret = mipi_dsi_turn_on_peripheral(osd101t2587->dsi);
-	if (ret)
-		return ret;
+	mipi_dsi_turn_on_peripheral_multi(&ctx);
 
-	return ret;
+	return ctx.accum_err;
 }
 
 static const struct drm_display_mode default_mode_osd101t2587 = {
Signature · 1 line
2.55.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 37 lines · Robert-Andrei Mercea

Migrate osd101t2587-53ts panel driver from deprecated mipi_dsi* functions to their *_multi variants for improved error handling, as specified in the GPU subsystem TODO list.

---
  drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c | 14 ++++++--------
  1 file changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c +4 -4
index 2334b77f348c..63ae9dc5712f 100644
@@ -32,11 +32,11 @@ static inline struct osd101t2587_panel *ti_osd_panel(struct drm_panel *panel)
  static int osd101t2587_panel_disable(struct drm_panel *panel)
  {
  	struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
-	int ret;
+	struct mipi_dsi_multi_context ctx = { .dsi = osd101t2587->dsi };
 
-	ret = mipi_dsi_shutdown_peripheral(osd101t2587->dsi);
+	mipi_dsi_shutdown_peripheral_multi(&ctx);
 
-	return ret;
+	return ctx.accum_err;
  }
 
  static int osd101t2587_panel_unprepare(struct drm_panel *panel)
@@ -58,13 +58,11 @@ static int osd101t2587_panel_prepare(struct drm_panel *panel)
  static int osd101t2587_panel_enable(struct drm_panel *panel)
  {
  	struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
-	int ret;
+	struct mipi_dsi_multi_context ctx = { .dsi = osd101t2587->dsi };
 

drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c static int osd101t2587_panel_prepare(struct drm_panel *panel) · line 68

Quoted 10 lines
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c +2 -4
-	ret = mipi_dsi_turn_on_peripheral(osd101t2587->dsi);
-	if (ret)
-		return ret;
+	mipi_dsi_turn_on_peripheral_multi(&ctx);
 
-	return ret;
+	return ctx.accum_err;
  }
 
  static const struct drm_display_mode default_mode_osd101t2587 = {

Thanks,
Neil

maintainer Applied
#2 lore raw
In reply to Robert-Andrei Mercea

Hi,

Quoted 8 lines · Robert-Andrei Mercea

Migrate osd101t2587-53ts panel driver from deprecated mipi_dsi* functions to their *_multi variants for improved error handling, as specified in the GPU subsystem TODO list.

[...]

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/1] drm/panel: osd101t2587: migrate to newer mipi_dsi* functions

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/ab3d527aaa334f843d1a5f71aa79678a34ff4e48
Signature · 1 line
Neil