All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:185 dpu_core_perf_crtc_check() warn: inconsistent indenting
Date: Fri, 02 Jul 2021 09:43:50 +0800	[thread overview]
Message-ID: <202107020945.ORcv8WEW-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6368 bytes --]

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@intel.com>

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@codeaurora.org>
:::::: CC: Rob Clark <robdclark@chromium.org>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37501 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Stephen Boyd <swboyd@chromium.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Rob Clark <robdclark@chromium.org>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:185 dpu_core_perf_crtc_check() warn: inconsistent indenting
Date: Fri, 2 Jul 2021 09:43:50 +0800	[thread overview]
Message-ID: <202107020945.ORcv8WEW-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6272 bytes --]

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@intel.com>

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@codeaurora.org>
:::::: CC: Rob Clark <robdclark@chromium.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37501 bytes --]

             reply	other threads:[~2021-07-02  1:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02  1:43 kernel test robot [this message]
2021-07-02  1:43 ` drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:185 dpu_core_perf_crtc_check() warn: inconsistent indenting kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-08-20 10:28 kernel test robot
2022-08-21  0:52 kernel test robot
2022-10-10 20:37 kernel test robot
2022-11-02  6:49 kernel test robot
2022-11-04 13:25 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107020945.ORcv8WEW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.