diff options
author | Mark Brown <broonie@kernel.org> | 2024-07-10 23:05:45 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-10 23:05:45 +0100 |
commit | 450a60ef607900bb9affb0e822fea9726679c512 (patch) | |
tree | 5ec688eeae9b1d713ef3028df03bc9e155d171dd /drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | |
parent | f21711bbdbf0d95a389bfaad54ce444b46830d58 (diff) | |
parent | 3c1ff93b4deea502cd8b0869839557cab2a28b71 (diff) |
regmap: Implement regmap_multi_reg_read()
Merge series from Guenter Roeck <linux@roeck-us.net>:
regmap_multi_reg_read() is similar to regmap_bilk_read() but reads from
an array of non-sequential registers. It is helpful if multiple non-
sequential registers need to be read in a single operation which would
otherwise have to be mutex protected.
The name of the new function was chosen to match the existing function
regmap_multi_reg_write().
Diffstat (limited to 'drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c')
-rw-r--r-- | drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c index 6bb42d04b247..e8b6989a40f3 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c @@ -164,6 +164,8 @@ static void sumo_construct_vid_mapping_table(struct amdgpu_device *adev, for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) { if (table[i].ulSupportedSCLK != 0) { + if (table[i].usVoltageIndex >= SUMO_MAX_NUMBER_VOLTAGES) + continue; vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit = table[i].usVoltageID; vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit = |