Commit 3e221746 authored by Samasth Norway Ananda's avatar Samasth Norway Ananda Committed by Alex Deucher

drm/amdgpu: fix wrong sizeof argument

voltage_parameters is a point to a struct of type
SET_VOLTAGE_PARAMETERS_V1_3. Passing just voltage_parameters would
not print the right size of the struct variable. So we need to pass
*voltage_parameters to sizeof().

Fixes: 4630d503 ("drm/amdgpu: check PS, WS index")
Signed-off-by: default avatarSamasth Norway Ananda <samasth.norway.ananda@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 00a11f97
......@@ -1526,7 +1526,7 @@ int atomctrl_get_leakage_id_from_efuse(struct pp_hwmgr *hwmgr, uint16_t *virtual
result = amdgpu_atom_execute_table(adev->mode_info.atom_context,
GetIndexIntoMasterTable(COMMAND, SetVoltage),
(uint32_t *)voltage_parameters, sizeof(voltage_parameters));
(uint32_t *)voltage_parameters, sizeof(*voltage_parameters));
*virtual_voltage_id = voltage_parameters->usVoltageLevel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment