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

Commit a4623bef authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: allow assertive display on write back framebuffer"

parents 6c8e5fae f3552ca0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -166,6 +166,8 @@ Optional properties:
				offsets as well (i.e. the first mixer offset
				corresponds to the same pathway as the first
				AD offset).
- qcom,mdss-has-wb-ad: Boolean property to indicate assertive display feature
				support on write back framebuffer.
- qcom,mdss-has-wfd-blk: Boolean property to indicate the presence of dedicated
			writeback wfd block in MDSS as opposed to writeback
			block that is shared between rotator and wfd.
+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ struct mdss_data_type {
	u32 has_bwc;
	u32 has_decimation;
	u8 has_wfd_blk;
	u8 has_wb_ad;

	u32 mdp_irq_mask;
	u32 mdp_hist_irq_mask;
+3 −0
Original line number Diff line number Diff line
@@ -1977,6 +1977,9 @@ static int mdss_mdp_parse_dt_ad_cfg(struct platform_device *pdev)
	if (mdata->nad_cfgs > mdata->nmixers_intf)
		return -EINVAL;

	mdata->has_wb_ad = of_property_read_bool(pdev->dev.of_node,
		"qcom,mdss-has-wb-ad");

	ad_offsets = kzalloc(sizeof(u32) * mdata->nad_cfgs, GFP_KERNEL);
	if (!ad_offsets) {
		pr_err("no mem assigned: kzalloc fail\n");
+1 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@ struct mdss_overlay_private {

	struct mdss_mdp_data free_list[MAX_FREE_LIST_SIZE];
	int free_list_size;
	int ad_state;
};

struct mdss_mdp_perf_params {
+15 −1
Original line number Diff line number Diff line
@@ -429,6 +429,7 @@ static int mdss_mdp_ctl_free(struct mdss_mdp_ctl *ctl)
	ctl->add_vsync_handler = NULL;
	ctl->remove_vsync_handler = NULL;
	ctl->config_fps_fnc = NULL;
	ctl->panel_data = NULL;
	mutex_unlock(&mdss_mdp_ctl_lock);

	return 0;
@@ -437,7 +438,7 @@ static int mdss_mdp_ctl_free(struct mdss_mdp_ctl *ctl)
static struct mdss_mdp_mixer *mdss_mdp_mixer_alloc(
		struct mdss_mdp_ctl *ctl, u32 type, int mux)
{
	struct mdss_mdp_mixer *mixer = NULL;
	struct mdss_mdp_mixer *mixer = NULL, *alt_mixer = NULL;
	u32 nmixers_intf;
	u32 nmixers_wb;
	u32 i;
@@ -455,6 +456,16 @@ static struct mdss_mdp_mixer *mdss_mdp_mixer_alloc(
	case MDSS_MDP_MIXER_TYPE_INTF:
		mixer_pool = ctl->mdata->mixer_intf;
		nmixers = nmixers_intf;

		/*
		 * try to reserve first layer mixer for write back if
		 * assertive display needs to be supported through wfd
		 */
		if (ctl->mdata->has_wb_ad && ctl->intf_num) {
			alt_mixer = mixer_pool;
			mixer_pool++;
			nmixers--;
		}
		break;

	case MDSS_MDP_MIXER_TYPE_WRITEBACK:
@@ -493,6 +504,9 @@ static struct mdss_mdp_mixer *mdss_mdp_mixer_alloc(
		}
		mixer = NULL;
	}

	if (!mixer && alt_mixer && (alt_mixer->ref_cnt == 0))
		mixer = alt_mixer;
	mutex_unlock(&mdss_mdp_ctl_lock);

	return mixer;
Loading