From patchwork Tue May 9 23:40:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9719019 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 D75DB60364 for ; Tue, 9 May 2017 23:41:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C674C28458 for ; Tue, 9 May 2017 23:41:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B810B2847D; Tue, 9 May 2017 23:41: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 4A00028458 for ; Tue, 9 May 2017 23:41:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D54D489D7D; Tue, 9 May 2017 23:41:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com [IPv6:2607:f8b0:400e:c00::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 47E0F89D7D for ; Tue, 9 May 2017 23:41:02 +0000 (UTC) Received: by mail-pf0-x22e.google.com with SMTP id e193so7185675pfh.0 for ; Tue, 09 May 2017 16:41:02 -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=hHttF3zMKZCqbx/N61kLDFB9EHfFabglK53/+chvZNM=; b=rtWGN8kYr9TH9vTrJHWackQYbd9eoF1eZ7i1EZkBmmuTjtAFSt+7FuZBd0qw/aAKmk 1rIhmnfNi4wjOvmYBjfIUTbi3jNer7Qbwgz7ifAkK90dsnunv2nWaMRQ6HlACD+E2T2N PaeJp2HBu6u4FxnIRNAN7sNqAhyYxkKuj9SIctuAYxKDkJjEhwxuj2Sgi20sM7DZn8Zs vLUYjyxgWIzxnZ3jMi1iSFLLNgfhSdZ45gsvVF13T0azO3VU6PIHSDojP5pyGXoDlnmV aKzbaP08UP+X9Ut0Hm//qsE7raUhURLh9+0DPTKiL+9PMtuAjz8wfuM/12OJq7N9FiZa 9Ftw== 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=hHttF3zMKZCqbx/N61kLDFB9EHfFabglK53/+chvZNM=; b=MMRZ57h/0Zo9wDqtiTPrL8gAoJlP5qKANK/7hQ3AJfYNh8c/mSih3Giq+23AFIbgGq lu8cT5HePRX1KcizPIU2NbaFK8xw4Fqyu5Yk9hH9JL5lBQGOJuayWmvj0PsYFc0h16Bs o6dhTIz8YL4+QE/E0P3mefDrgGEnvlavNXXpkzzNW49vRiSK/ROOIVyjqCyaSbfKfova CddEv6egYqxS380L8NZ+g2ZgD92vqQPMqUGJ2lDhdSHMpt5ypmZhkYt6kLjP370TitB9 fukbM1omsdyUFW+cMruIVW15Q3FBY2UJGltGKyfhI2o+TnqB7Wp4RFcY70BsSbDrgOXW aG2Q== X-Gm-Message-State: AODbwcCeXXAjx9Yz9aklXM5bvBfFQrGrKo8LRM/TpSvfE5omKHql7exf lM5qLtHrzHt7oqfh X-Received: by 10.99.123.94 with SMTP id k30mr3017952pgn.91.1494373261710; Tue, 09 May 2017 16:41:01 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id v6sm1589059pgb.20.2017.05.09.16.41.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 16:41:00 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id EDD7911F839; 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:48 -0700 Message-Id: <20170509234052.189575-6-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 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)