All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/pp: Change voltage/clk range for OD feature on VI
@ 2018-05-17 13:43 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-05-17 13:43 UTC (permalink / raw)
  To: Rex.Zhu-5C7GfCeVMHo
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-17 13:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 13:43 [bug report] drm/amd/pp: Change voltage/clk range for OD feature on VI Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.