[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mozxxkpqlboh2w7bf55bezgcy5b2jfgepmgullgd24dtmwfva2@mghwg3c5an5y>
Date: Wed, 19 Jun 2024 09:36:08 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Tejas Vipin <tejasvipin76@...il.com>
Cc: neil.armstrong@...aro.org, quic_jesszhan@...cinc.com,
dianders@...omium.org, maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/panel: raydium-rm692e5: transition to mipi_dsi
wrapped functions
On Wed, Jun 19, 2024 at 09:03:49AM GMT, Tejas Vipin wrote:
> Use functions introduced in commit 966e397e4f60 ("drm/mipi-dsi: Introduce
> mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe
> ("drm/mipi-dsi: wrap more functions for streamline handling") for the
> raydium rm692e5 panel.
>
> Signed-off-by: Tejas Vipin <tejasvipin76@...il.com>
> ---
> Changes in v2:
> - Change rm692e5_on to return void and take mipi_dsi_multi_context
> as an argument.
> - Remove unnecessary warnings.
> - More efficient error handling in rm692e5_prepare
>
> v1: https://lore.kernel.org/all/20240615093758.65431-1-tejasvipin76@gmail.com/
> ---
> drivers/gpu/drm/panel/panel-raydium-rm692e5.c | 237 ++++++++----------
> 1 file changed, 99 insertions(+), 138 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> index 21d97f6b8a2f..9936bda61af2 100644
> --- a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> +++ b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> static int rm692e5_prepare(struct drm_panel *panel)
> {
> struct rm692e5_panel *ctx = to_rm692e5_panel(panel);
> struct drm_dsc_picture_parameter_set pps;
> - struct device *dev = &ctx->dsi->dev;
> - int ret;
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
>
> - ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> - if (ret < 0) {
> - dev_err(dev, "Failed to enable regulators: %d\n", ret);
> - return ret;
> - }
> + dsi_ctx.accum_err = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> + if (dsi_ctx.accum_err)
> + return dsi_ctx.accum_err;
int ret, please. Let's leave dsi_ctx.accum_err for DSI errors only.
LGTM otherwise.
>
> rm692e5_reset(ctx);
>
> - ret = rm692e5_on(ctx);
> - if (ret < 0) {
> - dev_err(dev, "Failed to initialize panel: %d\n", ret);
> - gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> - regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> - return ret;
> - }
> + rm692e5_on(&dsi_ctx);
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists