From patchwork Thu May 4 00:28:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9710647 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 7EC0E60385 for ; Thu, 4 May 2017 00:28:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FC2A28652 for ; Thu, 4 May 2017 00:28:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6447628648; Thu, 4 May 2017 00:28:53 +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 EF17528648 for ; Thu, 4 May 2017 00:28:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CC8E6E3C8; Thu, 4 May 2017 00:28:50 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9E456E3C1 for ; Thu, 4 May 2017 00:28:48 +0000 (UTC) Received: by mail-pg0-x232.google.com with SMTP id v1so2782970pgv.1 for ; Wed, 03 May 2017 17:28:48 -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=Oq0+ZUG5dQ9/NNb0Wyekota8zYJAFg+oO2fv9i5AJyQ=; b=tebS878VML/RrgqOg1Ta8Tx2Bqxptbdlxm1SlHBSq9YmcQyXHWrmF56M4Vbe8pnw3Y 6W/jVoCfzqqtOFKnzaEQ1QXALNp9W3VrOKtRNQXXy8QPkiJsxASA9AAZaw254SVrSCKU P9fJhWujL2m0239bAXHogguVZvtsyrx8vKiUjP8s3KRP/QDlZaGi7dZWxV6XyQ98eNM1 zyYD8cUYJ5oxMTfNzmPeuyps7c4ExYiJARCcUbcwj7TdIVOn+LImCbIZExW/U/v3wAoc fZjdda+6KdLgudMmPZ+PFpEGMcvRMj4KWtFkk4zk62eS9rdKs1kwaeUGKQefC50mGkmB KlGA== 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=Oq0+ZUG5dQ9/NNb0Wyekota8zYJAFg+oO2fv9i5AJyQ=; b=thJ3l9cf66v42D7eCgAiLgLRCa4hE/nDiibNlS5l+LaesbxmdLJXM3RgSunF6Cu9zF hflkFpFrOcLeEDCcgH+hcX99+PzTx61iK3L1gL2hPwWkwrt+MXQY+S5jLuPMOeC7oBCs 8TFCxRhRZFVFqpiW8z/LzimOtC+JCSru7rfqB+QFgXRVzWv7NPtPM8oibCK+LwLJz2HC f8aFegGz9OuiTlyaS553b0irJw6q0yCZP4nhWUGXet7H39UDEwLi314UibD6Go80wZX4 bFqVckrELClXRwx/4uwtXh7pqSDH1kkZLIFcNwHZk3g0SXSTl4NLQ5ZNMaprHey20AME DhFg== X-Gm-Message-State: AN3rC/52FQmID7zppYUQCsOzfVVLn+dd6LMUFM+K1CjvLTuX9Am92R/d fQTUrteEiv0UpmWk X-Received: by 10.84.217.201 with SMTP id d9mr31044469plj.164.1493857728186; Wed, 03 May 2017 17:28:48 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([2620:0:1000:1301:8cfe:b3:9bd6:49ad]) by smtp.gmail.com with ESMTPSA id x2sm455321pfi.80.2017.05.03.17.28.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2017 17:28:47 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id 44D9E11F75A; Wed, 3 May 2017 17:28:46 -0700 (PDT) From: Puthikorn Voravootivat To: intel-gfx@lists.freedesktop.org Date: Wed, 3 May 2017 17:28:34 -0700 Message-Id: <20170504002836.120988-8-puthik@chromium.org> X-Mailer: git-send-email 2.13.0.rc1.294.g07d810a77f-goog In-Reply-To: <20170504002836.120988-1-puthik@chromium.org> References: <20170504002836.120988-1-puthik@chromium.org> Cc: dri-devel@lists.freedesktop.org, Puthikorn Voravootivat , Dhinakaran Pandiyan Subject: [Intel-gfx] [PATCH v5 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 7d323af96636..fc26fea94fd4 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -158,6 +158,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)