[radeon-alex:drm-next-4.19-wip 10/60] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.c:150 wait_for_fbc_state_changed() warn: always true condition '(counter < 1000) => (0-255 < 1000)'

kbuild test robot lkp at intel.com
Fri Jun 1 07:08:57 UTC 2018


tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-4.19-wip
head:   d9d75cfdd854593351f7537b2c0f57aaaa39304e
commit: 2b6199a1d1b70fccd62aed961ba4c2b979ae499c [10/60] drm/amd/display: replace msleep with udelay in fbc path

smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.c:150 wait_for_fbc_state_changed() warn: always true condition '(counter < 1000) => (0-255 < 1000)'
drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.c:150 wait_for_fbc_state_changed() warn: always true condition '(counter < 1000) => (0-255 < 1000)'

vim +150 drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.c

   141	
   142	static void wait_for_fbc_state_changed(
   143		struct dce110_compressor *cp110,
   144		bool enabled)
   145	{
   146		uint8_t counter = 0;
   147		uint32_t addr = mmFBC_STATUS;
   148		uint32_t value;
   149	
 > 150		while (counter < 1000) {
   151			value = dm_read_reg(cp110->base.ctx, addr);
   152			if (get_reg_field_value(
   153				value,
   154				FBC_STATUS,
   155				FBC_ENABLE_STATUS) == enabled)
   156				break;
   157			udelay(100);
   158			counter++;
   159		}
   160	
   161		if (counter == 10) {
   162			DC_LOG_WARNING("%s: wait counter exceeded, changes to HW not applied",
   163				__func__);
   164		} else {
   165			DC_LOG_SYNC("FBC status changed to %d", enabled);
   166		}
   167	
   168	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


More information about the dri-devel mailing list