From patchwork Tue Feb 5 19:06:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [12/12] drm/radeon: block the keypress on ATIF events Date: Tue, 05 Feb 2013 09:06:33 -0000 From: Alex Hung X-Patchwork-Id: 218572 Message-Id: <1360091193-12323-13-git-send-email-alex.hung@canonical.com> To: alex.hung@canonical.com, kernel-team@lists.ubuntu.com From: Luca Tettamanti The AMD ACPI interface may use ACPI_VIDEO_NOTIFY_PROBE to signal SBIOS requests; block the keypress in this case since the user did not actually press the mode switch key. Signed-off-by: Luca Tettamanti Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_acpi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index ea22f44..3486292 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c @@ -301,7 +301,12 @@ int radeon_atif_handler(struct radeon_device *rdev, } /* TODO: check other events */ - return NOTIFY_OK; + /* We've handled the event, stop the notifier chain. The ACPI interface + * overloads ACPI_VIDEO_NOTIFY_PROBE, we don't want to send that to + * userspace if the event was generated only to signal a SBIOS + * request. + */ + return NOTIFY_BAD; } static int radeon_acpi_event(struct notifier_block *nb,