Skip to content

Commit a34ebe7

Browse files
AntonioBorneosravnborg
authored andcommitted
drm/panel: otm8009a: remove hack to force commands in HS
The panel is able to receive commands in LP. The current hack to force backlight commands in HS was due to workaround an incorrect settings on DSI controller that prevents sending LP commands while video out was active. Remove the hack that forces HS commands. Changes in v2: - Added my signed-off Signed-off-by: Antonio Borneo <[email protected]> Signed-off-by: Yannick Fertre <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 61c523b commit a34ebe7

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

drivers/gpu/drm/panel/panel-orisetech-otm8009a.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,6 @@ static void otm8009a_dcs_write_buf(struct otm8009a *ctx, const void *data,
9999
dev_warn(ctx->dev, "mipi dsi dcs write buffer failed\n");
100100
}
101101

102-
static void otm8009a_dcs_write_buf_hs(struct otm8009a *ctx, const void *data,
103-
size_t len)
104-
{
105-
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
106-
107-
/* data will be sent in dsi hs mode (ie. no lpm) */
108-
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
109-
110-
otm8009a_dcs_write_buf(ctx, data, len);
111-
112-
/* restore back the dsi lpm mode */
113-
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
114-
}
115-
116102
#define dcs_write_seq(ctx, seq...) \
117103
({ \
118104
static const u8 d[] = { seq }; \
@@ -400,7 +386,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
400386
*/
401387
data[0] = MIPI_DCS_SET_DISPLAY_BRIGHTNESS;
402388
data[1] = bd->props.brightness;
403-
otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
389+
otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
404390

405391
/* set Brightness Control & Backlight on */
406392
data[1] = 0x24;
@@ -412,7 +398,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
412398

413399
/* Update Brightness Control & Backlight */
414400
data[0] = MIPI_DCS_WRITE_CONTROL_DISPLAY;
415-
otm8009a_dcs_write_buf_hs(ctx, data, ARRAY_SIZE(data));
401+
otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
416402

417403
return 0;
418404
}

0 commit comments

Comments
 (0)