From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6BCC69D2E; Wed, 21 Feb 2024 13:13:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521224; cv=none; b=lOJyzVPK7OfW8NFAKS4stsw0q67un0o+UBsfuoxGaZZkApkXzmyWnYaoNxnNjJZOMgNPyLRnwaj/jw2FhuzwdjN1aSUbD1KpMAnXHM5CUgY1ECGxrfRJaXfegK8ZH8uwZb43xRqOJEit+UvQwsLWO9qZY0b7I7Yw+LWW4iRKoYs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521224; c=relaxed/simple; bh=r84K9moTjsIXU92oUwbOcGyAhoAZz4AzpmiggXoG/JE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kZMjn9uYgF4khYwphVZuNY/Vvo+C+Oe1fu0JDDTPZtm6rja863OtvCiEbgx120TRiX8SvIRD8A3DmbLKRa7Sqfij8zcDmEreko6jKSekRjUX/K+WsShKRYHkqjuDt0DPikVw1xfjQQxbeZjpJG2XIzOBEc+EcnjVeM8oNJg/DdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dlPj03ey; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dlPj03ey" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C288DC433F1; Wed, 21 Feb 2024 13:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708521224; bh=r84K9moTjsIXU92oUwbOcGyAhoAZz4AzpmiggXoG/JE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dlPj03eyzgLx4+xSoDb4OAiAqt/UCOvnH9hMHYcH/mKJwx+2F8fYYNYAGXSExNOO4 13O36gBQj6F/OHARkOYl7DnjbdqV3kll1xoD0Zg7VKdKG1fmCXrWJuFMDV9XCOnzbt Fa3V1/VjmkaFrA8ho610KUWh/O8mR/kupiIKXSQM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuluo Qiu , Celeste Liu , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.19 055/202] ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop Date: Wed, 21 Feb 2024 14:05:56 +0100 Message-ID: <20240221125933.615221830@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125931.742034354@linuxfoundation.org> References: <20240221125931.742034354@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuluo Qiu [ Upstream commit 143176a46bdd3bfbe9ba2462bf94458e80d65ebf ] The Colorful X15 AT 23 ACPI video-bus device report spurious ACPI_VIDEO_NOTIFY_CYCLE events resulting in spurious KEY_SWITCHVIDEOMODE events being reported to userspace (and causing trouble there) when an external screen plugged in. Add a quirk setting the report_key_events mask to REPORT_BRIGHTNESS_KEY_EVENTS so that the ACPI_VIDEO_NOTIFY_CYCLE events will be ignored, while still reporting brightness up/down hotkey-presses to userspace normally. Signed-off-by: Yuluo Qiu Co-developed-by: Celeste Liu Signed-off-by: Celeste Liu Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpi_video.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index c22297cce288..a3f8368fe231 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -581,6 +581,15 @@ static const struct dmi_system_id video_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3350"), }, }, + { + .callback = video_set_report_key_events, + .driver_data = (void *)((uintptr_t)REPORT_BRIGHTNESS_KEY_EVENTS), + .ident = "COLORFUL X15 AT 23", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "COLORFUL"), + DMI_MATCH(DMI_PRODUCT_NAME, "X15 AT 23"), + }, + }, /* * Some machines change the brightness themselves when a brightness * hotkey gets pressed, despite us telling them not to. In this case -- 2.43.0