From patchwork Tue Aug 18 17:07:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Hopf X-Patchwork-Id: 42383 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7IH7X4P031974 for ; Tue, 18 Aug 2009 17:07:33 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25EE99EFFB; Tue, 18 Aug 2009 10:07:32 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 2426C9EF75 for ; Tue, 18 Aug 2009 10:07:28 -0700 (PDT) Received: from relay2.suse.de (relay-ext.suse.de [195.135.221.8]) by mx2.suse.de (Postfix) with ESMTP id 470C8867E2 for ; Tue, 18 Aug 2009 19:07:27 +0200 (CEST) From: Matthias Hopf To: intel-gfx@lists.freedesktop.org Date: Tue, 18 Aug 2009 19:07:24 +0200 Message-Id: <1250615246-26111-2-git-send-email-mhopf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1250615246-26111-1-git-send-email-mhopf@suse.de> References: <1250615246-26111-1-git-send-email-mhopf@suse.de> Subject: [Intel-gfx] [PATCH] Don't ignore backlight level change to the same level. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org If set externally to a different level, this would result in a no-op. OTOH if the display is switched off (DPMS) you do not want the change to take place immediately, but rather to be saved and set later when the display is active again. --- src/drmmode_display.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index f41b978..64b28ef 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1096,10 +1096,9 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, if (val < 0 || val > drmmode_output->backlight_max) return FALSE; - if (val != drmmode_output->backlight_active_level) { + if (drmmode_output->dpms_mode == DPMSModeOn) drmmode_backlight_set(output, val); - drmmode_output->backlight_active_level = val; - } + drmmode_output->backlight_active_level = val; return TRUE; }