Loading drivers/video/msm/mdss/mdss_mdp.c +11 −2 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ static struct msm_bus_scale_pdata mdp_reg_bus_scale_table = { .usecase = mdp_reg_bus_usecases, .num_usecases = ARRAY_SIZE(mdp_reg_bus_usecases), .name = "mdss_reg", .active_only = true, }; static void mdss_mdp_footswitch_ctrl(struct mdss_data_type *mdata, int on); Loading Loading @@ -736,8 +737,9 @@ int mdss_iommu_ctrl(int enable) int rc = 0; mutex_lock(&mdp_iommu_lock); pr_debug("%pS: enable %d mdata->iommu_ref_cnt %d\n", __builtin_return_address(0), enable, mdata->iommu_ref_cnt); pr_debug("%pS: enable:%d ref_cnt:%d attach:%d hoff:%d\n", __builtin_return_address(0), enable, mdata->iommu_ref_cnt, mdata->iommu_attached, mdata->handoff_pending); if (enable) { /* Loading Loading @@ -856,6 +858,7 @@ void mdss_mdp_clk_ctrl(int enable) struct mdss_data_type *mdata = mdss_mdp_get_mdata(); static int mdp_clk_cnt; int changed = 0; int rc = 0; mutex_lock(&mdp_clk_lock); if (enable) { Loading Loading @@ -886,6 +889,10 @@ void mdss_mdp_clk_ctrl(int enable) mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_19_MHZ); rc = mdss_iommu_ctrl(1); if (IS_ERR_VALUE(rc)) pr_err("IOMMU attach failed\n"); /* Active+Sleep */ msm_bus_scale_client_update_context(mdata->bus_hdl, false, mdata->curr_bw_uc_idx); Loading @@ -900,6 +907,8 @@ void mdss_mdp_clk_ctrl(int enable) mdss_mdp_clk_update(MDSS_CLK_MDP_VSYNC, enable); if (!enable) { /* release iommu control */ mdss_iommu_ctrl(0); /* Active-Only */ msm_bus_scale_client_update_context(mdata->bus_hdl, Loading drivers/video/msm/mdss/mdss_mdp_intf_cmd.c +17 −9 Original line number Diff line number Diff line Loading @@ -534,6 +534,11 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) /* Transition OFF->ON (enable resources)*/ if (mdp5_data->resources_state == MDP_RSRC_CTL_STATE_OFF) { /* Add an extra vote for the ahb bus */ mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_19_MHZ); /* Enable MDP resources */ mdss_mdp_cmd_clk_on(ctx); if (sctx) Loading Loading @@ -651,6 +656,11 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) /* Now Power off master DSI */ mdss_mdp_cmd_clk_off(ctx); /* Remove extra vote for the ahb bus */ mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_DISABLE); /* we are done accessing the resources */ mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF); Loading @@ -671,7 +681,6 @@ exit: static inline void mdss_mdp_cmd_clk_on(struct mdss_mdp_cmd_ctx *ctx) { struct mdss_data_type *mdata = mdss_mdp_get_mdata(); int rc; if (__mdss_mdp_cmd_is_panel_power_off(ctx)) return; Loading @@ -681,10 +690,6 @@ static inline void mdss_mdp_cmd_clk_on(struct mdss_mdp_cmd_ctx *ctx) mdss_bus_bandwidth_ctrl(true); rc = mdss_iommu_ctrl(1); if (IS_ERR_VALUE(rc)) pr_err("IOMMU attach failed\n"); mdss_mdp_hist_intr_setup(&mdata->hist_intr, MDSS_IRQ_RESUME); mutex_unlock(&ctx->clk_mtx); Loading Loading @@ -713,7 +718,6 @@ static inline void mdss_mdp_cmd_clk_off(struct mdss_mdp_cmd_ctx *ctx) pr_err("OFF with ctl:NULL\n"); } mdss_iommu_ctrl(0); mdss_bus_bandwidth_ctrl(false); mutex_unlock(&ctx->clk_mtx); Loading Loading @@ -926,6 +930,10 @@ static void clk_ctrl_delayed_off_work(struct work_struct *work) /* now power off the master DSI */ mdss_mdp_cmd_clk_off(ctx); /* Remove extra vote for the ahb bus */ mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_DISABLE); mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF); /* update state machine that power off transition is done */ Loading drivers/video/msm/mdss/mdss_smmu.c +2 −5 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) } } else { pr_err("iommu device not attached for domain[%d]\n", i); goto err; return -ENODEV; } } return 0; Loading @@ -210,18 +210,15 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata) { struct mdss_smmu_client *mdss_smmu; int i; struct dss_module_power *mp; for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { if (!mdss_smmu_is_valid_domain_type(mdata, i)) continue; mdss_smmu = mdss_smmu_get_cb(i); if (mdss_smmu->dev) { mp = &mdss_smmu->mp; if (mdss_smmu->dev && !mdss_smmu->handoff_pending) mdss_smmu_enable_power(mdss_smmu, false); } } return 0; } Loading Loading
drivers/video/msm/mdss/mdss_mdp.c +11 −2 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ static struct msm_bus_scale_pdata mdp_reg_bus_scale_table = { .usecase = mdp_reg_bus_usecases, .num_usecases = ARRAY_SIZE(mdp_reg_bus_usecases), .name = "mdss_reg", .active_only = true, }; static void mdss_mdp_footswitch_ctrl(struct mdss_data_type *mdata, int on); Loading Loading @@ -736,8 +737,9 @@ int mdss_iommu_ctrl(int enable) int rc = 0; mutex_lock(&mdp_iommu_lock); pr_debug("%pS: enable %d mdata->iommu_ref_cnt %d\n", __builtin_return_address(0), enable, mdata->iommu_ref_cnt); pr_debug("%pS: enable:%d ref_cnt:%d attach:%d hoff:%d\n", __builtin_return_address(0), enable, mdata->iommu_ref_cnt, mdata->iommu_attached, mdata->handoff_pending); if (enable) { /* Loading Loading @@ -856,6 +858,7 @@ void mdss_mdp_clk_ctrl(int enable) struct mdss_data_type *mdata = mdss_mdp_get_mdata(); static int mdp_clk_cnt; int changed = 0; int rc = 0; mutex_lock(&mdp_clk_lock); if (enable) { Loading Loading @@ -886,6 +889,10 @@ void mdss_mdp_clk_ctrl(int enable) mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_19_MHZ); rc = mdss_iommu_ctrl(1); if (IS_ERR_VALUE(rc)) pr_err("IOMMU attach failed\n"); /* Active+Sleep */ msm_bus_scale_client_update_context(mdata->bus_hdl, false, mdata->curr_bw_uc_idx); Loading @@ -900,6 +907,8 @@ void mdss_mdp_clk_ctrl(int enable) mdss_mdp_clk_update(MDSS_CLK_MDP_VSYNC, enable); if (!enable) { /* release iommu control */ mdss_iommu_ctrl(0); /* Active-Only */ msm_bus_scale_client_update_context(mdata->bus_hdl, Loading
drivers/video/msm/mdss/mdss_mdp_intf_cmd.c +17 −9 Original line number Diff line number Diff line Loading @@ -534,6 +534,11 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) /* Transition OFF->ON (enable resources)*/ if (mdp5_data->resources_state == MDP_RSRC_CTL_STATE_OFF) { /* Add an extra vote for the ahb bus */ mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_19_MHZ); /* Enable MDP resources */ mdss_mdp_cmd_clk_on(ctx); if (sctx) Loading Loading @@ -651,6 +656,11 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) /* Now Power off master DSI */ mdss_mdp_cmd_clk_off(ctx); /* Remove extra vote for the ahb bus */ mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_DISABLE); /* we are done accessing the resources */ mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF); Loading @@ -671,7 +681,6 @@ exit: static inline void mdss_mdp_cmd_clk_on(struct mdss_mdp_cmd_ctx *ctx) { struct mdss_data_type *mdata = mdss_mdp_get_mdata(); int rc; if (__mdss_mdp_cmd_is_panel_power_off(ctx)) return; Loading @@ -681,10 +690,6 @@ static inline void mdss_mdp_cmd_clk_on(struct mdss_mdp_cmd_ctx *ctx) mdss_bus_bandwidth_ctrl(true); rc = mdss_iommu_ctrl(1); if (IS_ERR_VALUE(rc)) pr_err("IOMMU attach failed\n"); mdss_mdp_hist_intr_setup(&mdata->hist_intr, MDSS_IRQ_RESUME); mutex_unlock(&ctx->clk_mtx); Loading Loading @@ -713,7 +718,6 @@ static inline void mdss_mdp_cmd_clk_off(struct mdss_mdp_cmd_ctx *ctx) pr_err("OFF with ctl:NULL\n"); } mdss_iommu_ctrl(0); mdss_bus_bandwidth_ctrl(false); mutex_unlock(&ctx->clk_mtx); Loading Loading @@ -926,6 +930,10 @@ static void clk_ctrl_delayed_off_work(struct work_struct *work) /* now power off the master DSI */ mdss_mdp_cmd_clk_off(ctx); /* Remove extra vote for the ahb bus */ mdss_update_reg_bus_vote(mdata->reg_bus_clt, VOTE_INDEX_DISABLE); mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF); /* update state machine that power off transition is done */ Loading
drivers/video/msm/mdss/mdss_smmu.c +2 −5 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ static int mdss_smmu_attach_v2(struct mdss_data_type *mdata) } } else { pr_err("iommu device not attached for domain[%d]\n", i); goto err; return -ENODEV; } } return 0; Loading @@ -210,18 +210,15 @@ static int mdss_smmu_detach_v2(struct mdss_data_type *mdata) { struct mdss_smmu_client *mdss_smmu; int i; struct dss_module_power *mp; for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) { if (!mdss_smmu_is_valid_domain_type(mdata, i)) continue; mdss_smmu = mdss_smmu_get_cb(i); if (mdss_smmu->dev) { mp = &mdss_smmu->mp; if (mdss_smmu->dev && !mdss_smmu->handoff_pending) mdss_smmu_enable_power(mdss_smmu, false); } } return 0; } Loading