[PATCH 1/2] drm/panel: visionox-vtdr6130: switch to mipi_dsi wrapped functions

Doug Anderson dianders at chromium.org
Wed Aug 28 16:32:05 UTC 2024


Hi,

On Wed, Aug 28, 2024 at 9:03 AM Neil Armstrong
<neil.armstrong at linaro.org> wrote:
>
> Make usage of the new _multi() mipi_dsi functions instead of the
> deprecated macros, improving error handling and printing.
>
> bloat-o-meter gives a 12% gain on arm64:
> Function                                     old     new   delta
> visionox_vtdr6130_unprepare                  208     204      -4
> visionox_vtdr6130_prepare                   1192     896    -296
> Total: Before=2348, After=2048, chg -12.78%
>
> Signed-off-by: Neil Armstrong <neil.armstrong at linaro.org>
> ---
>  drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 186 +++++++++++-------------
>  1 file changed, 82 insertions(+), 104 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> index 540099253e1b..ebe92871dbb6 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> @@ -40,120 +40,103 @@ static void visionox_vtdr6130_reset(struct visionox_vtdr6130 *ctx)
>  static int visionox_vtdr6130_on(struct visionox_vtdr6130 *ctx)
>  {
>         struct mipi_dsi_device *dsi = ctx->dsi;
> -       struct device *dev = &dsi->dev;
> -       int ret;
> +       struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>
>         dsi->mode_flags |= MIPI_DSI_MODE_LPM;

This isn't something you introduced in your patch, but I wonder if we
should avoid setting the "MIPI_DSI_MODE_LPM" bit when the function
returns an error?

In any case:

Reviewed-by: Douglas Anderson <dianders at chromium.org>


More information about the dri-devel mailing list