Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/acpi Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/2bdf0fad0aa9
branches:  netbsd-8
changeset: 935346:2bdf0fad0aa9
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jun 30 17:41:01 2020 +0000

description:
Pull up following revision(s) (requested by sborrill in ticket #1563):

        sys/dev/acpi/acpi_display.c: revision 1.18

Only need to set brightness if reading the initial state fails
to sync firmware and the driver. Avoids black screen at boot time.

Thanks to jmcneill@

diffstat:

 sys/dev/acpi/acpi_display.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 8cc01672b012 -r 2bdf0fad0aa9 sys/dev/acpi/acpi_display.c
--- a/sys/dev/acpi/acpi_display.c       Tue Jun 30 15:15:12 2020 +0000
+++ b/sys/dev/acpi/acpi_display.c       Tue Jun 30 17:41:01 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_display.c,v 1.16 2017/06/01 02:45:09 chs Exp $    */
+/*     $NetBSD: acpi_display.c,v 1.16.2.1 2020/06/30 17:41:01 martin Exp $     */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.16 2017/06/01 02:45:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.16.2.1 2020/06/30 17:41:01 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -647,8 +647,8 @@
                 * Synchronize ACPI and driver brightness levels, and
                 * check that brightness control is working.
                 */
-               (void)acpidisp_get_brightness(osc, &bc->bc_current);
-               if (acpidisp_set_brightness(osc, bc->bc_current)) {
+               if (acpidisp_get_brightness(osc, &bc->bc_current) &&
+                   acpidisp_set_brightness(osc, bc->bc_current)) {
                        kmem_free(bc->bc_level,
                            bc->bc_level_count * sizeof(*bc->bc_level));
                        kmem_free(bc, sizeof(*bc));



Home | Main Index | Thread Index | Old Index