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

From: Neil Armstrong
Date: Thu Aug 29 2024 - 07:00:32 EST


On 28/08/2024 18:32, Doug Anderson wrote:
Hi,

On Wed, Aug 28, 2024 at 9:03 AM Neil Armstrong
<neil.armstrong@xxxxxxxxxx> 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@xxxxxxxxxx>
---
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?

Yeah it's unrelated to this change, but I'll investigate.


In any case:

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>

Thanks,
Neil