[PATCH 01/18] drm/amd/pm: add new vcn enable function pointer
Alex Deucher
alexdeucher at gmail.com
Wed Oct 2 17:10:51 UTC 2024
On Wed, Oct 2, 2024 at 12:38 AM <boyuan.zhang at amd.com> wrote:
>
> From: Boyuan Zhang <boyuan.zhang at amd.com>
>
> 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 at amd.com>
> ---
> 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
>
> + /**
> + * @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
>
More information about the amd-gfx
mailing list