public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Sat, 20 Jul 2024 23:26:58 +0800	[thread overview]
Message-ID: <202407202353.cuFqyue8-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-07-20 15:27 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=202407202353.cuFqyue8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox