Re: [PATCH 2/3] drm/i915/psr: Improve fast and IO wake lines calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jouni,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jouni-H-gander/drm-i915-display-Add-aux-function-pointer-for-fast-wake-sync-pulse-count/20240221-160220
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
patch link:    https://lore.kernel.org/r/20240221075322.2764209-3-jouni.hogander%40intel.com
patch subject: [PATCH 2/3] drm/i915/psr: Improve fast and IO wake lines calculation
config: i386-randconfig-r081-20240223 (https://download.01.org/0day-ci/archive/20240225/202402250758.KqBqXYrz-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
| Closes: https://lore.kernel.org/r/202402250758.KqBqXYrz-lkp@xxxxxxxxx/

smatch warnings:
drivers/gpu/drm/i915/display/intel_psr.c:1203 _compute_alpm_params() error: uninitialized symbol 'io_wake_time'.

vim +/io_wake_time +1203 drivers/gpu/drm/i915/display/intel_psr.c

7903f1d36c3d97 Jouni Högander 2024-02-21  1174  
96a24945731fe9 Jouni Högander 2024-01-30  1175  static bool _compute_alpm_params(struct intel_dp *intel_dp,
cb42e8ede5b475 Jouni Högander 2023-02-21  1176  				 struct intel_crtc_state *crtc_state)
cb42e8ede5b475 Jouni Högander 2023-02-21  1177  {
cb42e8ede5b475 Jouni Högander 2023-02-21  1178  	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
cb42e8ede5b475 Jouni Högander 2023-02-21  1179  	int io_wake_lines, io_wake_time, fast_wake_lines, fast_wake_time;
                                                                           ^^^^^^^^^^^^

cb42e8ede5b475 Jouni Högander 2023-02-21  1180  	u8 max_wake_lines;
cb42e8ede5b475 Jouni Högander 2023-02-21  1181  
7903f1d36c3d97 Jouni Högander 2024-02-21  1182  	if (intel_dp->get_aux_fw_sync_len) {
7903f1d36c3d97 Jouni Högander 2024-02-21  1183  		int io_wake_time = get_io_wake_time(intel_dp, crtc_state);

This declaration shadows the earlier io_wake_time declaration.

7903f1d36c3d97 Jouni Högander 2024-02-21  1184  		int tfw_exit_latency = 20; /* eDP spec */
7903f1d36c3d97 Jouni Högander 2024-02-21  1185  		int phy_wake = 4;	   /* eDP spec */
7903f1d36c3d97 Jouni Högander 2024-02-21  1186  		int preamble = 8;	   /* eDP spec */
7903f1d36c3d97 Jouni Högander 2024-02-21  1187  		int precharge = intel_dp->get_aux_fw_sync_len() - preamble;
7903f1d36c3d97 Jouni Högander 2024-02-21  1188  
7903f1d36c3d97 Jouni Högander 2024-02-21  1189  		io_wake_time = max(precharge, io_wake_time) + preamble +
7903f1d36c3d97 Jouni Högander 2024-02-21  1190  			phy_wake + tfw_exit_latency;
7903f1d36c3d97 Jouni Högander 2024-02-21  1191  		fast_wake_time = precharge + preamble + phy_wake +
7903f1d36c3d97 Jouni Högander 2024-02-21  1192  			tfw_exit_latency;
29f3067a236ac5 Jouni Högander 2024-01-30  1193  
29f3067a236ac5 Jouni Högander 2024-01-30  1194  		/* TODO: Check how we can use ALPM_CTL fast wake extended field */
cb42e8ede5b475 Jouni Högander 2023-02-21  1195  		max_wake_lines = 12;
cb42e8ede5b475 Jouni Högander 2023-02-21  1196  	} else {
cb42e8ede5b475 Jouni Högander 2023-02-21  1197  		io_wake_time = 50;
cb42e8ede5b475 Jouni Högander 2023-02-21  1198  		fast_wake_time = 32;
cb42e8ede5b475 Jouni Högander 2023-02-21  1199  		max_wake_lines = 8;
cb42e8ede5b475 Jouni Högander 2023-02-21  1200  	}
cb42e8ede5b475 Jouni Högander 2023-02-21  1201  
cb42e8ede5b475 Jouni Högander 2023-02-21  1202  	io_wake_lines = intel_usecs_to_scanlines(
ef0af9db2a2125 Jouni Högander 2023-06-20 @1203  		&crtc_state->hw.adjusted_mode, io_wake_time);
                                                                                               ^^^^^^^^^^^^
Uninitialized

cb42e8ede5b475 Jouni Högander 2023-02-21  1204  	fast_wake_lines = intel_usecs_to_scanlines(
ef0af9db2a2125 Jouni Högander 2023-06-20  1205  		&crtc_state->hw.adjusted_mode, fast_wake_time);
cb42e8ede5b475 Jouni Högander 2023-02-21  1206  
cb42e8ede5b475 Jouni Högander 2023-02-21  1207  	if (io_wake_lines > max_wake_lines ||
cb42e8ede5b475 Jouni Högander 2023-02-21  1208  	    fast_wake_lines > max_wake_lines)
cb42e8ede5b475 Jouni Högander 2023-02-21  1209  		return false;
cb42e8ede5b475 Jouni Högander 2023-02-21  1210  
29f3067a236ac5 Jouni Högander 2024-01-30  1211  	if (!_lnl_compute_alpm_params(intel_dp, crtc_state))
29f3067a236ac5 Jouni Högander 2024-01-30  1212  		return false;
29f3067a236ac5 Jouni Högander 2024-01-30  1213  
942d654171bdaf Jouni Högander 2023-10-24  1214  	if (i915->display.params.psr_safest_params)
cb42e8ede5b475 Jouni Högander 2023-02-21  1215  		io_wake_lines = fast_wake_lines = max_wake_lines;
cb42e8ede5b475 Jouni Högander 2023-02-21  1216  
cb42e8ede5b475 Jouni Högander 2023-02-21  1217  	/* According to Bspec lower limit should be set as 7 lines. */
96a24945731fe9 Jouni Högander 2024-01-30  1218  	intel_dp->psr.alpm_parameters.io_wake_lines = max(io_wake_lines, 7);
96a24945731fe9 Jouni Högander 2024-01-30  1219  	intel_dp->psr.alpm_parameters.fast_wake_lines = max(fast_wake_lines, 7);
cb42e8ede5b475 Jouni Högander 2023-02-21  1220  
cb42e8ede5b475 Jouni Högander 2023-02-21  1221  	return true;
cb42e8ede5b475 Jouni Högander 2023-02-21  1222  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux