diff options
author | gilliu <gilliu@google.com> | 2023-05-17 16:29:27 +0800 |
---|---|---|
committer | Gil Liu <gilliu@google.com> | 2023-06-09 06:53:37 +0000 |
commit | 3df59310a543d6160df8bcc91127621fa6deceb4 (patch) | |
tree | a0b4c162322c71727747d79f165dcf3cf14188e4 | |
parent | a15e3c7cc09be1ae512188daa59d0f1494d67245 (diff) | |
download | lynx-3df59310a543d6160df8bcc91127621fa6deceb4.tar.gz |
panel: s6e3fc5: use pixel_off cmd instead of DBV 0android-u-qpr2-beta-1_r0.6android-u-qpr2-beta-1_r0.5android-u-qpr2-beta-1_r0.4android-u-qpr2-beta-1_r0.3android-u-qpr2-beta-1_r0.2android-u-qpr2-beta-1_r0.1android-u-qpr1-beta-2_r0.7android-u-qpr1-beta-2_r0.5android-u-qpr1-beta-2_r0.4android-u-qpr1-beta-2_r0.3android-u-qpr1-beta-2_r0.2android-u-qpr1-beta-2_r0.1android-u-qpr1-beta-2.2_r0.6android-u-qpr1-beta-2.2_r0.5android-u-qpr1-beta-2.2_r0.4android-u-qpr1-beta-2.2_r0.3android-u-qpr1-beta-2.2_r0.2android-u-qpr1-beta-2.2_r0.1android-u-qpr1-beta-2.1_r0.7android-u-qpr1-beta-2.1_r0.5android-u-qpr1-beta-2.1_r0.4android-u-qpr1-beta-2.1_r0.3android-u-qpr1-beta-2.1_r0.2android-u-qpr1-beta-2.1_r0.1android-u-qpr1-beta-1_r0.7android-u-qpr1-beta-1_r0.5android-u-qpr1-beta-1_r0.4android-u-qpr1-beta-1_r0.3android-u-qpr1-beta-1_r0.2android-u-qpr1-beta-1_r0.1android-14.0.0_r0.25android-14.0.0_r0.23android-14.0.0_r0.22android-14.0.0_r0.21android-14.0.0_r0.19android-gs-tangorpro-5.10-u-qpr1-beta2android-gs-tangorpro-5.10-android14-qpr1-betaandroid-gs-raviole-5.10-u-qpr1-beta2android-gs-raviole-5.10-android14-qpr1-betaandroid-gs-pantah-5.10-u-qpr1-beta2android-gs-pantah-5.10-android14-qpr1-betaandroid-gs-lynx-5.10-u-qpr1-beta2android-gs-lynx-5.10-android14-qpr1-betaandroid-gs-felix-5.10-u-qpr1-beta2android-gs-felix-5.10-android14-qpr1-betaandroid-gs-bluejay-5.10-u-qpr1-beta2android-gs-bluejay-5.10-android14-qpr1-beta
Bug: 273178705
Test: green flicker regression test result passed
Change-Id: I2dc272da60844b10a07ca1a8d3ad58de63a962ba
-rw-r--r-- | display/panel-samsung-s6e3fc5.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/display/panel-samsung-s6e3fc5.c b/display/panel-samsung-s6e3fc5.c index 80866cc..277946d 100644 --- a/display/panel-samsung-s6e3fc5.c +++ b/display/panel-samsung-s6e3fc5.c @@ -50,6 +50,8 @@ static const u8 test_key_off_f1[] = { 0xF1, 0xA5, 0xA5 }; static const u8 freq_update[] = { 0xF7, 0x0F }; static const u8 new_gamma_ip_bypass[] = { 0x68, 0x01 }; static const u8 new_gamma_ip_enable[] = { 0x68, 0x02 }; +static const u8 pixel_off[] = { 0x22 }; +static const u8 normal_on[] = { 0x13 }; static const u32 lhbm_1300_1100_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {922974324, 910436713, 898442180}; static const u32 lhbm_990_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1089563019, 1063348416, 1099934254}; static const u32 lhbm_1208_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1029306415, 1018581722, 1029205963}; @@ -162,6 +164,11 @@ struct s6e3fc5_panel { u8 ns_cmd[LHBM_GAMMA_CMD_SIZE]; u8 aod_cmd[LHBM_GAMMA_CMD_SIZE]; } local_hbm_gamma; + /** + * @is_pixel_off: pixel-off command is sent to panel. Only sending normal-on or resetting + * panel can recover to normal mode after entering pixel-off state. + */ + bool is_pixel_off; }; #define to_spanel(ctx) container_of(ctx, struct s6e3fc5_panel, base) @@ -470,16 +477,35 @@ static void s6e3fc5_update_wrctrld(struct exynos_panel *ctx) static int s6e3fc5_set_brightness(struct exynos_panel *ctx, u16 br) { u16 brightness; + struct s6e3fc5_panel *spanel = to_spanel(ctx); if (ctx->current_mode->exynos_mode.is_lp_mode) { const struct exynos_panel_funcs *funcs; + /* don't stay at pixel-off state in AOD, or black screen is possibly seen */ + if (spanel->is_pixel_off) { + EXYNOS_DCS_WRITE_TABLE(ctx, normal_on); + spanel->is_pixel_off = false; + } funcs = ctx->desc->exynos_panel_func; if (funcs && funcs->set_binned_lp) funcs->set_binned_lp(ctx, br); return 0; } + /* Use pixel off command instead of setting DBV 0 */ + if (!br) { + if (!spanel->is_pixel_off) { + EXYNOS_DCS_WRITE_TABLE(ctx, pixel_off); + spanel->is_pixel_off = true; + dev_dbg(ctx->dev, "%s: pixel off instead of dbv 0\n", __func__); + } + return 0; + } else if (br && spanel->is_pixel_off) { + EXYNOS_DCS_WRITE_TABLE(ctx, normal_on); + spanel->is_pixel_off = false; + } + if (ctx->panel_rev <= PANEL_REV_EVT1_0_2 && br >= MAX_BR_HBM_EVT1_0_2) { br = MAX_BR_HBM_EVT1_0_2; dev_dbg(ctx->dev, "%s: capped to dbv(%d) for EVT1_0_2 and before\n", @@ -677,6 +703,7 @@ static int s6e3fc5_panel_probe(struct mipi_dsi_device *dsi) return -ENOMEM; spanel->base.op_hz = 90; + spanel->is_pixel_off = false; return exynos_panel_common_init(dsi, &spanel->base); } |