drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:185 dpu_core_perf_crtc_check() warn: inconsistent indenting

From: kernel test robot
Date: Thu Jul 01 2021 - 21:45:16 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e04360a2ea01bf42aa639b65aad81f502e896c7f
commit: 5b702d787b47e19f5aebb4f11360678493759a3b drm/msm/disp: Move various debug logs to atomic bucket
date: 8 days ago
config: arm-randconfig-m031-20210630 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

smatch warnings:
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:185 dpu_core_perf_crtc_check() warn: inconsistent indenting

vim +185 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 140
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 141 int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 142 struct drm_crtc_state *state)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 143 {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 144 u32 bw, threshold;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 145 u64 bw_sum_of_intfs = 0;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 146 enum dpu_crtc_client_type curr_client_type;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 147 struct dpu_crtc_state *dpu_cstate;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 148 struct drm_crtc *tmp_crtc;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 149 struct dpu_kms *kms;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 150
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 151 if (!crtc || !state) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 152 DPU_ERROR("invalid crtc\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 153 return -EINVAL;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 154 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 155
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 156 kms = _dpu_crtc_get_kms(crtc);
96630140040210 Drew Davenport 2019-09-06 157 if (!kms->catalog) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 158 DPU_ERROR("invalid parameters\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 159 return 0;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 160 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 161
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 162 /* we only need bandwidth check on real-time clients (interfaces) */
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 163 if (dpu_crtc_get_client_type(crtc) == NRT_CLIENT)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 164 return 0;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 165
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 166 dpu_cstate = to_dpu_crtc_state(state);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 167
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 168 /* obtain new values */
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 169 _dpu_core_perf_calc_crtc(kms, crtc, state, &dpu_cstate->new_perf);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 170
cb88482e2570f6 Jayant Shekhar 2019-06-18 171 bw_sum_of_intfs = dpu_cstate->new_perf.bw_ctl;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 172 curr_client_type = dpu_crtc_get_client_type(crtc);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 173
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 174 drm_for_each_crtc(tmp_crtc, crtc->dev) {
49dfe764797b1e Jordan Crouse 2018-12-03 175 if (tmp_crtc->enabled &&
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 176 (dpu_crtc_get_client_type(tmp_crtc) ==
cb88482e2570f6 Jayant Shekhar 2019-06-18 177 curr_client_type) && (tmp_crtc != crtc)) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 178 struct dpu_crtc_state *tmp_cstate =
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 179 to_dpu_crtc_state(tmp_crtc->state);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 180
5b702d787b47e1 Stephen Boyd 2021-04-30 181 DRM_DEBUG_ATOMIC("crtc:%d bw:%llu ctrl:%d\n",
cb88482e2570f6 Jayant Shekhar 2019-06-18 182 tmp_crtc->base.id, tmp_cstate->new_perf.bw_ctl,
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 183 tmp_cstate->bw_control);
c33b7c0389e17d Kalyan Thota 2020-07-16 184
cb88482e2570f6 Jayant Shekhar 2019-06-18 @185 bw_sum_of_intfs += tmp_cstate->new_perf.bw_ctl;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 186 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 187
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 188 /* convert bandwidth to kb */
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 189 bw = DIV_ROUND_UP_ULL(bw_sum_of_intfs, 1000);
5b702d787b47e1 Stephen Boyd 2021-04-30 190 DRM_DEBUG_ATOMIC("calculated bandwidth=%uk\n", bw);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 191
71dc6c08e4c53d Krishna Manikandan 2020-05-04 192 threshold = kms->catalog->perf.max_bw_high;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 193
5b702d787b47e1 Stephen Boyd 2021-04-30 194 DRM_DEBUG_ATOMIC("final threshold bw limit = %d\n", threshold);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 195
c33b7c0389e17d Kalyan Thota 2020-07-16 196 if (!threshold) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 197 DPU_ERROR("no bandwidth limits specified\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 198 return -E2BIG;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 199 } else if (bw > threshold) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 200 DPU_ERROR("exceeds bandwidth: %ukb > %ukb\n", bw,
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 201 threshold);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 202 return -E2BIG;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 203 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 204 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 205
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 206 return 0;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 207 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 208

:::::: The code at line 185 was first introduced by commit
:::::: cb88482e2570f67a6f4e72569e5a18329d5536ab drm/msm/dpu: clean up references of DPU custom bus scaling

:::::: TO: Jayant Shekhar <jshekhar@xxxxxxxxxxxxxx>
:::::: CC: Rob Clark <robdclark@xxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip