diff options
author | Ken Huang <kenbshuang@google.com> | 2022-06-20 14:27:01 +0800 |
---|---|---|
committer | TreeHugger Robot <treehugger-gerrit@google.com> | 2022-07-06 02:57:58 +0000 |
commit | 1bc011d3ea049d2894dcaf7aa6c90cf0c1f3e2c3 (patch) | |
tree | 4f4d315f46739ce26cd3aefb0a1106af2ab309c0 /samsung/panel/panel-samsung-s6e3hc3-c10.c | |
parent | bef5ea0e21f64e7598e85d6712b15678179a8e9b (diff) | |
download | display-1bc011d3ea049d2894dcaf7aa6c90cf0c1f3e2c3.tar.gz |
panel: update te2 in commit done if there changes state or frequency
Update TE2 settings if updating state or frequency in commit_done.
Bug: 235463516
Test: enable/disable smooth display frequently
Signed-off-by: Ken Huang <kenbshuang@google.com>
Change-Id: I8e507c6e5a44ec62353ffee209d89c4fd076a92a
Diffstat (limited to 'samsung/panel/panel-samsung-s6e3hc3-c10.c')
-rw-r--r-- | samsung/panel/panel-samsung-s6e3hc3-c10.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/samsung/panel/panel-samsung-s6e3hc3-c10.c b/samsung/panel/panel-samsung-s6e3hc3-c10.c index 70ae4e1..9517055 100644 --- a/samsung/panel/panel-samsung-s6e3hc3-c10.c +++ b/samsung/panel/panel-samsung-s6e3hc3-c10.c @@ -808,20 +808,21 @@ static int s6e3hc3_c10_disable(struct drm_panel *panel) * - trigger early exit by command if it's changeable TE, which could result in * fast 120 Hz boost and seeing 120 Hz TE earlier */ -static void s6e3hc3_c10_update_idle_state(struct exynos_panel *ctx) +static bool s6e3hc3_c10_update_idle_state(struct exynos_panel *ctx) { s64 delta_us; struct s6e3hc3_c10_panel *spanel = to_spanel(ctx); + bool updated = false; ctx->panel_idle_vrefresh = 0; if (!test_bit(C10_FEAT_FRAME_AUTO, spanel->feat)) - return; + return false; delta_us = ktime_us_delta(ktime_get(), ctx->last_commit_ts); if (delta_us < EARLY_EXIT_THRESHOLD_US) { dev_dbg(ctx->dev, "skip early exit. %lldus since last commit\n", delta_us); - return; + return false; } /* triggering early exit causes a switch to 120hz */ @@ -835,6 +836,7 @@ static void s6e3hc3_c10_update_idle_state(struct exynos_panel *ctx) if (ctx->idle_delay_ms) { const struct exynos_panel_mode *pmode = ctx->current_mode; s6e3hc3_c10_update_refresh_mode(ctx, pmode, 0); + updated = true; } else if (spanel->force_changeable_te) { dev_dbg(ctx->dev, "sending early exit out cmd\n"); EXYNOS_DCS_BUF_ADD_SET(ctx, unlock_cmd_f0); @@ -843,14 +845,18 @@ static void s6e3hc3_c10_update_idle_state(struct exynos_panel *ctx) } DPU_ATRACE_END(__func__); + + return updated; } +/* TODO: move update te2 to common display driver for other panel drivers */ static void s6e3hc3_c10_commit_done(struct exynos_panel *ctx) { if (!ctx->enabled || !ctx->current_mode) return; - s6e3hc3_c10_update_idle_state(ctx); + if (s6e3hc3_c10_update_idle_state(ctx)) + s6e3hc3_c10_update_te2(ctx); } static void s6e3hc3_c10_set_hbm_mode(struct exynos_panel *ctx, |