From patchwork Mon Dec 6 07:04:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 377142 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB677R80022157 for ; Mon, 6 Dec 2010 07:07:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751168Ab0LFHHi (ORCPT ); Mon, 6 Dec 2010 02:07:38 -0500 Received: from mga02.intel.com ([134.134.136.20]:37697 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222Ab0LFHHh (ORCPT ); Mon, 6 Dec 2010 02:07:37 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 05 Dec 2010 23:07:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,305,1288594800"; d="scan'208";a="684242087" Received: from rui.sh.intel.com (HELO [10.239.36.7]) ([10.239.36.7]) by orsmga001.jf.intel.com with ESMTP; 05 Dec 2010 23:07:36 -0800 Subject: [PATCH 6/7] ACPI video: introduce module parameter video.use_bios_initial_backlight From: Zhang Rui To: "Brown, Len" Cc: "linux-acpi@vger.kernel.org" , Matthew Garrett , "Zhang, Rui" Date: Mon, 06 Dec 2010 15:04:27 +0800 Message-ID: <1291619067.19296.580.camel@rui> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 06 Dec 2010 07:07:38 +0000 (UTC) Index: linux-2.6/drivers/acpi/video.c =================================================================== --- linux-2.6.orig/drivers/acpi/video.c +++ linux-2.6/drivers/acpi/video.c @@ -80,6 +80,13 @@ module_param(brightness_switch_enabled, static int allow_duplicates; module_param(allow_duplicates, bool, 0644); +/* + * Some BIOSes claim they use minimum backlight at boot, + * and this may bring dimming screen after boot + */ +static int use_bios_initial_backlight = 1; +module_param(use_bios_initial_backlight, bool, 0644); + static int register_count = 0; static int acpi_video_bus_add(struct acpi_device *device); static int acpi_video_bus_remove(struct acpi_device *device, int type); @@ -705,9 +712,11 @@ acpi_video_init_brightness(struct acpi_v * when invoked for the first time, i.e. level_old is invalid. * set the backlight to max_level in this case */ - for (i = 2; i < br->count; i++) - if (level_old == br->levels[i]) - level = level_old; + if (use_bios_initial_backlight) { + for (i = 2; i < br->count; i++) + if (level_old == br->levels[i]) + level = level_old; + } goto set_level; }