summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <luchris@google.com>2023-05-10 17:24:02 +0800
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-06-22 17:24:45 +0000
commit5c693df7d1560d6da9f980608aefc7aef84855cb (patch)
tree20d35abe8dec83c24bd23f6106633dc8b67fc9b3
parent1e80f028aff3693855cc7929fa309f29d267fc4b (diff)
downloadshusky-5c693df7d1560d6da9f980608aefc7aef84855cb.tar.gz
panel: hk3: add negative field code
Apply negative field code to minimize green flash risk. Bug: 280492246 Bug: 282589601 Test: enter/exit AOD, AOD brightness, HW measurement Change-Id: Ia0ca7116fcdbeb00d84f81174d7f98e69e7e7279 Signed-off-by: Chris Lu <luchris@google.com>
-rw-r--r--display/panel-google-hk3.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/display/panel-google-hk3.c b/display/panel-google-hk3.c
index d55d79d..a512b80 100644
--- a/display/panel-google-hk3.c
+++ b/display/panel-google-hk3.c
@@ -1533,6 +1533,23 @@ static void hk3_lhbm_luminance_opr_setting(struct exynos_panel *ctx)
EXYNOS_DCS_BUF_ADD_SET_AND_FLUSH(ctx, lock_cmd_f0);
}
+static void hk3_negative_field_setting(struct exynos_panel *ctx)
+{
+ /* all settings will take effect in AOD mode automatically */
+ EXYNOS_DCS_BUF_ADD_SET(ctx, unlock_cmd_f0);
+ /* Vint -3V */
+ EXYNOS_DCS_BUF_ADD(ctx, 0xB0, 0x00, 0x21, 0xF4);
+ EXYNOS_DCS_BUF_ADD(ctx, 0xF4, 0x1E);
+ /* Vaint -4V */
+ EXYNOS_DCS_BUF_ADD(ctx, 0xB0, 0x00, 0x69, 0xF4);
+ EXYNOS_DCS_BUF_ADD(ctx, 0xF4, 0x78);
+ /* VGL -8V */
+ EXYNOS_DCS_BUF_ADD(ctx, 0xB0, 0x00, 0x17, 0xF4);
+ EXYNOS_DCS_BUF_ADD(ctx, 0xF4, 0x1E);
+ EXYNOS_DCS_BUF_ADD_SET(ctx, freq_update);
+ EXYNOS_DCS_BUF_ADD_SET_AND_FLUSH(ctx, lock_cmd_f0);
+}
+
static int hk3_enable(struct drm_panel *panel)
{
struct exynos_panel *ctx = container_of(panel, struct exynos_panel, panel);
@@ -1568,6 +1585,8 @@ static int hk3_enable(struct drm_panel *panel)
exynos_panel_send_cmd_set(ctx, &hk3_init_cmd_set);
if (ctx->panel_rev == PANEL_REV_PROTO1)
hk3_lhbm_luminance_opr_setting(ctx);
+ if (ctx->panel_rev >= PANEL_REV_DVT1)
+ hk3_negative_field_setting(ctx);
spanel->is_pixel_off = false;
}
@@ -2403,6 +2422,9 @@ static void hk3_panel_init(struct exynos_panel *ctx)
EXYNOS_DCS_BUF_ADD_SET_AND_FLUSH(ctx, lock_cmd_f0);
}
+ if (ctx->panel_rev >= PANEL_REV_DVT1)
+ hk3_negative_field_setting(ctx);
+
spanel->tz = thermal_zone_get_zone_by_name("disp_therm");
if (IS_ERR_OR_NULL(spanel->tz))
dev_err(ctx->dev, "%s: failed to get thermal zone disp_therm\n",