[bug report] drm/amd/pp: Change voltage/clk range for OD feature on VI

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

 



Hello Rex Zhu,

The patch d389d607e608: "drm/amd/pp: Change voltage/clk range for OD
feature on VI" from Apr 18, 2018, leads to the following static
checker warning:

	drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:872 smu7_setup_voltage_range_from_vbios()
	error: uninitialized symbol 'min_vddc'.

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c
   857  static void smu7_setup_voltage_range_from_vbios(struct pp_hwmgr *hwmgr)
   858  {
   859          struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
   860          struct phm_ppt_v1_clock_voltage_dependency_table *dep_sclk_table;
   861          struct phm_ppt_v1_information *table_info =
   862                          (struct phm_ppt_v1_information *)(hwmgr->pptable);
   863          uint32_t min_vddc, max_vddc;
   864  
   865          if (!table_info)
   866                  return;
   867  
   868          dep_sclk_table = table_info->vdd_dep_on_sclk;
   869  
   870          atomctrl_get_voltage_range(hwmgr, &max_vddc, &min_vddc);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This doesn't necessarily initialize the parameters.

   871  
   872          if (min_vddc == 0 || min_vddc > 2000
   873                  || min_vddc > dep_sclk_table->entries[0].vddc)
   874                  min_vddc = dep_sclk_table->entries[0].vddc;
   875  
   876          if (max_vddc == 0 || max_vddc > 2000
   877                  || max_vddc < dep_sclk_table->entries[dep_sclk_table->count-1].vddc)
   878                  max_vddc = dep_sclk_table->entries[dep_sclk_table->count-1].vddc;
   879  
   880          data->odn_dpm_table.min_vddc = min_vddc;
   881          data->odn_dpm_table.max_vddc = max_vddc;
   882  }

See also:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:872 smu7_setup_voltage_range_from_vbios() error: uninitialized symbol 'min_vddc'.
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:876 smu7_setup_voltage_range_from_vbios() error: uninitialized symbol 'max_vddc'.
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1588 vegam_populate_clock_stretcher_data_table() error: uninitialized symbol 'efuse'.
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1725 vegam_populate_avfs_parameters() error: uninitialized symbol 'tmp'.


regards,
dan carpenter


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

  Powered by Linux