diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c index 6fd1238a5069..657323427f0e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c @@ -705,6 +705,7 @@ static ssize_t ualink_vpod_config_commit_store(struct kobject *kobj, struct device *dev = kobj_to_dev(info->kobj.parent); struct drm_device *ddev = dev_get_drvdata(dev); struct amdgpu_device *adev = drm_to_adev(ddev); + int r; if (!sysfs_streq(buf, "true")) return -EINVAL; @@ -713,10 +714,13 @@ static ssize_t ualink_vpod_config_commit_store(struct kobject *kobj, return -EINVAL; } - /* TODO: instead of just copying the info, call ASP vpod config API - * and query ASP for the updated info - */ - info->vpod = config->vpod; + r = psp_ual_set_vpod_config(&adev->psp, adev->ualink.psp_if_ver, + config); + if (r) + return r; + r = psp_ual_query_info(&adev->psp, adev->ualink.psp_if_ver, info); + if (r) + return r; /* The integrity check makes sure each new GPU is consistent with the * other GPUs already in the vPod. All known local GPUs can become