From: kernel test robot <lkp@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Uma Shankar <uma.shankar@intel.com>
Subject: [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)'
Date: Thu, 5 Oct 2023 22:34:07 +0800 [thread overview]
Message-ID: <202310052201.AnVbpgPr-lkp@intel.com> (raw)
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
reply other threads:[~2023-10-05 14:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202310052201.AnVbpgPr-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=uma.shankar@intel.com \
--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 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.