From patchwork Fri Jun 17 17:11:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9184655 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 3BA20601C0 for ; Fri, 17 Jun 2016 17:12:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 199BE252D5 for ; Fri, 17 Jun 2016 17:12:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E03226538; Fri, 17 Jun 2016 17:12:06 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4789252D5 for ; Fri, 17 Jun 2016 17:12:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751386AbcFQRME (ORCPT ); Fri, 17 Jun 2016 13:12:04 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:36353 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbcFQRMD (ORCPT ); Fri, 17 Jun 2016 13:12:03 -0400 Received: by mail-pa0-f67.google.com with SMTP id fg1so6159932pad.3 for ; Fri, 17 Jun 2016 10:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=juZzoVT4n+mE6Eshz/vqEIxD4hj25SU+Z9fdMRSwvvM=; b=FfA9vtyMF5kMgQ0UCAeunF4UDqM/fuJxYhSXhGaEC908RriSrtAekBhZ+pX2u0AdnU farqrymlnzOGyI/2s3FYjcslOvIDQ/fVCqYjPlMkc3OUrCN+M0SJ9tgMxd0Poszp3NJE Ip2HebxRgPYHi7FaKJvdZYZ8qcqiMWKskAjaRGLWQWvbMUUgw4PBwgRmCsOQ0I9FbjZy AW65AFwwhhkWdfFuMMiGA5xIkYlE37l+aAUt34pnKsjuxY5F68oEpP22LfGrxdZPWbX8 obCbSMDLeqVaI9kZys64Wm1rnK5WBX7xfKhJhv0T9G1POvKC96zURYI3Q7FenoGtYSTs UEJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=juZzoVT4n+mE6Eshz/vqEIxD4hj25SU+Z9fdMRSwvvM=; b=hBn+WQgo8DQFhH8rfZSWn6blZ6N8XKnbU1sD6LAFZvm5Fik5eQsxOV3b77vbP1t53y 0RPXoXipMAdEo0Cg0/RjscHHpStl2sWUmPX64EFzC+dwchbrkxQdLvmNE9Lfn3XmK2qM y7Yz5TWXb3nylzFVGZ3S2k3fFnw+Ip4f+616yEWJcQQjqhDL2s8Mlqu9oCHMJfRKfDPo wM2A7N7Sy+DxW3aZ9dgRCmcg2ySUmbzJ6D/srmw+ejmmT79Tr4lpZq/tqZxhc0oVy0z5 0PMwwHDT4WD3Rew1TFGW8fPH54GwOPtXTNjcjR1IiHzZyJ7qyC2y5qw0tqj4j1M659gr Abwg== X-Gm-Message-State: ALyK8tLBbqFt6wrjyeUaCDZMfOuFiBju3cKUWc9vgvko/h2t8FGE8S+w/Sy8A7n/plvnxQ== X-Received: by 10.66.166.202 with SMTP id zi10mr3430554pab.42.1466183517696; Fri, 17 Jun 2016 10:11:57 -0700 (PDT) Received: from localhost (port-1102.pppoe.wtnet.de. [84.46.4.82]) by smtp.gmail.com with ESMTPSA id d69sm64323523pfj.31.2016.06.17.10.11.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 10:11:56 -0700 (PDT) From: Thierry Reding To: Thierry Reding Cc: Jingoo Han , Lee Jones , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH] drm/panel: simple: Update backlight state property Date: Fri, 17 Jun 2016 19:11:53 +0200 Message-Id: <20160617171153.30504-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.3 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Some backlight drivers ignore the power property and instead only use the state property. Fixup the panel driver to set the state property in addition to the power property. Signed-off-by: Thierry Reding --- Jingoo, Lee, What's the correct way to do this? Should we update both power and state properties, or just state? I didn't find code anywhere to keep both in sync, so it seemed like both needed to be set explicitly. drivers/gpu/drm/panel/panel-simple.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 359cd37d09cb..f503d12b3930 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -168,6 +168,7 @@ static int panel_simple_disable(struct drm_panel *panel) if (p->backlight) { p->backlight->props.power = FB_BLANK_POWERDOWN; + p->backlight->props.state |= BL_CORE_FBBLANK; backlight_update_status(p->backlight); } @@ -235,6 +236,7 @@ static int panel_simple_enable(struct drm_panel *panel) msleep(p->desc->delay.enable); if (p->backlight) { + p->backlight->props.state &= ~BL_CORE_FBBLANK; p->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(p->backlight); }