Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Jouni Högander" <jouni.hogander@intel.com>
Subject: Re: [PATCH 2/3] drm/i915/psr: Improve fast and IO wake lines calculation
Date: Thu, 22 Feb 2024 08:42:05 +0800	[thread overview]
Message-ID: <202402220859.K3oSmRCi-lkp@intel.com> (raw)
In-Reply-To: <20240221075322.2764209-3-jouni.hogander@intel.com>

Hi Jouni,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20240221]
[cannot apply to drm-intel/for-linux-next-fixes linus/master v6.8-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
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: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240222/202402220859.K3oSmRCi-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 36adfec155de366d722f2bac8ff9162289dcf06c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240222/202402220859.K3oSmRCi-lkp@intel.com/reproduce)

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402220859.K3oSmRCi-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/display/intel_psr.c:28:
   In file included from drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15:
   In file included from drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11:
   In file included from drivers/gpu/drm/xe/xe_bo.h:11:
   In file included from drivers/gpu/drm/xe/xe_bo_types.h:9:
   In file included from include/linux/iosys-map.h:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:78:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     560 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                                                           ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
     102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
         |                                                      ^
   In file included from drivers/gpu/drm/i915/display/intel_psr.c:28:
   In file included from drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15:
   In file included from drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11:
   In file included from drivers/gpu/drm/xe/xe_bo.h:11:
   In file included from drivers/gpu/drm/xe/xe_bo_types.h:9:
   In file included from include/linux/iosys-map.h:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:78:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                                                           ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
     115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
         |                                                      ^
   In file included from drivers/gpu/drm/i915/display/intel_psr.c:28:
   In file included from drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15:
   In file included from drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11:
   In file included from drivers/gpu/drm/xe/xe_bo.h:11:
   In file included from drivers/gpu/drm/xe/xe_bo_types.h:9:
   In file included from include/linux/iosys-map.h:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:78:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     594 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     692 |         readsb(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     700 |         readsw(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     708 |         readsl(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     717 |         writesb(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     726 |         writesw(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     735 |         writesl(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
>> drivers/gpu/drm/i915/display/intel_psr.c:1182:6: warning: variable 'io_wake_time' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    1182 |         if (intel_dp->get_aux_fw_sync_len) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_psr.c:1203:34: note: uninitialized use occurs here
    1203 |                 &crtc_state->hw.adjusted_mode, io_wake_time);
         |                                                ^~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_psr.c:1182:2: note: remove the 'if' if its condition is always false
    1182 |         if (intel_dp->get_aux_fw_sync_len) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1183 |                 int io_wake_time = get_io_wake_time(intel_dp, crtc_state);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1184 |                 int tfw_exit_latency = 20; /* eDP spec */
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1185 |                 int phy_wake = 4;          /* eDP spec */
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1186 |                 int preamble = 8;          /* eDP spec */
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1187 |                 int precharge = intel_dp->get_aux_fw_sync_len() - preamble;
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1188 | 
    1189 |                 io_wake_time = max(precharge, io_wake_time) + preamble +
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1190 |                         phy_wake + tfw_exit_latency;
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1191 |                 fast_wake_time = precharge + preamble + phy_wake +
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1192 |                         tfw_exit_latency;
         |                         ~~~~~~~~~~~~~~~~~
    1193 | 
    1194 |                 /* TODO: Check how we can use ALPM_CTL fast wake extended field */
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1195 |                 max_wake_lines = 12;
         |                 ~~~~~~~~~~~~~~~~~~~~
    1196 |         } else {
         |         ~~~~~~
   drivers/gpu/drm/i915/display/intel_psr.c:1179:33: note: initialize the variable 'io_wake_time' to silence this warning
    1179 |         int io_wake_lines, io_wake_time, fast_wake_lines, fast_wake_time;
         |                                        ^
         |                                         = 0
   13 warnings generated.


vim +1182 drivers/gpu/drm/i915/display/intel_psr.c

  1174	
  1175	static bool _compute_alpm_params(struct intel_dp *intel_dp,
  1176					 struct intel_crtc_state *crtc_state)
  1177	{
  1178		struct drm_i915_private *i915 = dp_to_i915(intel_dp);
  1179		int io_wake_lines, io_wake_time, fast_wake_lines, fast_wake_time;
  1180		u8 max_wake_lines;
  1181	
> 1182		if (intel_dp->get_aux_fw_sync_len) {
  1183			int io_wake_time = get_io_wake_time(intel_dp, crtc_state);
  1184			int tfw_exit_latency = 20; /* eDP spec */
  1185			int phy_wake = 4;	   /* eDP spec */
  1186			int preamble = 8;	   /* eDP spec */
  1187			int precharge = intel_dp->get_aux_fw_sync_len() - preamble;
  1188	
  1189			io_wake_time = max(precharge, io_wake_time) + preamble +
  1190				phy_wake + tfw_exit_latency;
  1191			fast_wake_time = precharge + preamble + phy_wake +
  1192				tfw_exit_latency;
  1193	
  1194			/* TODO: Check how we can use ALPM_CTL fast wake extended field */
  1195			max_wake_lines = 12;
  1196		} else {
  1197			io_wake_time = 50;
  1198			fast_wake_time = 32;
  1199			max_wake_lines = 8;
  1200		}
  1201	
  1202		io_wake_lines = intel_usecs_to_scanlines(
  1203			&crtc_state->hw.adjusted_mode, io_wake_time);
  1204		fast_wake_lines = intel_usecs_to_scanlines(
  1205			&crtc_state->hw.adjusted_mode, fast_wake_time);
  1206	
  1207		if (io_wake_lines > max_wake_lines ||
  1208		    fast_wake_lines > max_wake_lines)
  1209			return false;
  1210	
  1211		if (!_lnl_compute_alpm_params(intel_dp, crtc_state))
  1212			return false;
  1213	
  1214		if (i915->display.params.psr_safest_params)
  1215			io_wake_lines = fast_wake_lines = max_wake_lines;
  1216	
  1217		/* According to Bspec lower limit should be set as 7 lines. */
  1218		intel_dp->psr.alpm_parameters.io_wake_lines = max(io_wake_lines, 7);
  1219		intel_dp->psr.alpm_parameters.fast_wake_lines = max(fast_wake_lines, 7);
  1220	
  1221		return true;
  1222	}
  1223	

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

  parent reply	other threads:[~2024-02-22  0:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  7:53 [PATCH 0/3] IO and fast wake lines calculation and increase fw sync length Jouni Högander
2024-02-21  7:53 ` [PATCH 1/3] drm/i915/display: Add aux function pointer for fast wake sync pulse count Jouni Högander
2024-02-21 19:05   ` Ville Syrjälä
2024-02-21  7:53 ` [PATCH 2/3] drm/i915/psr: Improve fast and IO wake lines calculation Jouni Högander
2024-02-21 19:05   ` Ville Syrjälä
2024-02-21 19:16     ` Ville Syrjälä
2024-02-21 21:45       ` Ville Syrjälä
2024-02-22  9:28         ` Hogander, Jouni
2024-02-22  8:39     ` Hogander, Jouni
2024-02-22  0:42   ` kernel test robot [this message]
2024-02-26 10:05   ` Dan Carpenter
2024-02-21  7:53 ` [PATCH 3/3] drm/i915/display: Increase number of fast wake precharge pulses Jouni Högander
2024-02-21 19:11   ` Ville Syrjälä
2024-02-22  9:15     ` Hogander, Jouni
2024-02-21 10:18 ` ✗ Fi.CI.CHECKPATCH: warning for IO and fast wake lines calculation and increase fw sync length Patchwork
2024-02-21 10:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-21 10:32 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-21 12:20 ` ✗ Fi.CI.IGT: failure " Patchwork

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=202402220859.K3oSmRCi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ville.syrjala@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox