summaryrefslogtreecommitdiff
path: root/samsung/panel/panel-samsung-s6e3hc3-c10.c
diff options
context:
space:
mode:
Diffstat (limited to 'samsung/panel/panel-samsung-s6e3hc3-c10.c')
-rw-r--r--samsung/panel/panel-samsung-s6e3hc3-c10.c14
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,