summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-07-10 08:50:39 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-07-10 08:50:39 -0700
commit505d3dc6f5290e2019c2d3eda77b8e315a35e0a7 (patch)
treed53432fb5873747f6fcb68c343ea4b1ad0cbcb0f
parent6f512dfbfcfb22f0998c722de55446a0ed3a37b1 (diff)
parent6ab8fbb8722867e893816cfa85f529e3625e338e (diff)
Merge "mdss: mdp: Constant fetch start across dfps change"
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_intf_video.c5
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_overlay.c10
-rw-r--r--drivers/video/fbdev/msm/mdss_panel.h4
3 files changed, 15 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c
index 335614a33aaf..607c0647b505 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1901,7 +1901,6 @@ static void mdss_mdp_fetch_start_config(struct mdss_mdp_video_ctx *ctx,
mdata = ctl->mdata;
- pinfo->prg_fet = mdss_mdp_get_prefetch_lines(pinfo);
if (!pinfo->prg_fet) {
pr_debug("programmable fetch is not needed/supported\n");
@@ -2207,6 +2206,8 @@ static int mdss_mdp_video_ctx_setup(struct mdss_mdp_ctl *ctl,
ctx->intf_num);
return -EINVAL;
}
+
+ pinfo->prg_fet = mdss_mdp_get_prefetch_lines(pinfo);
mdss_mdp_fetch_start_config(ctx, ctl);
if (test_bit(MDSS_QOS_VBLANK_PANIC_CTRL, mdata->mdss_qos_map))
diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
index f3984201fbc5..2f5b45638cdb 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
@@ -3367,6 +3367,9 @@ static void cache_initial_timings(struct mdss_panel_data *pdata)
{
if (!pdata->panel_info.default_fps) {
+ pdata->panel_info.default_prg_fet =
+ mdss_mdp_get_prefetch_lines(&pdata->panel_info);
+
/*
* This value will change dynamically once the
* actual dfps update happen in hw.
@@ -3439,8 +3442,13 @@ static void dfps_update_panel_params(struct mdss_panel_data *pdata,
dfps_update_fps(&pdata->panel_info, new_fps);
+ /*
+ * Fetch start is pinned to default fps.
+ * Adjust programmable fetch accordingly.
+ */
pdata->panel_info.prg_fet =
- mdss_mdp_get_prefetch_lines(&pdata->panel_info);
+ (pdata->panel_info.default_prg_fet) ?
+ (pdata->panel_info.default_prg_fet + add_v_lines) : 0;
} else if (pdata->panel_info.dfps_update ==
DFPS_IMMEDIATE_PORCH_UPDATE_MODE_HFP) {
diff --git a/drivers/video/fbdev/msm/mdss_panel.h b/drivers/video/fbdev/msm/mdss_panel.h
index e8255ff45726..7085a9fd7200 100644
--- a/drivers/video/fbdev/msm/mdss_panel.h
+++ b/drivers/video/fbdev/msm/mdss_panel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -814,6 +814,8 @@ struct mdss_panel_info {
int new_fps;
/* stores initial fps after boot */
u32 default_fps;
+ /* store programmable fetch corresponding to default fps */
+ u32 default_prg_fet;
/* stores initial vtotal (vfp-method) or htotal (hfp-method) */
u32 saved_total;
/* stores initial vfp (vfp-method) or hfp (hfp-method) */