From 0e4cb371f4db2e1ea897ff5f83913d1fb7a42486 Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Thu, 18 Aug 2016 17:34:27 +0200 Subject: [PATCH] drm/panel/s6e3ha2: use internal helper instead of mipi_dsi_dcs_write_buffer Since driver have its own helper to write dcs commands there is no need to call mipi-dsi helpers. Change-Id: I9924bfd1ef18130fd36b6120cec0cd6c9dcfc277 Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/panel/panel-s6e3ha2.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-s6e3ha2.c b/drivers/gpu/drm/panel/panel-s6e3ha2.c index 0ee77ae..7f9662a 100644 --- a/drivers/gpu/drm/panel/panel-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -480,30 +480,14 @@ static void s6e3ha2_gamma_update_l(struct s6e3ha2 *ctx) static void s6e3ha2_vr_enable(struct s6e3ha2 *ctx, int enable) { - struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); - ssize_t ret; - const u8 *cmds; - u32 cmd_len; - - if (enable) { - cmds = MDNIE_6500K; - cmd_len = ARRAY_SIZE(MDNIE_6500K); - } else { - cmds = MDNIE_BYPASS; - cmd_len = ARRAY_SIZE(MDNIE_BYPASS); - } - /* TEST KEY ENABLE. */ s6e3ha2_test_key_on_f0(ctx); s6e3ha2_test_key_on_fc(ctx); - ret = mipi_dsi_dcs_write_buffer(dsi, cmds, cmd_len); - if (ret < 0) { - dev_err(ctx->dev, "error %zd writing dcs seq: %*ph\n", ret, - (int)cmd_len, cmds); - ctx->error = ret; - return; - } + if (enable) + s6e3ha2_dcs_write(ctx, MDNIE_6500K, ARRAY_SIZE(MDNIE_6500K)); + else + s6e3ha2_dcs_write(ctx, MDNIE_BYPASS, ARRAY_SIZE(MDNIE_BYPASS)); /* TEST KEY DISABLE. */ s6e3ha2_test_key_off_f0(ctx); -- 2.7.4