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

Commit ba00d5b5 authored by Naseer Ahmed's avatar Naseer Ahmed Committed by Abhijith Desai
Browse files

msm: mdss: Choose the correct PPB for right only update in non-DSC mode



When performing right-only update on a dual LM single display mode with
3D Mux enabled, the right mixer's ping pong buffer should be used.

Change-Id: Ib530d7503ca46a01198cc88de5312635bd84a6fb
Signed-off-by: default avatarNaseer Ahmed <naseer@codeaurora.org>
parent c6a19e21
Loading
Loading
Loading
Loading
+30 −10
Original line number Diff line number Diff line
@@ -52,8 +52,10 @@ struct mdss_mdp_cmd_ctx {
	u32 current_pp_num;
	/*
	 * aux_pp_num will be set only when topology is using split-lm.
	 * aux_pp_num will be used only when MDSS_QUIRK_DSC_RIGHT_ONLY_PU
	 * quirk is set and on following partial updates.
	 * aux_pp_num will be used
	 * if right-only update on DUAL_LM_SINGLE_DISPLAY with 3D Mux
	 * or if MDSS_QUIRK_DSC_RIGHT_ONLY_PU quirk is set
	 * and on following partial updates.
	 *
	 * right-only update on DUAL_LM_SINGLE_DISPLAY with DSC_MERGE
	 * right-only update on DUAL_LM_DUAL_DISPLAY with DSC
@@ -120,14 +122,32 @@ static int mdss_mdp_setup_vsync(struct mdss_mdp_cmd_ctx *ctx, bool enable);
static bool __mdss_mdp_cmd_is_aux_pp_needed(struct mdss_data_type *mdata,
	struct mdss_mdp_ctl *mctl)
{
	return (mdata && mctl && mctl->is_master &&
		mdss_has_quirk(mdata, MDSS_QUIRK_DSC_RIGHT_ONLY_PU) &&
	bool mux3d, merge, quirk, rightonly;

	if (!mdata || !mctl || !mctl->is_master)
		return false;

	/*
	 * aux_pp_num will be used:
	 * if right-only update on DUAL_LM_SINGLE_DISPLAY with 3D Mux
	 * or if MDSS_QUIRK_DSC_RIGHT_ONLY_PU quirk is set
	 * and on following partial updates.
	 *
	 * right-only update on DUAL_LM_SINGLE_DISPLAY with DSC_MERGE
	 * right-only update on DUAL_LM_DUAL_DISPLAY with DSC
	 */
	mux3d = ((mctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY) &&
			(mctl->opmode & MDSS_MDP_CTL_OP_PACK_3D_ENABLE));
	merge = ((mctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY) &&
			(mctl->panel_data->panel_info.dsc_enc_total == 1));
	quirk = (mdss_has_quirk(mdata, MDSS_QUIRK_DSC_RIGHT_ONLY_PU) &&
			is_dsc_compression(&mctl->panel_data->panel_info) &&
			((mctl->mfd->split_mode == MDP_DUAL_LM_DUAL_DISPLAY) ||
		 ((mctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY) &&
		  (mctl->panel_data->panel_info.dsc_enc_total == 1))) &&
		!mctl->mixer_left->valid_roi &&
		mctl->mixer_right->valid_roi);
			merge));
	rightonly = !mctl->mixer_left->valid_roi &&
			mctl->mixer_right->valid_roi;

	return ((mux3d || quirk) && rightonly);
}

static bool __mdss_mdp_cmd_is_panel_power_off(struct mdss_mdp_cmd_ctx *ctx)