From 7f1165e2d8b09f322c63866f1d9f409d117ace5f Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Mon, 12 Sep 2016 12:21:57 +0200 Subject: [PATCH] drm/panel/s6e3ha2: merge brightness setting for normal and HMT mode Both functions do the same thing, the only difference is the order of operations, which is incorrect in case of normal mode. Change-Id: I2f6850d3b6ae9c0afeafda74756ee2a78166da36 Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/panel/panel-s6e3ha2.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-s6e3ha2.c b/drivers/gpu/drm/panel/panel-s6e3ha2.c index 29d9471..5aed946 100644 --- a/drivers/gpu/drm/panel/panel-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -966,35 +966,15 @@ static void s6e3ha2_update_gamma(struct s6e3ha2 *ctx) s6e3ha2_dcs_write(ctx, data, ARRAY_SIZE(data)); } -static void s6e3ha2_set_hmt_brightness(struct s6e3ha2 *ctx) -{ - s6e3ha2_test_key_on_f0(ctx); - s6e3ha2_test_key_on_fc(ctx); - - s6e3ha2_update_gamma(ctx); - s6e3ha2_aid_control(ctx); - s6e3ha2_set_elvss(ctx); - s6e3ha2_set_vint(ctx); - s6e3ha2_panel_update(ctx); - - s6e3ha2_test_key_off_fc(ctx); - s6e3ha2_test_key_off_f0(ctx); - /* TODO */ -} - static void s6e3ha2_set_brightness(struct s6e3ha2 *ctx) { s6e3ha2_update_nit_index(ctx); - - if (ctx->hmt_mode) { - s6e3ha2_set_hmt_brightness(ctx); - return; - } s6e3ha2_test_key_on_f0(ctx); s6e3ha2_update_gamma(ctx); - s6e3ha2_panel_update(ctx); s6e3ha2_aid_control(ctx); + s6e3ha2_set_elvss(ctx); s6e3ha2_set_vint(ctx); + s6e3ha2_panel_update(ctx); s6e3ha2_test_key_off_f0(ctx); } -- 2.7.4