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

Commit ec5797a7 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: restore mdss register when clocks are turned on"

parents 37a937e0 6f178983
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -862,7 +862,6 @@ void mdss_bus_bandwidth_ctrl(int enable)
			pm_runtime_put(&mdata->pdev->dev);
		} else {
			pm_runtime_get_sync(&mdata->pdev->dev);
			mdss_mdp_idle_pc_restore();
			msm_bus_scale_client_update_request(
				mdata->bus_hdl, mdata->curr_bw_uc_idx);
		}
@@ -914,6 +913,9 @@ void mdss_mdp_clk_ctrl(int enable)
	}

	mutex_unlock(&mdp_clk_lock);

	if (enable && changed)
		mdss_mdp_idle_pc_restore();
}

static inline int mdss_mdp_irq_clk_register(struct mdss_data_type *mdata,
@@ -1161,13 +1163,20 @@ static void mdss_hw_rev_init(struct mdss_data_type *mdata)
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
}

/**
 * mdss_hw_init() - Initialize MDSS target specific register settings
 * @mdata: MDP private data
 *
 * Initialize basic MDSS hardware settings based on the board specific
 * parameters. This function does not explicitly turn on the MDP clocks
 * and so it must be called with the MDP clocks already enabled.
 */
int mdss_hw_init(struct mdss_data_type *mdata)
{
	int i, j;
	char *offset;
	struct mdss_mdp_pipe *vig;

	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
	mdss_hw_rev_init(mdata);

	/* disable hw underrun recovery */
@@ -1209,7 +1218,6 @@ int mdss_hw_init(struct mdss_data_type *mdata)
		for (i = 0; i < mdata->nvig_pipes; i++)
			mdss_mdp_hscl_init(&vig[i]);

	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
	pr_debug("MDP hw init done\n");

	return 0;
+4 −1
Original line number Diff line number Diff line
@@ -1188,6 +1188,8 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)

	pr_debug("starting fb%d overlay\n", mfd->index);

	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);

	/*
	 * If idle pc feature is not enabled, then get a reference to the
	 * runtime device which will be released when overlay is turned off
@@ -1214,7 +1216,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)
			rc = mdss_iommu_ctrl(1);
			if (IS_ERR_VALUE(rc)) {
				pr_err("iommu attach failed rc=%d\n", rc);
				return rc;
				goto end;
			}
			mdss_hw_init(mdss_res);
			mdss_iommu_ctrl(0);
@@ -1245,6 +1247,7 @@ ctl_error:
	atomic_dec(&mdp5_data->mdata->active_intf_cnt);
	mdp5_data->ctl = NULL;
end:
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
	return rc;
}