Patch "drm/amdgpu: Suppress keypresses from ACPI_VIDEO events" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amdgpu: Suppress keypresses from ACPI_VIDEO events

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amdgpu-suppress-keypresses-from-acpi_video-events.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 582f58de36834096a91cc1de2540c2f7269f850d Mon Sep 17 00:00:00 2001
From: Lyude Paul <lyude@xxxxxxxxxx>
Date: Fri, 21 Sep 2018 20:43:44 -0400
Subject: drm/amdgpu: Suppress keypresses from ACPI_VIDEO events

From: Lyude Paul <lyude@xxxxxxxxxx>

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@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -358,7 +358,9 @@ out:
  *
  * 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)
@@ -372,11 +374,16 @@ static int amdgpu_atif_handler(struct am
 	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;
@@ -385,7 +392,7 @@ static int amdgpu_atif_handler(struct am
 		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);
 


Patches currently in stable-queue which might be from lyude@xxxxxxxxxx are

queue-4.19/drm-atomic_helper-disallow-new-modesets-on-unregistered-connectors.patch
queue-4.19/drm-i915-fix-hpd-handling-for-pins-with-two-encoders.patch
queue-4.19/drm-i915-dp-restrict-link-retrain-workaround-to-external-monitors.patch
queue-4.19/drm-nouveau-fix-nv50_mstc-best_encoder.patch
queue-4.19/drm-i915-skip-vcpi-allocation-for-mstb-ports-that-are-gone.patch
queue-4.19/drm-amdgpu-suppress-keypresses-from-acpi_video-events.patch
queue-4.19/drm-i915-dp-fix-link-retraining-comment-in-intel_dp_long_pulse.patch
queue-4.19/drm-i915-don-t-unset-intel_connector-mst_port.patch
queue-4.19/drm-i915-fix-possible-race-in-intel_dp_add_mst_connector.patch
queue-4.19/drm-nouveau-check-backlight-ids-are-0-not-0.patch
queue-4.19/drm-i915-fix-null-deref-when-re-enabling-hpd-irqs-on-systems-with-mst.patch
queue-4.19/drm-dp_mst-check-if-primary-mstb-is-null.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux