drm/panel: elida-kd35t133: transition to mipi_dsi wrapped functions
Subsystems (3)
PATCH 1/1 drm/panel: elida-kd35t133: transition to mipi_dsi wrapped functions
Changes the elida-kd35t133 panel to use multi style functions for improved error handling.
--- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 107 ++++++++----------- 1 file changed, 45 insertions(+), 62 deletions(-)
drivers/gpu/drm/panel/panel-elida-kd35t133.c +45 -62
@@ -50,55 +50,45 @@ static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel) return container_of(panel, struct kd35t133, panel); } -static int kd35t133_init_sequence (struct kd35t133 *ctx) +static void kd35t133_init_sequence (struct mipi_dsi_multi_context *dsi_ctx) { -struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); -struct device *dev = ctx->dev; -/* * Init sequence was supplied by the panel vendor with minimal * documentation. */ -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_POSITIVEGAMMA , -0x00 ,0x13 ,0x18 ,0x04 ,0x0f ,0x06 ,0x3a ,0x56 , -0x4d ,0x03 ,0x0a ,0x06 ,0x30 ,0x3e ,0x0f ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_NEGATIVEGAMMA , -0x00 ,0x13 ,0x18 ,0x01 ,0x11 ,0x06 ,0x38 ,0x34 , -0x4d ,0x06 ,0x0d ,0x0b ,0x31 ,0x37 ,0x0f ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_POWERCONTROL1 ,0x18 ,0x17 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_POWERCONTROL2 ,0x41 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_VCOMCONTROL ,0x00 ,0x1a ,0x80 ); -mipi_dsi_dcs_write_seq (dsi,MIPI_DCS_SET_ADDRESS_MODE ,0x48 ); -mipi_dsi_dcs_write_seq (dsi,MIPI_DCS_SET_PIXEL_FORMAT ,0x55 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_INTERFACEMODECTRL ,0x00 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_FRAMERATECTRL ,0xa0 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_DISPLAYINVERSIONCTRL ,0x02 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_DISPLAYFUNCTIONCTRL , -0x20 ,0x02 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_SETIMAGEFUNCTION ,0x00 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_ADJUSTCONTROL3 , -0xa9 ,0x51 ,0x2c ,0x82 ); -mipi_dsi_dcs_write (dsi,MIPI_DCS_ENTER_INVERT_MODE ,NULL ,0 ); - -dev_dbg (dev,"Panel init sequence done\n" ); -return 0 ; +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_POSITIVEGAMMA , +0x00 ,0x13 ,0x18 ,0x04 ,0x0f ,0x06 ,0x3a ,0x56 , +0x4d ,0x03 ,0x0a ,0x06 ,0x30 ,0x3e ,0x0f ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_NEGATIVEGAMMA , +0x13 ,0x18 ,0x01 ,0x11 ,0x06 ,0x38 ,0x34 , +0x06 ,0x0d ,0x0b ,0x31 ,0x37 ,0x0f ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_POWERCONTROL1 ,0x18 ,0x17 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_POWERCONTROL2 ,0x41 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_VCOMCONTROL ,0x00 ,0x1a ,0x80 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,MIPI_DCS_SET_ADDRESS_MODE ,0x48 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,MIPI_DCS_SET_PIXEL_FORMAT ,0x55 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_INTERFACEMODECTRL ,0x00 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_FRAMERATECTRL ,0xa0 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_DISPLAYINVERSIONCTRL ,0x02 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_DISPLAYFUNCTIONCTRL , +0x02 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_SETIMAGEFUNCTION ,0x00 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_ADJUSTCONTROL3 , +0x51 ,0x2c ,0x82 ); +if (!dsi_ctx->accum_err) +mipi_dsi_dcs_write (dsi_ctx->dsi,MIPI_DCS_ENTER_INVERT_MODE ,NULL ,0 ); }static int kd35t133_unprepare (struct drm_panel *panel) {struct kd35t133 *ctx =panel_to_kd35t133 (panel);struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; - ret =mipi_dsi_dcs_set_display_off (dsi); -if (ret <0 ) -dev_err (ctx->dev,"failed to set display off: %d\n" , ret); - - ret =mipi_dsi_dcs_enter_sleep_mode (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"failed to enter sleep mode: %d\n" , ret); -return ret; - } +mipi_dsi_dcs_set_display_off_multi (&dsi_ctx); +mipi_dsi_dcs_enter_sleep_mode_multi (&dsi_ctx); +if (dsi_ctx.accum_err) +return dsi_ctx.accum_err;gpiod_set_value_cansleep (ctx->reset_gpio,1 );
@@ -112,18 +102,20 @@ static int kd35t133_prepare(struct drm_panel *panel) {struct kd35t133 *ctx =panel_to_kd35t133 (panel);struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };dev_dbg (ctx->dev,"Resetting the panel\n" ); - ret =regulator_enable (ctx->vdd); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to enable vdd supply: %d\n" , ret); -return ret; + dsi_ctx.accum_err =regulator_enable (ctx->vdd); +if (dsi_ctx.accum_err) { +dev_err (ctx->dev,"Failed to enable vdd supply: %d\n" , + dsi_ctx.accum_err); +return dsi_ctx.accum_err; } - ret =regulator_enable (ctx->iovcc); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to enable iovcc supply: %d\n" , ret); + dsi_ctx.accum_err =regulator_enable (ctx->iovcc); +if (dsi_ctx.accum_err) { +dev_err (ctx->dev,"Failed to enable iovcc supply: %d\n" , + dsi_ctx.accum_err); goto disable_vdd; }
@@ -135,25 +127,16 @@ static int kd35t133_prepare(struct drm_panel *panel)msleep (20 ); - ret =mipi_dsi_dcs_exit_sleep_mode (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to exit sleep mode: %d\n" , ret); - goto disable_iovcc; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx); +mipi_dsi_msleep (&dsi_ctx,250 ); -msleep (250 ); +kd35t133_init_sequence (&dsi_ctx); +if (!dsi_ctx.accum_err) +dev_dbg (ctx->dev,"Panel init sequence done\n" ); - ret =kd35t133_init_sequence (ctx); -if (ret <0 ) { -dev_err (ctx->dev,"Panel init sequence failed: %d\n" , ret); +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); +if (dsi_ctx.accum_err) goto disable_iovcc; - } - - ret =mipi_dsi_dcs_set_display_on (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to set display on: %d\n" , ret); - goto disable_iovcc; - }msleep (50 );
@@ -163,7 +146,7 @@ static int kd35t133_prepare(struct drm_panel *panel)regulator_disable (ctx->iovcc); disable_vdd:regulator_disable (ctx->vdd); -return ret; +return dsi_ctx.accum_err; }static const struct drm_display_mode default_mode = {
Signature · 1 line
2.46.0
Quoted 60 lines · Tejas Vipin
Changes the elida-kd35t133 panel to use multi style functions for improved error handling.
Signed-off-by Tejas Vipin <[email protected]>--- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 107 ++++++++----------- 1 file changed, 45 insertions(+), 62 deletions(-)drivers/gpu/drm/panel/panel-elida-kd35t133.c +12
-27@@ -50,55 +50,45 @@ static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel) return container_of(panel, struct kd35t133, panel); } -static int kd35t133_init_sequence (struct kd35t133 *ctx) +static void kd35t133_init_sequence (struct mipi_dsi_multi_context *dsi_ctx) { -struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); -struct device *dev = ctx->dev; -/* * Init sequence was supplied by the panel vendor with minimal * documentation. */ -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_POSITIVEGAMMA , -0x00 ,0x13 ,0x18 ,0x04 ,0x0f ,0x06 ,0x3a ,0x56 , -0x4d ,0x03 ,0x0a ,0x06 ,0x30 ,0x3e ,0x0f ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_NEGATIVEGAMMA , -0x00 ,0x13 ,0x18 ,0x01 ,0x11 ,0x06 ,0x38 ,0x34 , -0x4d ,0x06 ,0x0d ,0x0b ,0x31 ,0x37 ,0x0f ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_POWERCONTROL1 ,0x18 ,0x17 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_POWERCONTROL2 ,0x41 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_VCOMCONTROL ,0x00 ,0x1a ,0x80 ); -mipi_dsi_dcs_write_seq (dsi,MIPI_DCS_SET_ADDRESS_MODE ,0x48 ); -mipi_dsi_dcs_write_seq (dsi,MIPI_DCS_SET_PIXEL_FORMAT ,0x55 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_INTERFACEMODECTRL ,0x00 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_FRAMERATECTRL ,0xa0 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_DISPLAYINVERSIONCTRL ,0x02 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_DISPLAYFUNCTIONCTRL , -0x20 ,0x02 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_SETIMAGEFUNCTION ,0x00 ); -mipi_dsi_dcs_write_seq (dsi,KD35T133_CMD_ADJUSTCONTROL3 , -0xa9 ,0x51 ,0x2c ,0x82 ); -mipi_dsi_dcs_write (dsi,MIPI_DCS_ENTER_INVERT_MODE ,NULL ,0 ); - -dev_dbg (dev,"Panel init sequence done\n" ); -return 0 ; +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_POSITIVEGAMMA , +0x00 ,0x13 ,0x18 ,0x04 ,0x0f ,0x06 ,0x3a ,0x56 , +0x4d ,0x03 ,0x0a ,0x06 ,0x30 ,0x3e ,0x0f ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_NEGATIVEGAMMA , +0x13 ,0x18 ,0x01 ,0x11 ,0x06 ,0x38 ,0x34 , +0x06 ,0x0d ,0x0b ,0x31 ,0x37 ,0x0f ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_POWERCONTROL1 ,0x18 ,0x17 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_POWERCONTROL2 ,0x41 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_VCOMCONTROL ,0x00 ,0x1a ,0x80 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,MIPI_DCS_SET_ADDRESS_MODE ,0x48 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,MIPI_DCS_SET_PIXEL_FORMAT ,0x55 );
drivers/gpu/drm/panel/panel-elida-kd35t133.c static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel) · line 79
Quoted 10 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +10
-0+mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_INTERFACEMODECTRL ,0x00 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_FRAMERATECTRL ,0xa0 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_DISPLAYINVERSIONCTRL ,0x02 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_DISPLAYFUNCTIONCTRL , +0x02 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_SETIMAGEFUNCTION ,0x00 ); +mipi_dsi_dcs_write_seq_multi (dsi_ctx,KD35T133_CMD_ADJUSTCONTROL3 , +0x51 ,0x2c ,0x82 ); +if (!dsi_ctx->accum_err) +mipi_dsi_dcs_write (dsi_ctx->dsi,MIPI_DCS_ENTER_INVERT_MODE ,NULL ,0 );
Please use mipi_dsi_dcs_write_buffer_multi() instead.
Quoted 68 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +18
-24}static int kd35t133_unprepare (struct drm_panel *panel) {struct kd35t133 *ctx =panel_to_kd35t133 (panel);struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; - ret =mipi_dsi_dcs_set_display_off (dsi); -if (ret <0 ) -dev_err (ctx->dev,"failed to set display off: %d\n" , ret); - - ret =mipi_dsi_dcs_enter_sleep_mode (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"failed to enter sleep mode: %d\n" , ret); -return ret; - } +mipi_dsi_dcs_set_display_off_multi (&dsi_ctx); +mipi_dsi_dcs_enter_sleep_mode_multi (&dsi_ctx); +if (dsi_ctx.accum_err) +return dsi_ctx.accum_err;gpiod_set_value_cansleep (ctx->reset_gpio,1 );@@ -112,18 +102,20 @@ static int kd35t133_prepare(struct drm_panel *panel) {struct kd35t133 *ctx =panel_to_kd35t133 (panel);struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };dev_dbg (ctx->dev,"Resetting the panel\n" ); - ret =regulator_enable (ctx->vdd); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to enable vdd supply: %d\n" , ret); -return ret; + dsi_ctx.accum_err =regulator_enable (ctx->vdd); +if (dsi_ctx.accum_err) { +dev_err (ctx->dev,"Failed to enable vdd supply: %d\n" , + dsi_ctx.accum_err); +return dsi_ctx.accum_err; } - ret =regulator_enable (ctx->iovcc); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to enable iovcc supply: %d\n" , ret); + dsi_ctx.accum_err =regulator_enable (ctx->iovcc); +if (dsi_ctx.accum_err) { +dev_err (ctx->dev,"Failed to enable iovcc supply: %d\n" , + dsi_ctx.accum_err); goto disable_vdd; }@@ -135,25 +127,16 @@ static int kd35t133_prepare(struct drm_panel *panel)msleep (20 ); - ret =mipi_dsi_dcs_exit_sleep_mode (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to exit sleep mode: %d\n" , ret); - goto disable_iovcc; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx); +mipi_dsi_msleep (&dsi_ctx,250 ); -msleep (250 ); +kd35t133_init_sequence (&dsi_ctx);
drivers/gpu/drm/panel/panel-elida-kd35t133.c static int kd35t133_prepare(struct drm_panel *panel) · line 150
Quoted 10 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +4
-4+if (!dsi_ctx.accum_err) +dev_dbg (ctx->dev,"Panel init sequence done\n" ); - ret =kd35t133_init_sequence (ctx); -if (ret <0 ) { -dev_err (ctx->dev,"Panel init sequence failed: %d\n" , ret); +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); +if (dsi_ctx.accum_err) goto disable_iovcc; - }
Move this after the last mipi_dsi_msleep(), merge with the error handling.
drivers/gpu/drm/panel/panel-elida-kd35t133.c static int kd35t133_prepare(struct drm_panel *panel) · line 141
Quoted 8 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +0
-6- - ret =mipi_dsi_dcs_set_display_on (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to set display on: %d\n" , ret); - goto disable_iovcc; - }msleep (50 );
mipi_dsi_msleep()
Quoted 13 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +1
-1@@ -163,7 +146,7 @@ static int kd35t133_prepare(struct drm_panel *panel)regulator_disable (ctx->iovcc); disable_vdd:regulator_disable (ctx->vdd); -return ret; +return dsi_ctx.accum_err; }static const struct drm_display_mode default_mode = {Signature · 1 line
2.46.0
Signature · 2 lines
With best wishes Dmitry
Quoted 48 lines · Dmitry Baryshkov
Quoted 26 lines · Tejas Vipin
Changes the elida-kd35t133 panel to use multi style functions for improved error handling.
Signed-off-by Tejas Vipin <[email protected]>--- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 107 ++++++++----------- 1 file changed, 45 insertions(+), 62 deletions(-)drivers/gpu/drm/panel/panel-elida-kd35t133.c +3
-6@@ -135,25 +127,16 @@ static int kd35t133_prepare(struct drm_panel *panel)msleep (20 ); - ret =mipi_dsi_dcs_exit_sleep_mode (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to exit sleep mode: %d\n" , ret); - goto disable_iovcc; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx); +mipi_dsi_msleep (&dsi_ctx,250 ); -msleep (250 ); +kd35t133_init_sequence (&dsi_ctx);drivers/gpu/drm/panel/panel-elida-kd35t133.c static int kd35t133_prepare(struct drm_panel *panel) · line 150
Quoted 10 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +4
-4+if (!dsi_ctx.accum_err) +dev_dbg (ctx->dev,"Panel init sequence done\n" ); - ret =kd35t133_init_sequence (ctx); -if (ret <0 ) { -dev_err (ctx->dev,"Panel init sequence failed: %d\n" , ret); +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); +if (dsi_ctx.accum_err) goto disable_iovcc; - }Move this after the last
mipi_dsi_msleep(), merge with the error handling.Quoted 7 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +0
-6- - ret =mipi_dsi_dcs_set_display_on (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to set display on: %d\n" , ret); - goto disable_iovcc; - }
Quoted 3 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c static int kd35t133_prepare(struct drm_panel *panel) · line 141
Quoted 1 line
drivers/gpu/drm/panel/panel-elida-kd35t133.c +0
-0msleep (50 );
mipi_dsi_msleep()
Is this necessary though? Converting this msleep to mipi_dsi_msleep and moving the previous dsi_ctx.accum_err check to below this seems redundant. If the check is placed above msleep, then we need to only check for the error once. If its placed below mipi_dsi_msleep, we end up checking for the error twice (once as written in the code, once in the code generated by the macro) which is unnecessary.
Signature · 1 line
Tejas Vipin
Quoted 55 lines · Tejas Vipin
Quoted 48 lines · Dmitry Baryshkov
Quoted 26 lines · Tejas Vipin
Changes the elida-kd35t133 panel to use multi style functions for improved error handling.
Signed-off-by Tejas Vipin <[email protected]>--- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 107 ++++++++----------- 1 file changed, 45 insertions(+), 62 deletions(-)drivers/gpu/drm/panel/panel-elida-kd35t133.c +3
-6@@ -135,25 +127,16 @@ static int kd35t133_prepare(struct drm_panel *panel)msleep (20 ); - ret =mipi_dsi_dcs_exit_sleep_mode (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to exit sleep mode: %d\n" , ret); - goto disable_iovcc; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx); +mipi_dsi_msleep (&dsi_ctx,250 ); -msleep (250 ); +kd35t133_init_sequence (&dsi_ctx);drivers/gpu/drm/panel/panel-elida-kd35t133.c static int kd35t133_prepare(struct drm_panel *panel) · line 150
Quoted 10 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +4
-4+if (!dsi_ctx.accum_err) +dev_dbg (ctx->dev,"Panel init sequence done\n" ); - ret =kd35t133_init_sequence (ctx); -if (ret <0 ) { -dev_err (ctx->dev,"Panel init sequence failed: %d\n" , ret); +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); +if (dsi_ctx.accum_err) goto disable_iovcc; - }Move this after the last
mipi_dsi_msleep(), merge with the error handling.Quoted 7 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c +0
-6- - ret =mipi_dsi_dcs_set_display_on (dsi); -if (ret <0 ) { -dev_err (ctx->dev,"Failed to set display on: %d\n" , ret); - goto disable_iovcc; - }Quoted 3 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c static int kd35t133_prepare(struct drm_panel *panel) · line 141
Quoted 1 line
drivers/gpu/drm/panel/panel-elida-kd35t133.c +0
-0msleep (50 );
mipi_dsi_msleep()
Quoted 6 lines
Is this necessary though? Converting this msleep to
mipi_dsi_msleepand moving the previous dsi_ctx.accum_err check to below this seems redundant. If the check is placed above msleep, then we need to only check for the error once. If its placed belowmipi_dsi_msleep, we end up checking for the error twice (once as written in the code, once in the code generated by the macro) which is unnecessary.
Yes, uniformity. And the compiler will most likely optimize things away.
Quoted 3 lines
Signature · 2 lines
-- Tejas Vipin
Signature · 2 lines
With best wishes Dmitry