Re: [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'll grab it for my -fixes pull this week.


Alex


From: Kuehling, Felix
Sent: Monday, November 19, 2018 3:02:27 PM
To: Deucher, Alexander; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Joerg Roedel
Subject: Re: [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset
 
I pushed the change to amd-staging-drm-next. I'd also like to get it
into drm-fixes. Should I cherry-pick it to your drm-fixes-4.20 branch on
fd.o?


Thanks,
  Felix


On 2018-11-15 4:59 p.m., Deucher, Alexander wrote:
>
> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>
>
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of
> Kuehling, Felix <Felix.Kuehling@xxxxxxx>
> *Sent:* Thursday, November 15, 2018 4:56:51 PM
> *To:* amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> *Cc:* Kuehling, Felix; Joerg Roedel
> *Subject:* [PATCH] drm/amdgpu: Fix oops when
> pp_funcs->switch_power_profile is unset
>  
> On Vega20 and other pre-production GPUs, powerplay is not enabled yet.
> Check for NULL pointers before calling pp_funcs function pointers.
>
> Also affects Kaveri.
>
> CC: Joerg Roedel <jroedel@xxxxxxx>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
> ---
>  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 a9c7597..1c1fed6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> @@ -503,8 +503,11 @@ void amdgpu_amdkfd_set_compute_idle(struct
> kgd_dev *kgd, bool idle)
>  {
>          struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
>  
> -       amdgpu_dpm_switch_power_profile(adev,
> -                                       PP_SMC_POWER_PROFILE_COMPUTE,
> !idle);
> +       if (adev->powerplay.pp_funcs &&
> +           adev->powerplay.pp_funcs->switch_power_profile)
> +               amdgpu_dpm_switch_power_profile(adev,
> +                                              
> PP_SMC_POWER_PROFILE_COMPUTE,
> +                                               !idle);
>  }
>  
>  bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid)
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux