From patchwork Tue May 9 23:40:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9719027 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 C96CB6035D for ; Tue, 9 May 2017 23:41:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB74B28458 for ; Tue, 9 May 2017 23:41:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B07462847D; Tue, 9 May 2017 23:41:10 +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 71FD128458 for ; Tue, 9 May 2017 23:41:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD4DB6E1D9; Tue, 9 May 2017 23:41:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x229.google.com (mail-pg0-x229.google.com [IPv6:2607:f8b0:400e:c05::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7091B89DE5 for ; Tue, 9 May 2017 23:41:04 +0000 (UTC) Received: by mail-pg0-x229.google.com with SMTP id 64so7208599pgb.3 for ; Tue, 09 May 2017 16:41:04 -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=5ddH5osFd7FmzFI4t4BC+gYhQMnIRh4dUXIIpwkpqzE=; b=GddEMfgw+4n1wN1mQSESH9zUfzFR5523QDnRSJmbiTtHrGqS1ITN1JLhRzqKls3FYw Cpfnl7cdAqSG3SHgBC0hBudcShQyzjcoSbmj0v6trTnteGMWRqRpSo6ZzpSb0kCXa8jf vnsZD5jsxw0mJuhO5JlGOMoj9QD7eLihpuL3ZV90Sru8mgBUgk3KeOpJhVw3T13TrhUm hZYhxT9EppI2tluS1OhsRPQxWmtW3o0KFiHsbUtEq/5XtmqhYS2T/tcMbIHOnIaoNwLp Iz6X31svJhFsutPn9YuasaFFUuoWA4xZZ8L3WU/UERD5qHU7yOLSBuPauUk7pCsghk09 cSfQ== 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=5ddH5osFd7FmzFI4t4BC+gYhQMnIRh4dUXIIpwkpqzE=; b=VgTzqBif923Tg/pliTw2pLEag/+8biq2BFxD3i1m8m3ObZoMD+KWAAVUvnbXWK7AS6 2ThkRCY4SWoCr01RXOULg87DtkHsZh8gX59j9+DjW2Gx+xCt9H/8vKqmY/AImMdp3RMH 98wVKMGrU/H40lFHLaWGQFvmQ1X0tr8uHD9oUS4xMeMzerNejy9es2xd65HSC4UDybAv PBgWyqNL7J/ozQHT3l1384Tkkimz7lzV+InJhsX4EWNMhfppYyUx1DQ5l0zfqKfEuQDQ 85dX/4ldQ4Pch9nCpIhthHyihbDcjBJ15zFxizEUWiHnv19Kp/xaFhcxbsxMjq9Cf1+Y YpSg== X-Gm-Message-State: AODbwcAOUemgx/hpLtNrNjGJ/sVTEJx9U4+y69YMiPDrdKWScQFctkEn a+f5U6g4e7j9BBxL X-Received: by 10.99.67.69 with SMTP id q66mr3083650pga.156.1494373263770; Tue, 09 May 2017 16:41:03 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id f24sm1811729pfk.66.2017.05.09.16.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 16:41:03 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id F3EC611F8C0; Tue, 9 May 2017 16:40:59 -0700 (PDT) From: Puthikorn Voravootivat To: intel-gfx@lists.freedesktop.org, Dhinakaran Pandiyan Date: Tue, 9 May 2017 16:40:50 -0700 Message-Id: <20170509234052.189575-8-puthik@chromium.org> X-Mailer: git-send-email 2.13.0.rc2.291.g57267f2277-goog In-Reply-To: <20170509234052.189575-1-puthik@chromium.org> References: <20170509234052.189575-1-puthik@chromium.org> Cc: Puthikorn Voravootivat , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v6 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)