On 2024-10-02 13:10, Alex Deucher wrote:
On Wed, Oct 2, 2024 at 12:38 AM <boyuan.zhang@xxxxxxx> wrote:
From: Boyuan Zhang <boyuan.zhang@xxxxxxx>
The new function dpm_set_vcn_enable_instance() will be used to enable
or disable vcn engine dynamic power for the given vcn instance.
The original function dpm_set_vcn_enable() will still be used to enable
or disable vcn engine dynamic power for all vcn instances as before.
Signed-off-by: Boyuan Zhang <boyuan.zhang@xxxxxxx>
---
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
index 727da0c37e06..f88241cdf9b9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
@@ -737,10 +737,16 @@ struct pptable_funcs {
/**
* @dpm_set_vcn_enable: Enable/disable VCN engine dynamic power
- * management.
+ * management for all instance.
*/
int (*dpm_set_vcn_enable)(struct smu_context *smu, bool enable);
Wouldn't it be cleaner to just add an instance parameter to the
existing function?
Alex
Right, it's much cleaner to use existing function.
Removed all duplicated functions and added instance parameter to
existing functions instead. Please check the new v2 patch set.
Regards,
Boyuan
+ /**
+ * @dpm_set_vcn_enable_instance: Enable/disable VCN engine dynamic power
+ * management for given instance.
+ */
+ int (*dpm_set_vcn_enable_instance)(struct smu_context *smu, bool enable, int inst);
+
/**
* @dpm_set_jpeg_enable: Enable/disable JPEG engine dynamic power
* management.
--
2.34.1