From patchwork Thu May 4 00:28:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9710663 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 280B760385 for ; Thu, 4 May 2017 00:29:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1959428648 for ; Thu, 4 May 2017 00:29:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E3492867A; Thu, 4 May 2017 00:29:03 +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 A53EC28648 for ; Thu, 4 May 2017 00:29:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADC1A6E3F2; Thu, 4 May 2017 00:28:57 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com [IPv6:2607:f8b0:400e:c05::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id EAA4C6E3CC for ; Thu, 4 May 2017 00:28:49 +0000 (UTC) Received: by mail-pg0-x230.google.com with SMTP id o3so2767076pgn.2 for ; Wed, 03 May 2017 17:28:49 -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=xVjZHtSMBlP7mRsXHD8R3WM/Sf/SUl0RjVURGXU6WJA=; b=EDC0sm+wXpiUcEtirwSES5VHsh7F8rSRdVOjV97gD26wXNS3CaaZpn9QQxpRQziOOY 2/BLvMLU6MOR/mMx2vIULWCDsymlkPA0yu0bTx8aObP/9/xHA6rx6ppe450CJ3JIDNf/ pju+mCZtGz2Ouxzl5C9M6dAwP4QC9OKPIxLaaAQZAXMUYqjDeuawYbm8/osCVaFQSllt VW1ozcf7UePmebuHw+8OqqUalOjOuBBd9uyIGBk1bM1814KtUwVzlit3DMXKSmFedL+J 7VfMDzeGlJokedKSF2eC9bMX2nfHRpemN8bQoVGnVoXhuhpfyVROSyeXDqkoZZyrAKQ8 jT9A== 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=xVjZHtSMBlP7mRsXHD8R3WM/Sf/SUl0RjVURGXU6WJA=; b=na5SeC/vjzUXwlbs4GWa0iG1AkhXLGDP/54ABn3whbz2emH0TZPiPPbc7GXDfdTVeg tA0auoxH/kE940Bbi5MYsKq+K2s2jUgY2/KH5BFgXsll0yjTRz5emEMllVHHq9f567yj DgRK/wmJNdvJyLTNnFHz9Bt/OMjt97RytJhrJ/Y4xBcHeZbBUYa/ODYg+1CDohMZYPep B/wgHeqP+Jy+WVRnMrdDAq82d+WH77qjvWv0x5dcCcpT0w0KS11YMc/rlBnK7W2aXzLj PJUj2KgpL0AKCeSrcJu9zLjwZDjgrHCu6x3whFpn6PD5Ec+Vlyvk6MUau1w78WEKJux3 NaVA== X-Gm-Message-State: AN3rC/6BGSrTzo+3m9CqD6c2M9VVptDC8LTwaJsYBgZAQWOHeRpfjf7w vWYREvXp6ubBEZt+ X-Received: by 10.84.228.201 with SMTP id y9mr22908866pli.13.1493857729476; Wed, 03 May 2017 17:28:49 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id v85sm481257pfk.5.2017.05.03.17.28.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2017 17:28:48 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id 4AB4C11F8BF; 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:32 -0700 Message-Id: <20170504002836.120988-6-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 5/9] drm/i915: Set backlight mode before enable backlight 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 We should set backlight mode register before set register to enable the backlight. Signed-off-by: Puthikorn Voravootivat Reviewed-by: Dhinakaran Pandiyan --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index e82f7cb9a7af..5ef3ade7c40e 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -103,8 +103,6 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector) uint8_t dpcd_buf = 0; uint8_t edp_backlight_mode = 0; - set_aux_backlight_enable(intel_dp, true); - if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_BACKLIGHT_MODE_SET_REGISTER, &dpcd_buf) != 1) { DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n", @@ -131,6 +129,8 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector) default: break; } + + set_aux_backlight_enable(intel_dp, true); } static void intel_dp_aux_disable_backlight(struct intel_connector *connector)