svn commit: r360089 - stable/12/sys/dev/acpica

Colin Percival cperciva at FreeBSD.org
Sun Apr 19 02:49:06 UTC 2020


Author: cperciva
Date: Sun Apr 19 02:49:05 2020
New Revision: 360089
URL: https://svnweb.freebsd.org/changeset/base/360089

Log:
  MFC r360025: Alert devd when acpi_video brightness changes

Modified:
  stable/12/sys/dev/acpica/acpi_video.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/acpica/acpi_video.c
==============================================================================
--- stable/12/sys/dev/acpica/acpi_video.c	Sun Apr 19 02:20:39 2020	(r360088)
+++ stable/12/sys/dev/acpica/acpi_video.c	Sun Apr 19 02:49:05 2020	(r360089)
@@ -1034,6 +1034,7 @@ vo_get_brightness(ACPI_HANDLE handle)
 static void
 vo_set_brightness(ACPI_HANDLE handle, int level)
 {
+	char notify_buf[16];
 	ACPI_STATUS status;
 
 	ACPI_SERIAL_ASSERT(video_output);
@@ -1041,6 +1042,8 @@ vo_set_brightness(ACPI_HANDLE handle, int level)
 	if (ACPI_FAILURE(status))
 		printf("can't evaluate %s._BCM - %s\n",
 		       acpi_name(handle), AcpiFormatException(status));
+	snprintf(notify_buf, sizeof(notify_buf), "notify=%d", level);
+	devctl_notify("ACPI", "Video", "brightness", notify_buf);
 }
 
 static UINT32


More information about the svn-src-all mailing list