aboutsummaryrefslogtreecommitdiffstats
path: root/meta-r1000/recipes-kernel/linux/linux-yocto-4.14.71/5545-drm-amdgpu-Suppress-keypresses-from-ACPI_VIDEO-event.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-r1000/recipes-kernel/linux/linux-yocto-4.14.71/5545-drm-amdgpu-Suppress-keypresses-from-ACPI_VIDEO-event.patch')
-rw-r--r--meta-r1000/recipes-kernel/linux/linux-yocto-4.14.71/5545-drm-amdgpu-Suppress-keypresses-from-ACPI_VIDEO-event.patch71
1 files changed, 0 insertions, 71 deletions
diff --git a/meta-r1000/recipes-kernel/linux/linux-yocto-4.14.71/5545-drm-amdgpu-Suppress-keypresses-from-ACPI_VIDEO-event.patch b/meta-r1000/recipes-kernel/linux/linux-yocto-4.14.71/5545-drm-amdgpu-Suppress-keypresses-from-ACPI_VIDEO-event.patch
deleted file mode 100644
index 39bad758..00000000
--- a/meta-r1000/recipes-kernel/linux/linux-yocto-4.14.71/5545-drm-amdgpu-Suppress-keypresses-from-ACPI_VIDEO-event.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 3eea51edb250242164611dfe50154dc10c810998 Mon Sep 17 00:00:00 2001
-From: Lyude Paul <lyude@redhat.com>
-Date: Fri, 21 Sep 2018 20:43:44 -0400
-Subject: [PATCH 5545/5725] drm/amdgpu: Suppress keypresses from ACPI_VIDEO
- events
-
-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>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
-index 6488e90..7f0afc5 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
-@@ -359,7 +359,9 @@ static int amdgpu_atif_get_sbios_requests(struct amdgpu_atif *atif,
- *
- * Checks the acpi event and if it matches an atif event,
- * handles it.
-- * Returns NOTIFY code
-+ *
-+ * Returns:
-+ * NOTIFY_BAD or NOTIFY_DONE, depending on the event.
- */
- static int amdgpu_atif_handler(struct amdgpu_device *adev,
- struct acpi_bus_event *event)
-@@ -373,11 +375,16 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
- if (strcmp(event->device_class, ACPI_VIDEO_CLASS) != 0)
- return NOTIFY_DONE;
-
-+ /* Is this actually our event? */
- if (!atif ||
- !atif->notification_cfg.enabled ||
-- event->type != atif->notification_cfg.command_code)
-- /* Not our event */
-- return NOTIFY_DONE;
-+ event->type != atif->notification_cfg.command_code) {
-+ /* These events will generate keypresses otherwise */
-+ if (event->type == ACPI_VIDEO_NOTIFY_PROBE)
-+ return NOTIFY_BAD;
-+ else
-+ return NOTIFY_DONE;
-+ }
-
- if (atif->functions.sbios_requests) {
- struct atif_sbios_requests req;
-@@ -386,7 +393,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
- count = amdgpu_atif_get_sbios_requests(atif, &req);
-
- if (count <= 0)
-- return NOTIFY_DONE;
-+ return NOTIFY_BAD;
-
- DRM_DEBUG_DRIVER("ATIF: %d pending SBIOS requests\n", count);
-
---
-2.7.4
-