* [intel-lts:5.10/android-civ 23644/23680] drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:20: warning: comparison of array 'eb->batch_len' equal to a null pointer is always false
@ 2021-12-05 23:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-05 23:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7552 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.10/android-civ
head: 0e493748b235bf61d817dabdad2832ac4e932217
commit: 95eed6488ef2ab6d7947630f596a1764cbfa31bc [23644/23680] drm/i915: Multi-BB execbuf
config: i386-randconfig-c001-20211205 (https://download.01.org/0day-ci/archive/20211206/202112060723.fsG2X2Zg-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6e8678903523019903222e4521a5e41af743cab0)
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
# https://github.com/intel/linux-intel-lts/commit/95eed6488ef2ab6d7947630f596a1764cbfa31bc
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/android-civ
git checkout 95eed6488ef2ab6d7947630f596a1764cbfa31bc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:17:
In file included from drivers/gpu/drm/i915/gt/intel_context.h:14:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
include/linux/io-mapping.h:88:9: error: implicit declaration of function '__iomap_local_pfn_prot' [-Werror,-Wimplicit-function-declaration]
return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot);
^
include/linux/io-mapping.h:88:9: note: did you mean '__kmap_local_pfn_prot'?
include/linux/highmem-internal.h:9:7: note: '__kmap_local_pfn_prot' declared here
void *__kmap_local_pfn_prot(unsigned long pfn, pgprot_t prot);
^
In file included from drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:17:
In file included from drivers/gpu/drm/i915/gt/intel_context.h:14:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
include/linux/io-mapping.h:88:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion]
return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:20: warning: comparison of array 'eb->batch_len' equal to a null pointer is always false [-Wtautological-pointer-compare]
if (unlikely(eb->batch_len == 0)) { /* impossible! */
~~~~^~~~~~~~~ ~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1848:2: error: expected statement
for_each_batch_add_order(eb, i)
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1840:49: note: expanded from macro 'for_each_batch_add_order'
for (_i = _eb->num_batches - 1; _i >= 0; --_i) \
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1848:33: error: expected ';' after do/while statement
for_each_batch_add_order(eb, i)
^
;
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1912:3: error: expected statement
for_each_batch_add_order(eb, j) {
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1840:49: note: expanded from macro 'for_each_batch_add_order'
for (_i = _eb->num_batches - 1; _i >= 0; --_i) \
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1912:34: error: expected ';' after do/while statement
for_each_batch_add_order(eb, j) {
^
;
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2880:2: error: expected statement
for_each_batch_add_order(eb, i) {
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1840:49: note: expanded from macro 'for_each_batch_add_order'
for (_i = _eb->num_batches - 1; _i >= 0; --_i) \
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2880:33: error: expected ';' after do/while statement
for_each_batch_add_order(eb, i) {
^
;
2 warnings and 7 errors generated.
vim +608 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
548
549 static int
550 eb_add_vma(struct i915_execbuffer *eb,
551 unsigned int *current_batch,
552 unsigned int i,
553 struct i915_vma *vma)
554 {
555 struct drm_i915_private *i915 = eb->i915;
556 struct drm_i915_gem_exec_object2 *entry = &eb->exec[i];
557 struct eb_vma *ev = &eb->vma[i];
558
559 ev->vma = vma;
560 ev->exec = entry;
561 ev->flags = entry->flags;
562
563 if (eb->lut_size > 0) {
564 ev->handle = entry->handle;
565 hlist_add_head(&ev->node,
566 &eb->buckets[hash_32(entry->handle,
567 eb->lut_size)]);
568 }
569
570 if (entry->relocation_count)
571 list_add_tail(&ev->reloc_link, &eb->relocs);
572
573 /*
574 * SNA is doing fancy tricks with compressing batch buffers, which leads
575 * to negative relocation deltas. Usually that works out ok since the
576 * relocate address is still positive, except when the batch is placed
577 * very low in the GTT. Ensure this doesn't happen.
578 *
579 * Note that actual hangs have only been observed on gen7, but for
580 * paranoia do it everywhere.
581 */
582 if (is_batch_buffer(eb, i)) {
583 if (entry->relocation_count &&
584 !(ev->flags & EXEC_OBJECT_PINNED))
585 ev->flags |= __EXEC_OBJECT_NEEDS_BIAS;
586 if (eb->reloc_cache.has_fence)
587 ev->flags |= EXEC_OBJECT_NEEDS_FENCE;
588
589 eb->batches[*current_batch] = ev;
590
591 if (unlikely(ev->flags & EXEC_OBJECT_WRITE)) {
592 drm_dbg(&i915->drm,
593 "Attempting to use self-modifying batch buffer\n");
594 return -EINVAL;
595 }
596
597 if (range_overflows_t(u64,
598 eb->batch_start_offset,
599 eb->args->batch_len,
600 ev->vma->size)) {
601 drm_dbg(&i915->drm, "Attempting to use out-of-bounds batch\n");
602 return -EINVAL;
603 }
604
605 if (eb->args->batch_len == 0)
606 eb->batch_len[*current_batch] = ev->vma->size -
607 eb->batch_start_offset;
> 608 if (unlikely(eb->batch_len == 0)) { /* impossible! */
609 drm_dbg(&i915->drm, "Invalid batch length\n");
610 return -EINVAL;
611 }
612
613 ++*current_batch;
614 }
615
616 return 0;
617 }
618
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-05 23:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 23:02 [intel-lts:5.10/android-civ 23644/23680] drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:20: warning: comparison of array 'eb->batch_len' equal to a null pointer is always false kernel test robot
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.