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

Commit 06d88132 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: add iommu attach in bus bandwidth control request"

parents 1b7c7aa3 6d62aa31
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -194,6 +194,8 @@ struct mdss_data_type {
	bool mixer_switched;
	struct mdss_panel_cfg pan_cfg;
	struct mdss_prefill_data prefill_data;

	int handoff_pending;
};
extern struct mdss_data_type *mdss_res;

+11 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ struct msm_mdp_interface mdp5 = {
static DEFINE_SPINLOCK(mdp_lock);
static DEFINE_MUTEX(mdp_clk_lock);
static DEFINE_MUTEX(bus_bw_lock);
static DEFINE_MUTEX(mdp_iommu_lock);

static struct mdss_panel_intf pan_types[] = {
	{"dsi", MDSS_PANEL_INTF_DSI},
@@ -701,6 +702,8 @@ void mdss_bus_bandwidth_ctrl(int enable)
			pm_runtime_get_sync(&mdata->pdev->dev);
			msm_bus_scale_client_update_request(
				mdata->bus_hdl, mdata->curr_bw_uc_idx);
			if (!mdata->handoff_pending)
				mdss_iommu_attach(mdata);
		}
	}

@@ -833,8 +836,10 @@ int mdss_iommu_attach(struct mdss_data_type *mdata)
	struct mdss_iommu_map_type *iomap;
	int i;

	mutex_lock(&mdp_iommu_lock);
	if (mdata->iommu_attached) {
		pr_debug("mdp iommu already attached\n");
		mutex_unlock(&mdp_iommu_lock);
		return 0;
	}

@@ -851,6 +856,7 @@ int mdss_iommu_attach(struct mdss_data_type *mdata)
	}

	mdata->iommu_attached = true;
	mutex_unlock(&mdp_iommu_lock);

	return 0;
}
@@ -861,8 +867,10 @@ int mdss_iommu_dettach(struct mdss_data_type *mdata)
	struct mdss_iommu_map_type *iomap;
	int i;

	mutex_lock(&mdp_iommu_lock);
	if (!mdata->iommu_attached) {
		pr_debug("mdp iommu already dettached\n");
		mutex_unlock(&mdp_iommu_lock);
		return 0;
	}

@@ -879,6 +887,7 @@ int mdss_iommu_dettach(struct mdss_data_type *mdata)
	}

	mdata->iommu_attached = false;
	mutex_unlock(&mdp_iommu_lock);

	return 0;
}
@@ -1104,6 +1113,7 @@ void mdss_mdp_footswitch_ctrl_splash(int on)
	if (mdata != NULL) {
		if (on) {
			pr_debug("Enable MDP FS for splash.\n");
			mdata->handoff_pending = true;
			ret = regulator_enable(mdata->fs);
			if (ret)
				pr_err("Footswitch failed to enable\n");
@@ -1111,6 +1121,7 @@ void mdss_mdp_footswitch_ctrl_splash(int on)
		} else {
			pr_debug("Disable MDP FS for splash.\n");
			regulator_disable(mdata->fs);
			mdata->handoff_pending = false;
		}
	} else {
		pr_warn("mdss mdata not initialized\n");
+1 −1
Original line number Diff line number Diff line
@@ -2617,8 +2617,8 @@ int mdss_panel_register_done(struct mdss_panel_data *pdata)
	 * increasing ref_cnt to help balance clocks once done.
	 */
	if (pdata->panel_info.cont_splash_enabled) {
		mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);
		mdss_mdp_footswitch_ctrl_splash(1);
		mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);
	}
	return 0;
}