Replace the deprecated mipi_dsi_picture_parameter_set() call in raydium_rm69220_prepare() with mipi_dsi_picture_parameter_set_multi(), as suggested in Documentation/gpu/todo.rst. Also convert the subsequent mipi_dsi_compression_mode() and msleep(28) calls to mipi_dsi_compression_mode_multi() and mipi_dsi_msleep() so the whole DSC setup sequence shares one mipi_dsi_multi_context and a single error check.
The _multi() helpers log transfer errors automatically, removing the need for the manual dev_err() calls. As before, the 28ms delay is skipped on failure. The command sequence and error cleanup path are unchanged. Signed-off-by: Hsieh Hung-En <[email protected]> --- drivers/gpu/drm/panel/panel-raydium-rm69220.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raydium-rm69220.c b/drivers/gpu/drm/panel/panel-raydium-rm69220.c index 3030f8b89760..ce680fb38798 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm69220.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm69220.c @@ -218,6 +218,7 @@ static int raydium_rm69220_off(struct raydium_rm69220 *ctx) static int raydium_rm69220_prepare(struct drm_panel *panel) { struct raydium_rm69220 *ctx = to_raydium_rm69220(panel); + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; struct device *dev = &ctx->dsi->dev; struct drm_dsc_picture_parameter_set pps; int ret; @@ -237,20 +238,13 @@ static int raydium_rm69220_prepare(struct drm_panel *panel) } drm_dsc_pps_payload_pack(&pps, &ctx->dsc); + mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps); + mipi_dsi_compression_mode_multi(&dsi_ctx, true); + mipi_dsi_msleep(&dsi_ctx, 28); - ret = mipi_dsi_picture_parameter_set(ctx->dsi, &pps); - if (ret < 0) { - dev_err(dev, "failed to transmit PPS: %d\n", ret); - goto err; - } - - ret = mipi_dsi_compression_mode(ctx->dsi, true); - if (ret < 0) { - dev_err(dev, "failed to enable compression mode: %d\n", ret); + ret = dsi_ctx.accum_err; + if (ret) goto err; - } - - msleep(28); return 0; -- 2.43.0
