drm/amdgpu: Suppress keypresses from ACPI_VIDEO events
authorLyude Paul <lyude@redhat.com>
Sat, 22 Sep 2018 00:43:44 +0000 (20:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:19:25 +0000 (09:19 +0100)
commitc0845493a2b802b83babe4beadf256b6491b7414
treeccb4ed8f71162055433b3afce88d921bd2837918
parent3f43692a69867463b9ed5315321fd4af561c15e9
drm/amdgpu: Suppress keypresses from ACPI_VIDEO events

commit 582f58de36834096a91cc1de2540c2f7269f850d upstream.

Currently we return NOTIFY_DONE for any event which we don't think is
ours. However, many laptops will send more then just an ATIF event and
will also send an ACPI_VIDEO_NOTIFY_PROBE event as well. Since we don't
check for this, we return NOTIFY_DONE which causes a keypress for the
ACPI event to be propogated to userspace. This is the equivalent of
someone pressing the display key on a laptop every time there's a
hotplug event.

So, check for ACPI_VIDEO_NOTIFY_PROBE events and suppress keypresses
from them.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c