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

Commit 0ce3198a authored by Benet Clark's avatar Benet Clark
Browse files

msm: mdss: Prevent AD on WFD configuration



Assertive display is not allowed on HDMI and WFD configurations.
However, since WFD uses the writeback path, and AD uses the
writeback path for earlier hardware, then we must check which
hardware configuration is being used when checking writeback
panel configuration to prevent or allow AD.

Change-Id: I85f7380d0345cad7785ed41e22df559bc5c1618e
Signed-off-by: default avatarBenet Clark <benetc@codeaurora.org>
parent ad5d4c7a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1703,6 +1703,7 @@ int mdss_mdp_pp_setup_locked(struct mdss_mdp_ctl *ctl)
	u32 disp_num;
	int i;
	bool valid_mixers = true;
	bool valid_ad_panel = true;
	if ((!ctl->mfd) || (!mdss_pp_res) || (!mdata))
		return -EINVAL;

@@ -1723,8 +1724,13 @@ int mdss_mdp_pp_setup_locked(struct mdss_mdp_ctl *ctl)
		if (mixer_id[i] >= mdata->nad_cfgs)
			valid_mixers = false;
	}
	valid_ad_panel = (ctl->mfd->panel_info->type != DTV_PANEL) &&
		(((mdata->mdp_rev < MDSS_MDP_HW_REV_103) &&
			(ctl->mfd->panel_info->type == WRITEBACK_PANEL)) ||
		(ctl->mfd->panel_info->type != WRITEBACK_PANEL));

	if (valid_mixers && (mixer_cnt <= mdata->nmax_concurrent_ad_hw) &&
		(ctl->mfd->panel_info->type != DTV_PANEL)) {
		valid_ad_panel) {
		ret = mdss_mdp_ad_setup(ctl->mfd);
		if (ret < 0)
			pr_warn("ad_setup(disp%d) returns %d", disp_num, ret);