tree: git://anongit.freedesktop.org/drm-intel drm-intel-gt-next head: f2053d346615f2c6bb4c0663276274b2da3f6871 commit: 3100240bf846ead1a2dbd6ae62bf48c687b9f5be [3/3] drm/i915/mtl: Add hardware-level lock for steering config: x86_64-allyesconfig compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git remote add drm-intel git://anongit.freedesktop.org/drm-intel git fetch --no-tags drm-intel drm-intel-gt-next git checkout 3100240bf846ead1a2dbd6ae62bf48c687b9f5be # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot Note: the drm-intel/drm-intel-gt-next HEAD f2053d346615f2c6bb4c0663276274b2da3f6871 builds fine. It only hurts bisectability. All errors (new ones prefixed by >>): >> drivers/gpu/drm/i915/gt/intel_gt_mcr.c:370:29: error: result of comparison of constant 3142 with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (GRAPHICS_VER(gt->i915) >= IP_VER(12, 70)) ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gt/intel_gt_mcr.c:410:29: error: result of comparison of constant 3142 with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (GRAPHICS_VER(gt->i915) >= IP_VER(12, 70)) ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 2 errors generated. vim +370 drivers/gpu/drm/i915/gt/intel_gt_mcr.c 343 344 /** 345 * intel_gt_mcr_lock - Acquire MCR steering lock 346 * @gt: GT structure 347 * @flags: storage to save IRQ flags to 348 * 349 * Performs locking to protect the steering for the duration of an MCR 350 * operation. On MTL and beyond, a hardware lock will also be taken to 351 * serialize access not only for the driver, but also for external hardware and 352 * firmware agents. 353 * 354 * Context: Takes gt->mcr_lock. uncore->lock should *not* be held when this 355 * function is called, although it may be acquired after this 356 * function call. 357 */ 358 void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags) 359 { 360 unsigned long __flags; 361 int err = 0; 362 363 lockdep_assert_not_held(>->uncore->lock); 364 365 /* 366 * Starting with MTL, we need to coordinate not only with other 367 * driver threads, but also with hardware/firmware agents. A dedicated 368 * locking register is used. 369 */ > 370 if (GRAPHICS_VER(gt->i915) >= IP_VER(12, 70)) 371 err = wait_for(intel_uncore_read_fw(gt->uncore, 372 MTL_STEER_SEMAPHORE) == 0x1, 100); 373 374 /* 375 * Even on platforms with a hardware lock, we'll continue to grab 376 * a software spinlock too for lockdep purposes. If the hardware lock 377 * was already acquired, there should never be contention on the 378 * software lock. 379 */ 380 spin_lock_irqsave(>->mcr_lock, __flags); 381 382 *flags = __flags; 383 384 /* 385 * In theory we should never fail to acquire the HW semaphore; this 386 * would indicate some hardware/firmware is misbehaving and not 387 * releasing it properly. 388 */ 389 if (err == -ETIMEDOUT) { 390 drm_err_ratelimited(>->i915->drm, 391 "GT%u hardware MCR steering semaphore timed out", 392 gt->info.id); 393 add_taint_for_CI(gt->i915, TAINT_WARN); /* CI is now unreliable */ 394 } 395 } 396 -- 0-DAY CI Kernel Test Service https://01.org/lkp