* [agd5f:amd-staging-drm-next-queue-reset 59/60] drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:6177:11: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first
@ 2024-07-20 15:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-20 15:26 UTC (permalink / raw)
To: Alex Deucher; +Cc: llvm, oe-kbuild-all
tree: https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next-queue-reset
head: a5bdae426e5b6593ac3ac0814950110bec1dda31
commit: 711e8c91f6131a2c587e9c037906272ad1c341c0 [59/60] drm/amdgpu/gfx8: add ring reset callback for gfx
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240720/202407202353.cuFqyue8-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240720/202407202353.cuFqyue8-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/202407202353.cuFqyue8-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:6177:11: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]
6172 | amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
| ~~~~~~~~~~~~~~~~~~~~
6173 | EOP_TC_ACTION_EN |
| ~~~~~~~~~~~~~~~~~~
6174 | EOP_TC_WB_ACTION_EN |
| ~~~~~~~~~~~~~~~~~~~~~
6175 | EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6176 | EVENT_INDEX(5) |
| ~~~~~~~~~~~~~~~~
6177 | exec ? EOP_EXEC : 0));
| ~~~~ ^
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:6177:11: note: place parentheses around the '|' expression to silence this warning
6172 | amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
| ~~~~~~~~~~~~~~~~~~~~
6173 | EOP_TC_ACTION_EN |
| ~~~~~~~~~~~~~~~~~~
6174 | EOP_TC_WB_ACTION_EN |
| ~~~~~~~~~~~~~~~~~~~~~
6175 | EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6176 | EVENT_INDEX(5) |
| ~~~~~~~~~~~~~~~~
6177 | exec ? EOP_EXEC : 0));
| ~~~~ ^
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:6177:11: note: place parentheses around the '?:' expression to evaluate it first
6177 | exec ? EOP_EXEC : 0));
| ^
| ( )
1 warning generated.
vim +6177 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
6146
6147 static void gfx_v8_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
6148 u64 seq, unsigned flags)
6149 {
6150 bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
6151 bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
6152 bool exec = flags & AMDGPU_FENCE_FLAG_EXEC;
6153
6154 /* Workaround for cache flush problems. First send a dummy EOP
6155 * event down the pipe with seq one below.
6156 */
6157 amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
6158 amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
6159 EOP_TC_ACTION_EN |
6160 EOP_TC_WB_ACTION_EN |
6161 EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
6162 EVENT_INDEX(5)));
6163 amdgpu_ring_write(ring, addr & 0xfffffffc);
6164 amdgpu_ring_write(ring, (upper_32_bits(addr) & 0xffff) |
6165 DATA_SEL(1) | INT_SEL(0));
6166 amdgpu_ring_write(ring, lower_32_bits(seq - 1));
6167 amdgpu_ring_write(ring, upper_32_bits(seq - 1));
6168
6169 /* Then send the real EOP event down the pipe:
6170 * EVENT_WRITE_EOP - flush caches, send int */
6171 amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
6172 amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
6173 EOP_TC_ACTION_EN |
6174 EOP_TC_WB_ACTION_EN |
6175 EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
6176 EVENT_INDEX(5) |
> 6177 exec ? EOP_EXEC : 0));
6178 amdgpu_ring_write(ring, addr & 0xfffffffc);
6179 amdgpu_ring_write(ring, (upper_32_bits(addr) & 0xffff) |
6180 DATA_SEL(write64bit ? 2 : 1) | INT_SEL(int_sel ? 2 : 0));
6181 amdgpu_ring_write(ring, lower_32_bits(seq));
6182 amdgpu_ring_write(ring, upper_32_bits(seq));
6183
--
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:[~2024-07-20 15:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-20 15:26 [agd5f:amd-staging-drm-next-queue-reset 59/60] drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:6177:11: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first 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