From patchwork Thu May 4 00:28:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9710651 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 C884D60385 for ; Thu, 4 May 2017 00:28:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAED228648 for ; Thu, 4 May 2017 00:28:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFA142867A; Thu, 4 May 2017 00:28:56 +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 7891C28648 for ; Thu, 4 May 2017 00:28:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 624B76E3D9; Thu, 4 May 2017 00:28:53 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 084096E3CD for ; Thu, 4 May 2017 00:28:51 +0000 (UTC) Received: by mail-pg0-x235.google.com with SMTP id t7so2759435pgt.3 for ; Wed, 03 May 2017 17:28:51 -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=s1Lr2BCud/HSw4+GdlZrPI2KeA+E4bWGqNUlfc6COtA=; b=fnz5n8H40zJUROWixLV20N/Zdm9M8d5NZ31w8cpm6Zbw/c2Tupkaa5YfJRbQI19+/L wRm0JvLGtZ+PG48zgBgv3aBfAcguCj4h3EDUZkuBC8SY07h/zlQ9gFA4umtEnPj7K/oX gd+uWN4LchzN55XHE7hEHdJD8ZYm3Nu22oU0HzBtV88JuOVVvw5f8yvsS6F1p0VIx5Vt +TPbzoXUM7wSFA/J6YHGAEmyu+UYYmWIxHkySWhXiA0QvrppIehwBvaZB6dFmbtEPGa5 OtxZ5CQkFQvITkSJ5B+1Xw0DR57Lth7HFPB9amQEXlTC/8JKGuN5l3gO2+2XQQYzS4sb ULzA== 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=s1Lr2BCud/HSw4+GdlZrPI2KeA+E4bWGqNUlfc6COtA=; b=d4rgZV7zL/d/6tJ+CDg2qSBDQ7j5O3VIubpuRK5GkTd40t36t3S3lS+J8mwfY7UlxO YnKZfnHRAQ9iIvkSAaNiCJSxiDwcC1U6/ptTt/Pc8EG+XYveCirIVVaAVsh7m4tKW2l3 7sYDvGNVoUUYa2ZerPKfdmYbpVMlmBdQyiYX7bOYNCfoZ18uDofVZPzmQqaeyWDQFm78 iB1DPlRH1925gipV1t6DRyA1sMOcNP1rE5YGs4KK3yV3Rr2qawsVdEGuHGHMlKFtIwLC 7UF8rJv1+Xp15G+8j4hp5IS54GVHCdgBntr8ztdORzig3WyPEIbSMGFWTvFgdgyUAAKS ci9Q== X-Gm-Message-State: AN3rC/6MVfDkMIFwES0Z31jUCkLJ6IQO6DIEGXclsMGsP1lqn/hqeF/E vhaILN61SM33f+V7 X-Received: by 10.84.138.1 with SMTP id 1mr52723516plo.29.1493857730536; Wed, 03 May 2017 17:28:50 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id n77sm454096pfj.66.2017.05.03.17.28.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2017 17:28:49 -0700 (PDT) Received: by puthik2.mtv.corp.google.com (Postfix, from userid 218808) id 50DAA11F8F5; Wed, 3 May 2017 17:28:45 -0700 (PDT) From: Puthikorn Voravootivat To: intel-gfx@lists.freedesktop.org Date: Wed, 3 May 2017 17:28:28 -0700 Message-Id: <20170504002836.120988-2-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 1/9] drm/i915: Fix cap check for intel_dp_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 intel_dp_aux_backlight driver should check for the DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP before enable the driver. Signed-off-by: Puthikorn Voravootivat --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index 6532e226db29..24a905d1a74b 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -142,10 +142,9 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector) /* Check the eDP Display control capabilities registers to determine if * the panel can support backlight control over the aux channel */ - if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP && + if ((intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP) && (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && - !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) || - (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) { + (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)) { DRM_DEBUG_KMS("AUX Backlight Control Supported!\n"); return true; }