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 0133B28E23; Tue, 16 Jan 2024 00:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fF7pzbdG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A39FDC433F1; Tue, 16 Jan 2024 00:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705364130; bh=dT/uc4YuFhaIKAKODGtPmNAZwz7l3nRuewj8KQdOklQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fF7pzbdGlxyF65sdV0Uvej9N6Z9YMVkWnt0kqs8OphRZKEX9MG/CfVTZXIDh8+/DE Yup+HNh1vrB3i7FpsBLKwYmDVaoO3J7O4BkkB+KbSnIgFJXC7oEfZys/fvPFXdql76 IEgf1Vq6uRb7hMUcJW3TRZD+Poo+yyWpgyAKD9o2VGUcYJV6VU/BLHQa1D8MJcwk5Z lgkx6gvsHtEEMt8fijUqs/0/yNtI/PojrzXC+KPEWyT8f5t6wTRLSiyB/vDT+KR0vI l+n1nV/rheZ11g6tdqBq+SMlt9gMWk1bWzlhiDoqDm4dXP2OA+WXlHjqWDNSLiPOKo ozKeVpwYAztwA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yuluo Qiu , Celeste Liu , "Rafael J . Wysocki" , Sasha Levin , rafael@kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 2/5] ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop Date: Mon, 15 Jan 2024 19:15:22 -0500 Message-ID: <20240116001526.214354-2-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116001526.214354-1-sashal@kernel.org> References: <20240116001526.214354-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 4.19.305 Content-Transfer-Encoding: 8bit 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 eb7fca6f9444..64d55c84e466 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