NPM data is only defined for primary socket. On secondary nodes, return
-EOPNOTSUPP instead of continuing, thereby exposing npm node
only for master socket.

Signed-off-by: Asad Kamal <[email protected]>
---
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
index 756cf4ac00fa..b0faf57b0655 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
@@ -578,6 +578,9 @@ static int smu_v15_0_8_get_npm_data(struct smu_context *smu,
        struct smu_table *sys_table;
        int ret;
 
+       if (smu->adev->gmc.xgmi.physical_node_id != 0)
+               return -EOPNOTSUPP;
+
        if (sensor == AMDGPU_PP_SENSOR_MAXNODEPOWERLIMIT) {
                /*TBD as of now put 0 */
                *value = 0;
-- 
2.46.0

Reply via email to