diff options
author | Dmitry Baryshkov <[email protected]> | 2023-07-30 04:00:54 +0300 |
---|---|---|
committer | Dmitry Baryshkov <[email protected]> | 2023-08-02 12:39:26 +0300 |
commit | 808c92df654a55251da7d85734f8a8842b1e465d (patch) | |
tree | 19b81f29d912e510f774c61030b5473457b90dd6 | |
parent | f15de4f6245b73f28887a457110fa9c1b83cd890 (diff) |
drm/msm/dpu: bail from _dpu_core_perf_crtc_update_bus if there are no ICC paths
Skip bandwidth aggregation and return early if there are no interconnect
paths defined for the DPU device.
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/550195/
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c index 1d9d83d7b99e..3dbd73035a11 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c @@ -217,6 +217,9 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms, int i, ret = 0; u64 avg_bw; + if (!kms->num_paths) + return 0; + drm_for_each_crtc(tmp_crtc, crtc->dev) { if (tmp_crtc->enabled && curr_client_type == @@ -234,9 +237,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms, } } - if (!kms->num_paths) - return 0; - avg_bw = perf.bw_ctl; do_div(avg_bw, (kms->num_paths * 1000)); /*Bps_to_icc*/ |