diff options
author | Ken Lin <lyenting@google.com> | 2023-09-05 09:08:15 +0000 |
---|---|---|
committer | Ken Lin <lyenting@google.com> | 2023-09-12 02:59:46 +0000 |
commit | 203b4bbb818e41f9ed51d0e9f198034fa14b3192 (patch) | |
tree | 6e2c69e9d148a4b0f8ad4470721725684f09e9f8 | |
parent | 437eb3738e93b50af6eff9f7cf4044751ad9e402 (diff) | |
download | display-203b4bbb818e41f9ed51d0e9f198034fa14b3192.tar.gz |
display: s6e3hc4: delay DDIC DSC commands for RRS
Delay DDIC DSC commands to the same VSYNC with framestart
Bug: 283929569
Test: Boot on successfully
Test: Verified by PTE
Change-Id: I0971f56200286e408211cce83de9c9126fc3ee9b
Signed-off-by: Ken Lin <lyenting@google.com>
-rw-r--r-- | samsung/panel/panel-samsung-s6e3hc4.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/samsung/panel/panel-samsung-s6e3hc4.c b/samsung/panel/panel-samsung-s6e3hc4.c index aab5519..bda692e 100644 --- a/samsung/panel/panel-samsung-s6e3hc4.c +++ b/samsung/panel/panel-samsung-s6e3hc4.c @@ -1028,6 +1028,7 @@ static int s6e3hc4_enable(struct drm_panel *panel) const struct drm_display_mode *mode; const bool needs_reset = !is_panel_enabled(ctx); bool is_fhd; + u32 vrefresh; if (!pmode) { dev_err(ctx->dev, "no current mode set\n"); @@ -1035,12 +1036,19 @@ static int s6e3hc4_enable(struct drm_panel *panel) } mode = &pmode->mode; is_fhd = mode->hdisplay == 1080; + vrefresh = needs_reset ? 60 : drm_mode_vrefresh(mode); dev_dbg(ctx->dev, "%s\n", __func__); if (needs_reset) exynos_panel_reset(ctx); + /* wait TE falling for RRS since DSC and framestart must in the same VSYNC */ + if (ctx->mode_in_progress == MODE_RES_IN_PROGRESS) + s6e3hc4_wait_for_vsync_done(ctx, vrefresh); + else if (ctx->mode_in_progress == MODE_RES_AND_RR_IN_PROGRESS) + s6e3hc4_wait_for_vsync_done(ctx, ctx->last_rr); + /* DSC related configuration */ EXYNOS_DCS_WRITE_SEQ(ctx, 0x9D, 0x01); EXYNOS_PPS_WRITE_BUF(ctx, is_fhd ? FHD_PPS_SETTING : WQHD_PPS_SETTING); @@ -1068,8 +1076,6 @@ static int s6e3hc4_enable(struct drm_panel *panel) s6e3hc4_change_frequency(ctx, pmode); if (needs_reset || (ctx->panel_state == PANEL_STATE_BLANK)) { - u32 vrefresh = needs_reset ? 60 : drm_mode_vrefresh(&pmode->mode); - s6e3hc4_wait_for_vsync_done(ctx, vrefresh); exynos_panel_send_cmd_set(ctx, &s6e3hc4_display_on_cmd_set); } |