Date: Sun, 19 Apr 2020 02:49:05 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360089 - stable/12/sys/dev/acpica Message-ID: <202004190249.03J2n5vW061668@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004190249.03J2n5vW061668>