* [linux-next:master 7648/9984] drivers/gpu/drm/i915/display/intel_dsb.c:363 _intel_dsb_commit() warn: always true condition '(dewake_scanline >= 0) => (0-u32max >= 0)'
@ 2023-10-05 14:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-05 14:34 UTC (permalink / raw)
To: Ville Syrjälä
Cc: oe-kbuild-all, Linux Memory Management List, Uma Shankar
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7d730f1bf6f39ece2d9f3ae682f12e5b593d534d
commit: f83b94d23770c234cdc51a1468b3ce9d7e42f20e [7648/9984] drm/i915/dsb: Use DEwake to combat PkgC latency
config: x86_64-randconfig-161-20231005 (https://download.01.org/0day-ci/archive/20231005/202310052201.AnVbpgPr-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20231005/202310052201.AnVbpgPr-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/202310052201.AnVbpgPr-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/intel_dsb.c:363 _intel_dsb_commit() warn: always true condition '(dewake_scanline >= 0) => (0-u32max >= 0)'
vim +363 drivers/gpu/drm/i915/display/intel_dsb.c
338
339 static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
340 unsigned int dewake_scanline)
341 {
342 struct intel_crtc *crtc = dsb->crtc;
343 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
344 enum pipe pipe = crtc->pipe;
345 u32 tail;
346
347 tail = dsb->free_pos * 4;
348 if (drm_WARN_ON(&dev_priv->drm, !IS_ALIGNED(tail, CACHELINE_BYTES)))
349 return;
350
351 if (is_dsb_busy(dev_priv, pipe, dsb->id)) {
352 drm_err(&dev_priv->drm, "[CRTC:%d:%s] DSB %d is busy\n",
353 crtc->base.base.id, crtc->base.name, dsb->id);
354 return;
355 }
356
357 intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
358 ctrl | DSB_ENABLE);
359
360 intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
361 i915_ggtt_offset(dsb->vma));
362
> 363 if (dewake_scanline >= 0) {
364 int diff, hw_dewake_scanline;
365
366 hw_dewake_scanline = intel_crtc_scanline_to_hw(crtc, dewake_scanline);
367
368 intel_de_write_fw(dev_priv, DSB_PMCTRL(pipe, dsb->id),
369 DSB_ENABLE_DEWAKE |
370 DSB_SCANLINE_FOR_DEWAKE(hw_dewake_scanline));
371
372 /*
373 * Force DEwake immediately if we're already past
374 * or close to racing past the target scanline.
375 */
376 diff = dewake_scanline - intel_get_crtc_scanline(crtc);
377 intel_de_write_fw(dev_priv, DSB_PMCTRL_2(pipe, dsb->id),
378 (diff >= 0 && diff < 5 ? DSB_FORCE_DEWAKE : 0) |
379 DSB_BLOCK_DEWAKE_EXTENSION);
380 }
381
382 intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
383 i915_ggtt_offset(dsb->vma) + tail);
384 }
385
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-05 14:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 14:34 [linux-next:master 7648/9984] drivers/gpu/drm/i915/display/intel_dsb.c:363 _intel_dsb_commit() warn: always true condition '(dewake_scanline >= 0) => (0-u32max >= 0)' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox