OSDN Git Service

drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event
authorAaron Ma <aaron.ma@canonical.com>
Fri, 3 Apr 2020 14:34:19 +0000 (22:34 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Apr 2020 14:43:15 +0000 (10:43 -0400)
commit2a20e630f883065ec95141a9d490484310ce73be
tree1d80d5477c22a2a8a73d06c006be90841c3bfc9f
parenta45a9e5e10e0ecbe46fc881d23ce6a8ab6f739e5
drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event

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@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c