drm/amd/powerplay: enable dpm for baffin.

Zhu, Rex Rex.Zhu at amd.com
Tue May 10 09:26:17 UTC 2016


It is a bug. I will fix it.

Best Regars
Rex

-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter at oracle.com] 
Sent: Tuesday, May 10, 2016 3:42 AM
To: Zhu, Rex
Cc: dri-devel at lists.freedesktop.org
Subject: re: drm/amd/powerplay: enable dpm for baffin.

Hello Rex Zhu,

This is a semi-automatic email about new static checker warnings.

The patch a23eefa2f461: "drm/amd/powerplay: enable dpm for baffin." 
from Nov 19, 2015, leads to the following Smatch complaint:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_hwmgr.c:206 phm_apply_dal_min_voltage_request()
	 error: we previously assumed 'table' could be null (see line 202)

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_hwmgr.c
   201	
   202		if (!table && !(dal_power_level >= PP_DAL_POWERLEVEL_ULTRALOW &&
                           ^^
Should this be an ||?

   203				dal_power_level <= PP_DAL_POWERLEVEL_PERFORMANCE))
   204			return;
   205	
   206		for (i = 0; i < table->count; i++) {
                                ^^^^^^^^^^^^ Because if table is ever NULL then we're toasted on the next line.

   207			if (dal_power_level == table->entries[i].clk) {
   208				req_vddc = table->entries[i].v;

regards,
dan carpenter


More information about the dri-devel mailing list