From patchwork Thu May 4 00:28:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puthikorn Voravootivat X-Patchwork-Id: 9710661 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 E3FB760385 for ; Thu, 4 May 2017 00:29:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D646C28648 for ; Thu, 4 May 2017 00:29:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB2B92867A; Thu, 4 May 2017 00:29:01 +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 873EB28648 for ; Thu, 4 May 2017 00:29:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EB456E3F0; 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-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 776036E3C9 for ; Thu, 4 May 2017 00:28:49 +0000 (UTC) Received: by mail-pf0-x22c.google.com with SMTP id e64so2500472pfd.1 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=NoC5Rfc9PrIlh8UoUCKBz+TKRCnauQa22AX57URV1pc=; b=p/mXuEZ/l5Teoqze/yzGsB6sgnmsdprVNSajNRX7fpQZka5+z700U+zYNdKhwjdFNr 5Qf3SYB7A55YeCcte/pBIF7Fqdf3dr7Sqr3RXoNcDzLQZtvYxeqI7uKhIOj8KB/TqEHB o8YX1sbc5SVSIs8P6zolfYKS1wsLt/nWposqcy4Dp4YaWg0eCyZBsyPNHlFpmPK5xBqg fkevVr/DB5A6nZZyQYtJaZSV2KUVacr5WMCNbKieoCO+98NBUvze01vs+dc2ryGwiRHQ 28QFvcrPHhLJXaxMST5a3bHMsWSGP6y8L+hZ0LIY5H14VAu+HYQwyfYGjXZwgmVjcN/O RHzQ== 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=NoC5Rfc9PrIlh8UoUCKBz+TKRCnauQa22AX57URV1pc=; b=DVEGRW+bIrFceibdgZe9eRavWC7wHoFx9TiIWUKU7mlPcy0JNthiU9sAMCuJ+0acYq gLvcOOAjUVGF/hD8sETaFbiIc2CWz6eyv0tXmk8wyRoR2rkVkSRy10JgMd6iX53aa4mb 8yj3VbItJAInh/ujvGCKh21G6Pyj/so7fwJA23fUbilBoTOdcjzSFwfHkkbRq0p9JtdW RjarcTTDy9VcKLfdoDsq62t6vPQWFndmsF8P1sXx8K/coDqwk5jc8wVHZfk5/PHKmBOi pyReqXYUGxuOUQxnX1U5n5NJRalNiWb7mThG1pN9crq2jQX7iqd7l8FRWmTY8gHfbuXv 78WQ== X-Gm-Message-State: AN3rC/4y5KIuo1YyrWbXblImVF3nRRbluY/FF/AbFiHwELhwfIjn1A6p cnoS9SmRMYxWpd2g X-Received: by 10.99.8.193 with SMTP id 184mr42655603pgi.189.1493857728872; Wed, 03 May 2017 17:28:48 -0700 (PDT) Received: from puthik2.mtv.corp.google.com ([172.22.64.53]) by smtp.gmail.com with ESMTPSA id 128sm449311pgi.49.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 4603011F8F4; 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:30 -0700 Message-Id: <20170504002836.120988-4-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 3/9] drm/i915: Drop AUX backlight enable check for backlight control 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 There are some panel that (1) does not support display backlight enable via AUX (2) support display backlight adjustment via AUX (3) support display backlight enable via eDP BL_ENABLE pin The current driver required that (1) must be support to enable (2). This patch drops that requirement. Signed-off-by: Puthikorn Voravootivat --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index ad8560c5f689..5b83c9737644 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable) { uint8_t reg_val = 0; + /* Early return when display use other mechanism to enable backlight. */ + if (!(intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP)) + return; + if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_DISPLAY_CONTROL_REGISTER, ®_val) < 0) { DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n", @@ -164,7 +168,6 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector) * the panel can support backlight control over the aux channel */ 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[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)) { DRM_DEBUG_KMS("AUX Backlight Control Supported!\n"); return true;