[PATCH 01/14] drm/amdgpu: fix get_max_engine_clock_in_mhz

Oded Gabbay oded.gabbay at gmail.com
Thu Nov 30 16:03:08 UTC 2017


On Tue, Nov 28, 2017 at 1:29 AM, Felix Kuehling <Felix.Kuehling at amd.com> wrote:
> Use proper powerplay function. This fixes OpenCL initialization
> problems.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> index 5432af3..f7fa767 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> @@ -265,6 +265,9 @@ uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
>
> -       /* The sclk is in quantas of 10kHz */
> -       return adev->pm.dpm.dyn_state.max_clock_voltage_on_ac.sclk / 100;
> +       /* the sclk is in quantas of 10kHz */
> +       if (amdgpu_sriov_vf(adev))
> +               return adev->clock.default_sclk / 100;
> +
> +       return amdgpu_dpm_get_sclk(adev, false) / 100;
>  }
> --
> 2.7.4
>

This patch is:
Acked-by: Oded Gabbay <oded.gabbay at gmail.com>


More information about the amd-gfx mailing list