Re: [PATCH V3] drm/i915/gt: Add workaround 14016712196

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tejas,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Tejas-Upadhyay/drm-i915-gt-Add-workaround-14016712196/20230531-222808
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20230531143214.1650701-1-tejas.upadhyay%40intel.com
patch subject:  [PATCH V3] drm/i915/gt: Add workaround 14016712196
config: x86_64-randconfig-x052-20230531 (https://download.01.org/0day-ci/archive/20230601/202306010101.NktWIqo7-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        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-lab-lkp/linux/commit/1ef791c16c322ffff65d4f14a0f4c09434d91884
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Tejas-Upadhyay/drm-i915-gt-Add-workaround-14016712196/20230531-222808
        git checkout 1ef791c16c322ffff65d4f14a0f4c09434d91884
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306010101.NktWIqo7-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gt/gen8_engine_cs.c:185:6: warning: variable 'cs' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (IS_MTL_GRAPHICS_STEP(rq->engine->i915, M, STEP_A0, STEP_B0) ||
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_drv.h:684:2: note: expanded from macro 'IS_MTL_GRAPHICS_STEP'
           (IS_SUBPLATFORM(__i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_##variant) && \
           ^
   drivers/gpu/drm/i915/gt/gen8_engine_cs.c:201:9: note: uninitialized use occurs here
           return cs;
                  ^~
   drivers/gpu/drm/i915/gt/gen8_engine_cs.c:185:2: note: remove the 'if' if its condition is always true
           if (IS_MTL_GRAPHICS_STEP(rq->engine->i915, M, STEP_A0, STEP_B0) ||
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/gt/gen8_engine_cs.c:186:6: warning: variable 'cs' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
               IS_MTL_GRAPHICS_STEP(rq->engine->i915, P, STEP_A0, STEP_B0)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_drv.h:684:3: note: expanded from macro 'IS_MTL_GRAPHICS_STEP'
           (IS_SUBPLATFORM(__i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_##variant) && \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/gt/gen8_engine_cs.c:201:9: note: uninitialized use occurs here
           return cs;
                  ^~
   drivers/gpu/drm/i915/gt/gen8_engine_cs.c:186:6: note: remove the '&&' if its condition is always true
               IS_MTL_GRAPHICS_STEP(rq->engine->i915, P, STEP_A0, STEP_B0)) {
               ^
   drivers/gpu/drm/i915/i915_drv.h:684:3: note: expanded from macro 'IS_MTL_GRAPHICS_STEP'
           (IS_SUBPLATFORM(__i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_##variant) && \
            ^
   drivers/gpu/drm/i915/gt/gen8_engine_cs.c:182:9: note: initialize the variable 'cs' to silence this warning
           u32 *cs;
                  ^
                   = NULL
   2 warnings generated.


vim +185 drivers/gpu/drm/i915/gt/gen8_engine_cs.c

   179	
   180	static u32 *mtl_dummy_pipe_control(struct i915_request *rq)
   181	{
   182		u32 *cs;
   183	
   184		/* Wa_14016712196 */
 > 185		if (IS_MTL_GRAPHICS_STEP(rq->engine->i915, M, STEP_A0, STEP_B0) ||
 > 186		    IS_MTL_GRAPHICS_STEP(rq->engine->i915, P, STEP_A0, STEP_B0)) {
   187			int ret;
   188	
   189			/* dummy PIPE_CONTROL + depth flush */
   190			cs = intel_ring_begin(rq, 6);
   191			ret = IS_ERR(cs);
   192			if (ret)
   193				return ERR_PTR(ret);
   194			cs = gen12_emit_pipe_control(cs,
   195						     0,
   196						     PIPE_CONTROL_DEPTH_CACHE_FLUSH,
   197						     LRC_PPHWSP_SCRATCH_ADDR);
   198			intel_ring_advance(rq, cs);
   199		}
   200	
 > 201		return cs;
   202	}
   203	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux