From patchwork Thu May 11 23:02:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9723231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20E3160236 for ; Thu, 11 May 2017 23:02:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1994F28738 for ; Thu, 11 May 2017 23:02:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E7FF2873F; Thu, 11 May 2017 23:02:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7A0128738 for ; Thu, 11 May 2017 23:02:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FF4C6E60A; Thu, 11 May 2017 23:02:46 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com [IPv6:2607:f8b0:400e:c05::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 168346E5F9 for ; Thu, 11 May 2017 23:02:41 +0000 (UTC) Received: by mail-pg0-x233.google.com with SMTP id u28so21307932pgn.1 for ; Thu, 11 May 2017 16:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=bzTHZmYHk8erjSqu/DwS9UnlcUKUn4SYAcLEj2QE47c=; b=X1QA/ze4ciDWJaOOdIxalg5afhnXge0ntwT/OaU//ziQkTIQQylLRWKkItwpa+bVl/ ldNZXmrGraIWLmYeSNariMxLMwhf+6exnRwOMDiyQoIC+0YhLw/t3blaFJ1ChN20z0Hc tDqJJIBDvXz0R9L6RalDgFuySI1kL1Qn7YpYR4IJF8MYee0iqlNCgh/Z2n/0Am3CnP6g TjUW+qSdeh8F4Py+n83Ya6nzG+y39M1N/alIKk0YNyjjkqAdRNLYZjZHb4RBxrs2tY8a /mWPr7riViCOA7cU9Dese64dLArNlD5chmwg0HQ3+R1jGDlEZCP/vCE5aWDwMawsPUlf wXGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=bzTHZmYHk8erjSqu/DwS9UnlcUKUn4SYAcLEj2QE47c=; b=Hzwha/Z6LVij/hTlfTyEtqbaslZ/Vnc7tFIl4GRIeF5kLWHrA7N8hXaBlW43JANU0m reLM6o/3eNR1Fa3eNtB89N8CckpCO3bIhOS441F2ZSsPtxHip4JBKs3nUjUUQZS2fnhh pBcTsGj/1wDCjPrBN2JG3qEy/LoT2ojIQyb672osD64K/L/gmkEzZVrNtiEu4V8Ythbf tOWbAv6tnHI49Xm0FvchkdAmnlU+48u0t8ltPgo5DqCHCYbp+HESzqwlU0Pfy4VQ9QXo oVfKPTroCmYq6fYpE/ofYKQkFzlNOZhMk5fkzzSOOKlnd1DiETsIfgbvODgrKpIz0xjG QcJQ== X-Gm-Message-State: AODbwcBOjF2RCSUDzd6ruHrvZntj5C46EYajTzXr43NbZy4fQPwm0TI6 ZV5TTMiMOcZSZXYR X-Received: by 10.98.37.135 with SMTP id l129mr1071972pfl.38.1494543760433; Thu, 11 May 2017 16:02:40 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id y190sm1942719pgd.25.2017.05.11.16.02.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 16:02:40 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id 9939C11F918; Thu, 11 May 2017 16:02:37 -0700 (PDT) From: Puthikorn Voravootivat To: intel-gfx@lists.freedesktop.org, Dhinakaran Pandiyan Date: Thu, 11 May 2017 16:02:23 -0700 Message-Id: <20170511230225.142870-8-puthik@chromium.org> X-Mailer: git-send-email 2.13.0.rc2.291.g57267f2277-goog In-Reply-To: <20170511230225.142870-1-puthik@chromium.org> References: <20170511230225.142870-1-puthik@chromium.org> Cc: Puthikorn Voravootivat , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v7 7/9] drm/i915: Restore brightness level in aux backlight driver X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Some panel will default to zero brightness when turning the panel off and on again. This patch restores last brightness level back when panel is turning back on. Signed-off-by: Puthikorn Voravootivat Reviewed-by: Dhinakaran Pandiyan --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index 1c5459bc20ae..0b48851013cc 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -159,6 +159,7 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector) } set_aux_backlight_enable(intel_dp, true); + intel_dp_aux_set_backlight(connector, connector->panel.backlight.level); } static void intel_dp_aux_disable_backlight(struct intel_connector *connector)