mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-28 12:31:17 -05:00
drm/msm/dpu: drop the dpu_core_perf_crtc_update()'s stop_req param
The stop_req is true only in the dpu_crtc_disable() case, when crtc->enable has already been set to false. This renders the stop_req argument useless. Remove it completely. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/550206/ Link: https://lore.kernel.org/r/20230730010102.350713-6-dmitry.baryshkov@linaro.org
This commit is contained in:
@@ -310,7 +310,7 @@ static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
|
||||
}
|
||||
|
||||
int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
||||
int params_changed, bool stop_req)
|
||||
int params_changed)
|
||||
{
|
||||
struct dpu_core_perf_params *new, *old;
|
||||
bool update_bus = false, update_clk = false;
|
||||
@@ -334,13 +334,13 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
||||
dpu_crtc = to_dpu_crtc(crtc);
|
||||
dpu_cstate = to_dpu_crtc_state(crtc->state);
|
||||
|
||||
DRM_DEBUG_ATOMIC("crtc:%d stop_req:%d core_clk:%llu\n",
|
||||
crtc->base.id, stop_req, kms->perf.core_clk_rate);
|
||||
DRM_DEBUG_ATOMIC("crtc:%d enabled:%d core_clk:%llu\n",
|
||||
crtc->base.id, crtc->enabled, kms->perf.core_clk_rate);
|
||||
|
||||
old = &dpu_crtc->cur_perf;
|
||||
new = &dpu_cstate->new_perf;
|
||||
|
||||
if (crtc->enabled && !stop_req) {
|
||||
if (crtc->enabled) {
|
||||
/*
|
||||
* cases for bus bandwidth update.
|
||||
* 1. new bandwidth vote - "ab or ib vote" is higher
|
||||
@@ -373,7 +373,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
||||
}
|
||||
|
||||
trace_dpu_perf_crtc_update(crtc->base.id, new->bw_ctl,
|
||||
new->core_clk_rate, stop_req, update_bus, update_clk);
|
||||
new->core_clk_rate, !crtc->enabled, update_bus, update_clk);
|
||||
|
||||
if (update_bus) {
|
||||
ret = _dpu_core_perf_crtc_update_bus(kms, crtc);
|
||||
@@ -393,7 +393,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
||||
|
||||
DRM_DEBUG_ATOMIC("clk:%llu\n", clk_rate);
|
||||
|
||||
trace_dpu_core_perf_update_clk(kms->dev, stop_req, clk_rate);
|
||||
trace_dpu_core_perf_update_clk(kms->dev, !crtc->enabled, clk_rate);
|
||||
|
||||
clk_rate = min(clk_rate, kms->perf.max_core_clk_rate);
|
||||
ret = dev_pm_opp_set_rate(&kms->pdev->dev, clk_rate);
|
||||
|
||||
@@ -75,11 +75,10 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
|
||||
* dpu_core_perf_crtc_update - update performance of the given crtc
|
||||
* @crtc: Pointer to crtc
|
||||
* @params_changed: true if crtc parameters are modified
|
||||
* @stop_req: true if this is a stop request
|
||||
* return: zero if success, or error code otherwise
|
||||
*/
|
||||
int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
||||
int params_changed, bool stop_req);
|
||||
int params_changed);
|
||||
|
||||
/**
|
||||
* dpu_core_perf_crtc_release_bw - release bandwidth of the given crtc
|
||||
|
||||
@@ -718,7 +718,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)
|
||||
void dpu_crtc_complete_commit(struct drm_crtc *crtc)
|
||||
{
|
||||
trace_dpu_crtc_complete_commit(DRMID(crtc));
|
||||
dpu_core_perf_crtc_update(crtc, 0, false);
|
||||
dpu_core_perf_crtc_update(crtc, 0);
|
||||
_dpu_crtc_complete_flip(crtc);
|
||||
}
|
||||
|
||||
@@ -884,7 +884,7 @@ static void dpu_crtc_atomic_flush(struct drm_crtc *crtc,
|
||||
return;
|
||||
|
||||
/* update performance setting before crtc kickoff */
|
||||
dpu_core_perf_crtc_update(crtc, 1, false);
|
||||
dpu_core_perf_crtc_update(crtc, 1);
|
||||
|
||||
/*
|
||||
* Final plane updates: Give each plane a chance to complete all
|
||||
@@ -1100,7 +1100,7 @@ static void dpu_crtc_disable(struct drm_crtc *crtc,
|
||||
atomic_set(&dpu_crtc->frame_pending, 0);
|
||||
}
|
||||
|
||||
dpu_core_perf_crtc_update(crtc, 0, true);
|
||||
dpu_core_perf_crtc_update(crtc, 0);
|
||||
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)
|
||||
dpu_encoder_register_frame_event_callback(encoder, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user