AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kuehling, Felix" <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
To: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset
Date: Mon, 19 Nov 2018 20:02:27 +0000	[thread overview]
Message-ID: <f1108e8c-d330-bff3-b04b-4e79aaeabb9a@amd.com> (raw)
In-Reply-To: <BN6PR12MB180900E62C3F2EB8C61C1FAFF7DC0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

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@amd.com>
>
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of
> Kuehling, Felix <Felix.Kuehling@amd.com>
> *Sent:* Thursday, November 15, 2018 4:56:51 PM
> *To:* amd-gfx@lists.freedesktop.org
> *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@suse.de>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@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 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-11-19 20:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 21:56 [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset Kuehling, Felix
     [not found] ` <1542318992-12464-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-11-15 21:59   ` Deucher, Alexander
     [not found]     ` <BN6PR12MB180900E62C3F2EB8C61C1FAFF7DC0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-11-19 20:02       ` Kuehling, Felix [this message]
     [not found]         ` <f1108e8c-d330-bff3-b04b-4e79aaeabb9a-5C7GfCeVMHo@public.gmane.org>
2018-11-19 20:26           ` Deucher, Alexander
2018-11-16 17:06   ` Joerg Roedel
2018-11-19  8:48   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1108e8c-d330-bff3-b04b-4e79aaeabb9a@amd.com \
    --to=felix.kuehling-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jroedel-l3A5Bk7waGM@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox