diff options
author | Midas Chien <midaschieh@google.com> | 2022-08-25 20:29:24 +0800 |
---|---|---|
committer | Midas Chien <midaschieh@google.com> | 2022-09-13 07:20:35 +0000 |
commit | b3fea3cd37c69f858928ace9ef8363cf53323e9c (patch) | |
tree | 5521ea2de0315c537d2e975e44732c771704f9b3 | |
parent | 8a91514cab163b56c2914f747c7c551b550c0ef6 (diff) | |
download | lynx-b3fea3cd37c69f858928ace9ef8363cf53323e9c.tar.gz |
panel: s6e3fc5: move LHBM check to common control
Bug: 243179526
Test: LHBM
Signed-off-by: Midas Chien <midaschieh@google.com>
Change-Id: I980d31fbbbe1b1876b142d7169882d93c5cd3e1b
-rw-r--r-- | display/panel-samsung-s6e3fc5.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/display/panel-samsung-s6e3fc5.c b/display/panel-samsung-s6e3fc5.c index 993bf99..acbcd0a 100644 --- a/display/panel-samsung-s6e3fc5.c +++ b/display/panel-samsung-s6e3fc5.c @@ -570,27 +570,6 @@ static void s6e3fc5_set_dimming_on(struct exynos_panel *exynos_panel, static void s6e3fc5_set_local_hbm_mode(struct exynos_panel *exynos_panel, bool local_hbm_en) { - const struct exynos_panel_mode *pmode; - - if (exynos_panel->hbm.local_hbm.enabled == local_hbm_en) - return; - - pmode = exynos_panel->current_mode; - if (unlikely(pmode == NULL)) { - dev_err(exynos_panel->dev, "%s: unknown current mode\n", __func__); - return; - } - if (local_hbm_en) { - const int vrefresh = drm_mode_vrefresh(&pmode->mode); - /* Add check to turn on LHBM @ 90hz only */ - if (vrefresh != 90) { - dev_err(exynos_panel->dev, - "unexpected mode `%s` while enabling LHBM, give up\n", - pmode->mode.name); - return; - } - } - exynos_panel->hbm.local_hbm.enabled = local_hbm_en; s6e3fc5_update_wrctrld(exynos_panel); } @@ -598,9 +577,6 @@ static void s6e3fc5_set_local_hbm_mode(struct exynos_panel *exynos_panel, static void s6e3fc5_mode_set(struct exynos_panel *ctx, const struct exynos_panel_mode *pmode) { - if (!ctx->enabled) - return; - s6e3fc5_change_frequency(ctx, drm_mode_vrefresh(&pmode->mode)); } @@ -692,6 +668,7 @@ static const struct exynos_panel_mode s6e3fc5_modes[] = { { /* 1080x2400 @ 60Hz */ .mode = { + .name = "1080x2400x60", .clock = 168498, .hdisplay = 1080, .hsync_start = 1080 + 32, // add hfp @@ -726,6 +703,7 @@ static const struct exynos_panel_mode s6e3fc5_modes[] = { { /* 1080x2400 @ 90Hz */ .mode = { + .name ="1080x2400x90", .clock = 252747, .hdisplay = 1080, .hsync_start = 1080 + 32, // add hfp |