[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_OVUSfXPoUse+xTPcqifOT1AHmjqF98QrGWmzppeujgMQ@mail.gmail.com>
Date: Fri, 3 Apr 2020 16:36:52 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Aaron Ma <aaron.ma@...onical.com>
Cc: "Deucher, Alexander" <alexander.deucher@....com>,
Christian Koenig <christian.koenig@....com>,
Chunming Zhou <David1.Zhou@....com>,
Dave Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Hawking Zhang <Hawking.Zhang@....com>,
"Yuan, Xiaojie" <xiaojie.yuan@....com>,
"Kuehling, Felix" <Felix.Kuehling@....com>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event
On Fri, Apr 3, 2020 at 11:18 AM Aaron Ma <aaron.ma@...onical.com> wrote:
>
> On ARCTURUS and RENOIR, powerplay is not supported yet.
> When plug in or unplug power jack, ACPI event will issue.
> Then kernel NULL pointer BUG will be triggered.
> Check for NULL pointers before calling.
>
> Signed-off-by: Aaron Ma <aaron.ma@...onical.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index f197f1be0969..611de69f9d48 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -89,7 +89,8 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
> adev->pm.ac_power = true;
> else
> adev->pm.ac_power = false;
> - if (adev->powerplay.pp_funcs->enable_bapm)
> + if (adev->powerplay.pp_funcs &&
> + adev->powerplay.pp_funcs->enable_bapm)
> amdgpu_dpm_enable_bapm(adev, adev->pm.ac_power);
> mutex_unlock(&adev->pm.mutex);
>
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists