[PATCH v2] drm/amd/pm: Vangogh: Add new gpu_metrics_v2_4 to acquire gpu_metrics

2023-06-21 Thread Wenyou Yang
To acquire the voltage and current info from gpu_metrics interface, but gpu_metrics_v2_3 doesn't contain them, and to be backward compatible, add new gpu_metrics_v2_4 structure. Reviewed-by: Mario Limonciello Acked-by: Evan Quan Signed-off-by: Wenyou Yang --- .../gpu/drm/amd/include

[PATCH] drm/amd/pm: Vangogh: Add new gpu_metrics_v2_4 to acquire gpu_metrics

2023-05-31 Thread Wenyou Yang
To acquire the voltage and current info from gpu_metrics interface, but gpu_metrics_v2_3 doesn't contain them, and to be backward compatible, add new gpu_metrics_v2_4 structure. Acked-by: Evan Quan Signed-off-by: Wenyou Yang --- .../gpu/drm/amd/include/kgd_pp_interface.h| 69

[PATCH v6 1/2] drm/amd/pm: Add support to check SMT state periodically

2023-04-06 Thread Wenyou Yang
Add a timer to poll the SMT state periodically, if the SMT state is changed, invoke the interface to notify the PMFW. Signed-off-by: Wenyou Yang --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 8 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 44 +++ drivers/gpu/drm

[PATCH v6 2/2] drm/amd/pm/vangogh: Send SMT enable message to PMFW

2023-04-06 Thread Wenyou Yang
When the SMT state is changed on the fly, sent the SMT enable message to the PMFW to notify it that the SMT state changed. Add the support to send PPSMC_MSG_SetCClkSMTEnable(0x58) message to the PMFW for Vangogh. Signed-off-by: Wenyou Yang --- .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 3

[PATCH v6 0/2] Send message to PMFW when SMT changes

2023-04-06 Thread Wenyou Yang
Embed the smt notifer callback into "struct smu_context" structure. 2/. Correct the PPSMC_Message_Count value. 3/. Improve several code styles and others. Wenyou Yang (2): drm/amd/pm: Add support to check SMT state periodically drm/amd/pm/vangogh: Send SMT enable message to PMFW driver

[PATCH v5 2/2] drm/amd/pm/vangogh: Send SMT enable message to PMFW

2023-04-06 Thread Wenyou Yang
When the SMT state is changed on the fly, sent the SMT enable message to the PMFW to notify it that the SMT state changed. Add the support to send PPSMC_MSG_SetCClkSMTEnable(0x58) message to the PMFW for Vangogh. Signed-off-by: Wenyou Yang --- .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 3

[PATCH v5 1/2] drm/amd/pm: Add support to check SMT state periodically

2023-04-06 Thread Wenyou Yang
Add a timer to poll the SMT state periodically, if the SMT state is changed, invoke the interface to notify the PMFW. Signed-off-by: Wenyou Yang --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 8 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 44 +++ drivers/gpu/drm

[PATCH v5 0/2] Send message to PMFW when SMT changes

2023-04-06 Thread Wenyou Yang
. Changes in v2: 1/. Embed the smt notifer callback into "struct smu_context" structure. 2/. Correct the PPSMC_Message_Count value. 3/. Improve several code styles and others. Wenyou Yang (2): drm/amd/pm: Add support to check SMT state periodically drm/amd/pm/vangogh: Send SMT enab

[PATCH v3 2/2] drm/amd/pm: vangogh: send the SMT enable message to pmfw

2023-03-28 Thread Wenyou Yang
When the CPU SMT status is changed in the fly, sent the SMT enable message to pmfw to notify it that the SMT status changed. Add the support to send PPSMC_MSG_SetCClkSMTEnable(0x58) message to pmfw for vangogh. Signed-off-by: Wenyou Yang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5

[PATCH v3 1/2] cpu/smt: add a notifier to notify the SMT changes

2023-03-28 Thread Wenyou Yang
Add the notifier chain to notify the cpu SMT status changes Signed-off-by: Wenyou Yang --- include/linux/cpu.h | 5 + kernel/cpu.c| 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 314802f98b9d

[PATCH v3 0/2] send message to pmfw when SMT changes

2023-03-28 Thread Wenyou Yang
the smt notifer callback into "struct smu_context" structure. 2/. Correct the PPSMC_Message_Count value. 3/. Improve several code styles and others. Wenyou Yang (2): cpu/smt: add a notifier to notify the SMT changes drm/amd/pm: vangogh: send the SMT enable message to pmfw drivers/gpu/

[PATCH v2 3/3] drm/amd/pm: vangogh: support to send SMT enable message

2023-03-27 Thread Wenyou Yang
Add the support to send PPSMC_MSG_SetCClkSMTEnable(0x58) message to pmfw for vangogh. Signed-off-by: Wenyou Yang --- .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu11

[PATCH v2 2/3] drm/amd/pm: send the SMT enable message to pmfw

2023-03-27 Thread Wenyou Yang
When the CPU SMT status is changed in the fly, sent the SMT enable message to pmfw to notify it that the SMT status changed. Signed-off-by: Wenyou Yang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 39 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 2 files

[PATCH v2 1/3] cpu/smt: add a notifier to notify the SMT changes

2023-03-27 Thread Wenyou Yang
Add the notifier chain to notify the cpu SMT status changes Signed-off-by: Wenyou Yang --- include/linux/cpu.h | 5 + kernel/cpu.c| 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 314802f98b9d

[PATCH v2 0/3] send message to pmfw when SMT changes

2023-03-27 Thread Wenyou Yang
When the CPU SMT changes on the fly, send the message to pmfw to notify the SMT status changed. Changes in v2: 1/. Embed the smt notifer callback into "struct smu_context" structure. 2/. Correct the PPSMC_Message_Count value. 3./ Improve several code styles and others. Wenyou Yang (3):

[Resend PATCH v1 2/3] drm/amd/pm: send the SMT-enable message to pmfw

2023-03-22 Thread Wenyou Yang
When the CPU SMT status change in the fly, sent the SMT-enable message to pmfw to notify it that the SMT status changed. Signed-off-by: Wenyou Yang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 41 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 5 +++ 2 files changed

[Resend PATCH v1 3/3] drm/amd/pm: vangogh: support to send SMT enable message

2023-03-22 Thread Wenyou Yang
Add the support to PPSMC_MSG_SetCClkSMTEnable(0x58) message to pmfw for vangogh. Signed-off-by: Wenyou Yang --- .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 19

[Resend PATCH v1 1/3] cpu/smt: add a notifier to notify the SMT changes

2023-03-22 Thread Wenyou Yang
Add the notifier chain to notify the cpu SMT status changes Signed-off-by: Wenyou Yang --- include/linux/cpu.h | 5 + kernel/cpu.c| 11 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 314802f98b9d

[Resend PATCH v1 0/3] send message to pmfw when SMT changes

2023-03-22 Thread Wenyou Yang
When the CPU SMT changes on the fly, send the message to pmfw to notify the SMT status changed. Wenyou Yang (3): cpu/smt: add a notifier to notify the SMT changes drm/amd/pm: send the SMT-enable message to pmfw drm/amd/pm: vangogh: support to send SMT enable message drivers/gpu/drm/amd/pm

[PATCH v1 3/3] drm/amd/pm: vangogh: support to send SMT enable message

2023-03-21 Thread Wenyou Yang
Add the support to PPSMC_MSG_SetCClkSMTEnable(0x58) message to pmfw for vangogh. Signed-off-by: Wenyou Yang --- .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 19

[PATCH v1 1/3] cpu/smt: add a notifier to notify the SMT changes

2023-03-21 Thread Wenyou Yang
Add the notifier chain to notify the cpu SMT status changes Signed-off-by: Wenyou Yang --- include/linux/cpu.h | 5 + kernel/cpu.c| 11 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 314802f98b9d

[PATCH v1 2/3] drm/amd/pm: send the SMT-enable message to pmfw

2023-03-21 Thread Wenyou Yang
When the CPU SMT status change in the fly, sent the SMT-enable message to pmfw to notify it that the SMT status changed. Signed-off-by: Wenyou Yang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 41 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 5 +++ 2 files changed

[PATCH v1 0/3] send message to pmfw when SMT changes

2023-03-21 Thread Wenyou Yang
When the CPU SMT changes on the fly, send the message to pmfw to notify the SMT status changed. Wenyou Yang (3): cpu/smt: add a notifier to notify the SMT changes drm/amd/pm: send the SMT-enable message to pmfw drm/amd/pm: vangogh: support to send SMT enable message drivers/gpu/drm/amd/pm