Module Name: src
Committed By: martin
Date: Tue Jun 30 18:45:18 UTC 2020
Modified Files:
src/sys/dev/acpi [netbsd-9]: acpi_display.c
Log Message:
Pull up following revision(s) (requested by sborrill in ticket #978):
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@
To generate a diff of this commit:
cvs rdiff -u -r1.16.16.1 -r1.16.16.2 src/sys/dev/acpi/acpi_display.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/acpi/acpi_display.c
diff -u src/sys/dev/acpi/acpi_display.c:1.16.16.1 src/sys/dev/acpi/acpi_display.c:1.16.16.2
--- src/sys/dev/acpi/acpi_display.c:1.16.16.1 Wed Apr 29 13:36:57 2020
+++ src/sys/dev/acpi/acpi_display.c Tue Jun 30 18:45:18 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_display.c,v 1.16.16.1 2020/04/29 13:36:57 martin Exp $ */
+/* $NetBSD: acpi_display.c,v 1.16.16.2 2020/06/30 18:45:18 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.16.1 2020/04/29 13:36:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.16.16.2 2020/06/30 18:45:18 martin Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -647,8 +647,8 @@ acpidisp_out_attach(device_t parent, dev
* 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));