From patchwork Thu May 11 23:02:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9723229 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 235E960236 for ; Thu, 11 May 2017 23:02:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B8A928738 for ; Thu, 11 May 2017 23:02:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 105E32873F; Thu, 11 May 2017 23:02:50 +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 CACA428738 for ; Thu, 11 May 2017 23:02:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4AF196E609; Thu, 11 May 2017 23:02:46 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com [IPv6:2607:f8b0:400e:c05::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9026D6E5FB for ; Thu, 11 May 2017 23:02:40 +0000 (UTC) Received: by mail-pg0-x233.google.com with SMTP id u28so21307834pgn.1 for ; Thu, 11 May 2017 16:02:40 -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=NWJhW+TL64qICp0xYeUuQyRS/MJ2RTBiPqwpAp+mAhM=; b=ny3WbwCbe+3Y6VSeW1zmpHf0p+cz/8KqLxSneyipuueKUjI4e3bYI/d4m0O6MpjoWD Va9jYzwA3Wcem3MepTKTgFFT4f0pnKCXH1m7O5mSRNP2b7Xkr7GxIilThkySjDhw3l3J BMrKxXVDgaQqH8/BhOgzznDn62t+PATXawLJuxXyuXArmaXsdA3ysLs52LsIA1Tsnp4t VqW2vczUR2f+t6akQql2+bbIzy1hYD4KoRTN1AklSgduMqE4jCJyfyf5+o+Rn6Kk5K1V YWH6t1JOyvkW9o98LP/rL+8hA4+6yThhxvOOmX29HMrGM6w5Ce02WixfYQLI9vnXKpYG wAQw== 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=NWJhW+TL64qICp0xYeUuQyRS/MJ2RTBiPqwpAp+mAhM=; b=iM1KAVSy2F8oMQ5zAW1NhJXfszOBcKOYbS+SuUYBC3Nx6fZPCn6mZgPByO12mde7S3 nFFfvd2wCbiwUqBTfZNT7KxyxqvAYkjqjNVtpGFzuEjOU53AY3m3UUCz1tXVg0zzFWfg Tjv+rrpZwfYVBGNqhrTzQ3kpnthPbK5iHwrBA4rY2aOccshAZZGVeZPxlQks9SqjNiAJ Uz6ssfERf+5S6IoNboIpPTO7M0LjXMQjWTTWBhJUtvw+AQfz/VHIe4qQcmt7jE5SicMU 11+R3rrdqLUapoNkMX3or5H8ybKckOjL6rJ5ckJImmdWuyxm7xEpIOUONvaVzzDX96wW c3uQ== X-Gm-Message-State: AODbwcCMYuq/FavkbXziXzUtqHiUnXOy+1MWrsTsRgaNBXN2mYvS0xY+ X9aWqXbh2LnPInU7 X-Received: by 10.98.18.157 with SMTP id 29mr982809pfs.75.1494543760025; Thu, 11 May 2017 16:02:40 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id p68sm1887324pga.6.2017.05.11.16.02.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 16:02:38 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id 9024111F90E; Thu, 11 May 2017 16:02:37 -0700 (PDT) From: Puthikorn Voravootivat To: intel-gfx@lists.freedesktop.org, Dhinakaran Pandiyan Date: Thu, 11 May 2017 16:02:21 -0700 Message-Id: <20170511230225.142870-6-puthik@chromium.org> X-Mailer: git-send-email 2.13.0.rc2.291.g57267f2277-goog In-Reply-To: <20170511230225.142870-1-puthik@chromium.org> References: <20170511230225.142870-1-puthik@chromium.org> Cc: Puthikorn Voravootivat , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v7 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 5ee1d90a3263..a72893da78d0 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)