summaryrefslogtreecommitdiff
path: root/samsung
diff options
context:
space:
mode:
Diffstat (limited to 'samsung')
-rw-r--r--samsung/exynos_drm_bts.c10
-rw-r--r--samsung/exynos_drm_decon.c7
-rw-r--r--samsung/exynos_drm_decon.h1
3 files changed, 18 insertions, 0 deletions
diff --git a/samsung/exynos_drm_bts.c b/samsung/exynos_drm_bts.c
index 8bed570..7fc453a 100644
--- a/samsung/exynos_drm_bts.c
+++ b/samsung/exynos_drm_bts.c
@@ -882,6 +882,16 @@ static void dpu_bts_update_resources(struct decon_device *decon, bool shadow_upd
DPU_DEBUG_BTS(" peak = %u, rt = %u, read = %u, write = %u\n",
bw.peak, bw.rt, bw.read, bw.write);
+ /* When concurrent writeback is enabled, writeback instant off may occur if the outfifo
+ * for writeback is full meanwhile the outfifo for LCD is not full yet.
+ * We can limit max_disp_freq to avoid it when concurrent writeback is enabled.
+ * Currently, the issue only occurs when all layers are solid color layers (read = 0).
+ */
+ if ((decon->bts.max_dfs_lv_for_wb > 0) && (bw.read == 0) && (bw.write > 0)) {
+ decon->bts.max_disp_freq =
+ min(decon->bts.max_disp_freq, decon->bts.max_dfs_lv_for_wb);
+ }
+
if (shadow_updated) {
/* after DECON h/w configs are updated to shadow SFR */
if (decon->bts.total_bw < decon->bts.prev_total_bw ||
diff --git a/samsung/exynos_drm_decon.c b/samsung/exynos_drm_decon.c
index f5f1e23..74adb9e 100644
--- a/samsung/exynos_drm_decon.c
+++ b/samsung/exynos_drm_decon.c
@@ -1843,6 +1843,13 @@ static int decon_parse_dt(struct decon_device *decon, struct device_node *np)
decon_info(decon, "\n");
}
+ if (of_property_read_u32(np, "max_dfs_lv_for_wb", &decon->bts.max_dfs_lv_for_wb)) {
+ decon->bts.max_dfs_lv_for_wb = 0;
+ decon_debug(decon, "max_dfs_lv_for_wb is not defined in DT.\n");
+ } else {
+ decon_debug(decon, "max_dfs_lv_for_wb(%u)\n", decon->bts.max_dfs_lv_for_wb);
+ }
+
decon->dpp_cnt = of_count_phandle_with_args(np, "dpps", NULL);
for (i = 0; i < decon->dpp_cnt; ++i) {
dpp_np = of_parse_phandle(np, "dpps", i);
diff --git a/samsung/exynos_drm_decon.h b/samsung/exynos_drm_decon.h
index e9f3fa1..69f707d 100644
--- a/samsung/exynos_drm_decon.h
+++ b/samsung/exynos_drm_decon.h
@@ -155,6 +155,7 @@ struct dpu_bts {
u32 afbc_yuv_rt_util_pct;
u32 dfs_lv_cnt;
u32 dfs_lv_khz[BTS_DFS_MAX];
+ u32 max_dfs_lv_for_wb;
u32 vbp;
u32 vfp;
u32 vsa;