drm/panel/s6e3ha2: merge brightness setting for normal and HMT mode
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 12 Sep 2016 10:21:57 +0000 (12:21 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:52:59 +0000 (13:52 +0900)
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 <a.hajda@samsung.com>
drivers/gpu/drm/panel/panel-s6e3ha2.c

index 29d9471..5aed946 100644 (file)
@@ -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);
 }