[Intel-gfx] [PATCH 5/6] drm/i915/tc/icl: Implement the TC cold exit sequence

Souza, Jose jose.souza at intel.com
Fri Mar 20 19:52:48 UTC 2020


On Fri, 2020-03-20 at 16:11 +0300, Dan Carpenter wrote:
> Hi "José,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> url:    
> https://github.com/0day-ci/linux/commits/Jos-Roberto-de-Souza/drm-i915-tc-tgl-Implement-TCCOLD-sequences/20200319-080253
> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp at intel.com>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> 
> smatch warnings:
> drivers/gpu/drm/i915/display/intel_tc.c:554 icl_tc_cold_request()
> error: uninitialized symbol 'ret'.
> 
> # 
> https://github.com/0day-ci/linux/commit/29f27e6df6ad82b09a3c9ddaf5f51b2fc1647178
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout 29f27e6df6ad82b09a3c9ddaf5f51b2fc1647178
> vim +/ret +554 drivers/gpu/drm/i915/display/intel_tc.c
> 
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  528  static inline
> int icl_tc_cold_request(struct intel_digital_port *dig_port,
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  529  		
> 		      bool block)
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  530  {
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  531  	struct
> drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  532  	enum
> intel_display_power_domain aux_domain;
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  533  	int
> ret;
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  534  
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  535  	aux_dom
> ain = intel_aux_ch_to_power_domain(dig_port->aux_ch);
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  536  
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  537  	if
> (block) {
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  538  		
> dig_port->tc_cold_wakeref =
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  539  		
> 	intel_display_power_get_without_ack(i915, aux_domain);
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  540  
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  541  		
> do {
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  542  		
> 	ret = sandybridge_pcode_write_timeout(i915,
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  543  		
> 					      ICL_PCODE_EXIT_TCCOLD,
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  544  		
> 					      0, 250, 1);
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  545  
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  546  		
> } while (ret == -EAGAIN);
> 
> ret is only initialized on this path

Thanks

> 
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  547  	} else
> if (dig_port->tc_mode == TC_PORT_LEGACY) {
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  548  		
> drm_WARN_ON(&i915->drm, !dig_port->tc_lock_wakeref);
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  549  		
> intel_display_power_put(i915, aux_domain,
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  550  		
> 			dig_port->tc_cold_wakeref);
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  551  		
> dig_port->tc_cold_wakeref = 0;
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  552  	}
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  553  
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18 @554  	return
> ret;
> 29f27e6df6ad82 José Roberto de Souza 2020-03-18  555  }
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


More information about the Intel-gfx mailing list