Date: Fri, 17 Apr 2020 00:05:38 +0200 From: Oliver Pinter <oliver.pntr@gmail.com> To: Colin Percival <cperciva@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r360025 - head/sys/dev/acpica Message-ID: <CAPjTQNEFpKXE6QQUdR5dh3eHtmcVXfqOHW9JvdrhtPNrhGN=kA@mail.gmail.com> In-Reply-To: <202004162156.03GLuqgw058432@repo.freebsd.org> References: <202004162156.03GLuqgw058432@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, April 16, 2020, Colin Percival <cperciva@freebsd.org> wrote: > Author: cperciva > Date: Thu Apr 16 21:56:52 2020 > New Revision: 360025 > URL: https://svnweb.freebsd.org/changeset/base/360025 > > Log: > Alert devd when acpi_video brightness changes > > On my Dell Latitude 7390 laptop, the brightness hotkeys > (Fn+<up/down arrow>) send ACPI notifications which acpi_video > handles by adjusting its brightness setting; but ACPI does not > actually do anything with the backlight. > > Announcing brightness changes via devd makes it possible to close > the loop by triggering the intel_backlight utility to perform the > required backlight adjustment. > > Reviewed by: imp > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D24424 > > Modified: > head/sys/dev/acpica/acpi_video.c Please add this to release notes! > > Modified: head/sys/dev/acpica/acpi_video.c > ============================================================ > ================== > --- head/sys/dev/acpica/acpi_video.c Thu Apr 16 21:53:17 2020 > (r360024) > +++ head/sys/dev/acpica/acpi_video.c Thu Apr 16 21:56:52 2020 > (r360025) > @@ -1036,6 +1036,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); > @@ -1043,6 +1044,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 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPjTQNEFpKXE6QQUdR5dh3eHtmcVXfqOHW9JvdrhtPNrhGN=kA>