mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
drm/amdgpu/smu10: fix smu10_get_clock_by_type_with_voltage
[ Upstream commit 1064ad4aee ]
Cull out 0 clocks to avoid a warning in DC.
Bug: https://gitlab.freedesktop.org/drm/amd/issues/963
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b6bd445a50
commit
24add5b484
@@ -1080,9 +1080,11 @@ static int smu10_get_clock_by_type_with_voltage(struct pp_hwmgr *hwmgr,
|
|||||||
|
|
||||||
clocks->num_levels = 0;
|
clocks->num_levels = 0;
|
||||||
for (i = 0; i < pclk_vol_table->count; i++) {
|
for (i = 0; i < pclk_vol_table->count; i++) {
|
||||||
clocks->data[i].clocks_in_khz = pclk_vol_table->entries[i].clk * 10;
|
if (pclk_vol_table->entries[i].clk) {
|
||||||
clocks->data[i].voltage_in_mv = pclk_vol_table->entries[i].vol;
|
clocks->data[clocks->num_levels].clocks_in_khz = pclk_vol_table->entries[i].clk * 10;
|
||||||
clocks->num_levels++;
|
clocks->data[clocks->num_levels].voltage_in_mv = pclk_vol_table->entries[i].vol;
|
||||||
|
clocks->num_levels++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user