Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0eda804 authored by Animesh Kishore's avatar Animesh Kishore Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Constant fetch across dfps



Timing engine HW restricts changing programmable fetch
start when off. Program constant fetch start in SW drivers.
Fix fetch start is calculated based on panel DT timings.

Change-Id: I2124c92b2f83d9c963e05c14421f61a08878d63b
Signed-off-by: default avatarAnimesh Kishore <animeshk@codeaurora.org>
parent 0d19582e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1713,7 +1713,7 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl, bool handoff);
int mdss_mdp_ctl_stop(struct mdss_mdp_ctl *ctl, int panel_power_mode);
int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg,
	u32 flags);
int mdss_mdp_get_prefetch_lines(struct mdss_panel_info *pinfo);
int mdss_mdp_get_prefetch_lines(struct mdss_panel_info *pinfo, bool is_fixed);
int mdss_mdp_perf_bw_check(struct mdss_mdp_ctl *ctl,
		struct mdss_mdp_pipe **left_plist, int left_cnt,
		struct mdss_mdp_pipe **right_plist, int right_cnt);
+6 −2
Original line number Diff line number Diff line
@@ -1506,7 +1506,7 @@ static bool is_mdp_prefetch_needed(struct mdss_panel_info *pinfo)
 * the mdp fetch lines  as the last (25 - vbp - vpw) lines of vertical
 * front porch.
 */
int mdss_mdp_get_prefetch_lines(struct mdss_panel_info *pinfo)
int mdss_mdp_get_prefetch_lines(struct mdss_panel_info *pinfo, bool is_fixed)
{
	int prefetch_avail = 0;
	int v_total, vfp_start;
@@ -1515,7 +1515,11 @@ int mdss_mdp_get_prefetch_lines(struct mdss_panel_info *pinfo)
	if (!is_mdp_prefetch_needed(pinfo))
		return 0;

	if (is_fixed)
		v_total = mdss_panel_get_vtotal_fixed(pinfo);
	else
		v_total = mdss_panel_get_vtotal(pinfo);

	vfp_start = (pinfo->lcdc.v_back_porch + pinfo->lcdc.v_pulse_width +
			pinfo->yres);

+9 −5
Original line number Diff line number Diff line
@@ -959,6 +959,7 @@ static void mdss_mdp_video_vsync_intr_done(void *arg)
	struct mdss_mdp_video_ctx *ctx = ctl->intf_ctx[MASTER_CTX];
	struct mdss_mdp_vsync_handler *tmp;
	ktime_t vsync_time;
	u32 ctl_flush_bits = 0;

	if (!ctx) {
		pr_err("invalid ctx\n");
@@ -970,10 +971,13 @@ static void mdss_mdp_video_vsync_intr_done(void *arg)

	mdss_debug_frc_add_vsync_sample(ctl, vsync_time);

	MDSS_XLOG(ctl->num, ctl->vsync_cnt, ctl->vsync_cnt);
	ctl_flush_bits = mdss_mdp_ctl_read(ctl, MDSS_MDP_REG_CTL_FLUSH);

	pr_debug("intr ctl=%d vsync cnt=%u vsync_time=%d\n",
		 ctl->num, ctl->vsync_cnt, (int)ktime_to_ms(vsync_time));
	MDSS_XLOG(ctl->num, ctl->vsync_cnt, ctl_flush_bits);

	pr_debug("intr ctl=%d vsync cnt=%u vsync_time=%d ctl_flush=%d\n",
		 ctl->num, ctl->vsync_cnt, (int)ktime_to_ms(vsync_time),
		 ctl_flush_bits);

	ctx->polling_en = false;
	complete_all(&ctx->vsync_comp);
@@ -1716,7 +1720,7 @@ 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);
	pinfo->prg_fet = mdss_mdp_get_prefetch_lines(pinfo, true);
	if (!pinfo->prg_fet) {
		pr_debug("programmable fetch is not needed/supported\n");

@@ -1735,7 +1739,7 @@ static void mdss_mdp_fetch_start_config(struct mdss_mdp_video_ctx *ctx,
	 * Fetch should always be outside the active lines. If the fetching
	 * is programmed within active region, hardware behavior is unknown.
	 */
	v_total = mdss_panel_get_vtotal(pinfo);
	v_total = mdss_panel_get_vtotal_fixed(pinfo);
	h_total = mdss_panel_get_htotal(pinfo, true);

	fetch_start = (v_total - pinfo->prg_fet) * h_total + 1;
+1 −2
Original line number Diff line number Diff line
@@ -3760,8 +3760,7 @@ static void dfps_update_panel_params(struct mdss_panel_data *pdata,
		dfps_update_fps(&pdata->panel_info, new_fps);

		pdata->panel_info.prg_fet =
			mdss_mdp_get_prefetch_lines(&pdata->panel_info);

			mdss_mdp_get_prefetch_lines(&pdata->panel_info, false);
	} else if (pdata->panel_info.dfps_update ==
			DFPS_IMMEDIATE_PORCH_UPDATE_MODE_HFP) {
		int add_h_pixels;
+1 −0
Original line number Diff line number Diff line
@@ -633,6 +633,7 @@ void mdss_panel_info_from_timing(struct mdss_panel_timing *pt,

	pinfo->yres = pt->yres;
	pinfo->lcdc.v_front_porch = pt->v_front_porch;
	pinfo->lcdc.v_front_porch_fixed = pt->v_front_porch;
	pinfo->lcdc.v_back_porch = pt->v_back_porch;
	pinfo->lcdc.v_pulse_width = pt->v_pulse_width;

Loading