[bug report] drm/amd/display: Adding stutter entry wm to dce bw struct

Dan Carpenter dan.carpenter at oracle.com
Thu May 17 13:59:46 UTC 2018


Hello Mikita Lipski,

The patch b361521f5976: "drm/amd/display: Adding stutter entry wm to
dce bw struct" from Mar 12, 2018, leads to the following static
checker warning:

	drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:3237 bw_calcs()
	warn: inconsistent indenting

drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c
  3216                                  bw_fixed_to_int(bw_mul(data->
  3217                                          stutter_exit_watermark[6], bw_int_to_fixed(1000)));
  3218                          if (ctx->dc->caps.max_slave_planes) {
  3219                                  calcs_output->stutter_exit_wm_ns[3].b_mark =
  3220                                          bw_fixed_to_int(bw_mul(data->
  3221                                                  stutter_exit_watermark[0], bw_int_to_fixed(1000)));
  3222                                  calcs_output->stutter_exit_wm_ns[4].b_mark =
  3223                                          bw_fixed_to_int(bw_mul(data->
  3224                                                  stutter_exit_watermark[1], bw_int_to_fixed(1000)));
  3225                          } else {
  3226                                  calcs_output->stutter_exit_wm_ns[3].b_mark =
  3227                                          bw_fixed_to_int(bw_mul(data->
  3228                                                  stutter_exit_watermark[7], bw_int_to_fixed(1000)));
  3229                                  calcs_output->stutter_exit_wm_ns[4].b_mark =
  3230                                          bw_fixed_to_int(bw_mul(data->
  3231                                                  stutter_exit_watermark[8], bw_int_to_fixed(1000)));
  3232                          }
  3233                          calcs_output->stutter_exit_wm_ns[5].b_mark =
  3234                                  bw_fixed_to_int(bw_mul(data->
  3235                                          stutter_exit_watermark[9], bw_int_to_fixed(1000)));
  3236  
  3237                  calcs_output->stutter_entry_wm_ns[0].b_mark =
  3238                          bw_fixed_to_int(bw_mul(data->
  3239                                  stutter_entry_watermark[4], bw_int_to_fixed(1000)));

This function is super ugly...

  3240                  calcs_output->stutter_entry_wm_ns[1].b_mark =
  3241                          bw_fixed_to_int(bw_mul(data->
  3242                                  stutter_entry_watermark[5], bw_int_to_fixed(1000)));
  3243                  calcs_output->stutter_entry_wm_ns[2].b_mark =
  3244                          bw_fixed_to_int(bw_mul(data->
  3245                                  stutter_entry_watermark[6], bw_int_to_fixed(1000)));
  3246                  if (ctx->dc->caps.max_slave_planes) {
  3247                          calcs_output->stutter_entry_wm_ns[3].b_mark =
  3248                                  bw_fixed_to_int(bw_mul(data->
  3249                                          stutter_entry_watermark[0], bw_int_to_fixed(1000)));

See also:
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:3356 bw_calcs() warn: inconsistent indenting

regards,
dan carpenter


More information about the amd-gfx mailing list