From patchwork Mon Mar 17 16:41:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 3845101 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2A116BF540 for ; Mon, 17 Mar 2014 16:42:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F661201EF for ; Mon, 17 Mar 2014 16:42:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 42F55201DE for ; Mon, 17 Mar 2014 16:42:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD8036E545; Mon, 17 Mar 2014 09:42:46 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C8426EAA1 for ; Mon, 17 Mar 2014 09:42:45 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 17 Mar 2014 09:42:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,671,1389772800"; d="scan'208";a="501652425" Received: from sleopold-mobl.ger.corp.intel.com (HELO localhost) ([10.252.120.218]) by orsmga002.jf.intel.com with ESMTP; 17 Mar 2014 09:42:40 -0700 From: Jani Nikula To: Romain Francoise , Daniel Vetter In-Reply-To: <877g7s53ac.fsf@kima.orebokech.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <87eh213q70.fsf@kima.orebokech.com> <877g7s53ac.fsf@kima.orebokech.com> User-Agent: Notmuch/0.17+142~gb08654f2ff14 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Mon, 17 Mar 2014 18:41:48 +0200 Message-ID: <87vbvcrd4j.fsf@intel.com> MIME-Version: 1.0 Cc: intel-gfx Subject: Re: [Intel-gfx] v3.14-rc7: Backlight control broken on Dell XPS13 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 17 Mar 2014, Romain Francoise wrote: > Hi Daniel, > > Daniel Vetter writes: > >> Please never just send a mail to maintainers, always cc mailing lists. > > Yes, sorry, I sent this privately because it wasn't a fully-formed bug > report; I just wanted Jani to confirm that it wasn't intentionally > broken as of -rc7. > >> Have you tested with the patch reverted to confirm that it's indeed >> this commit and not something else (e.g. in the acpi code)? > > I hadn't, but I've now reverted the revert and things work again as in > v3.13. So as far as I can tell the quirk is still definitely needed. Here's two patches to try, separately, *without* the quirk: Patch #1: diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index cb058408c70e..ef26115dbe68 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -659,7 +659,7 @@ static void pch_enable_backlight(struct intel_connector *connector) /* This won't stick until the above enable. */ intel_panel_actually_set_backlight(connector, panel->backlight.level); - pch_ctl2 = panel->backlight.max << 16; + pch_ctl2 = panel->backlight.max << 16 | panel->backlight.level; I915_WRITE(BLC_PWM_PCH_CTL2, pch_ctl2); pch_ctl1 = 0; Patch #2: diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index cb058408c70e..10849104fa1e 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -669,6 +669,8 @@ static void pch_enable_backlight(struct intel_connector *connector) I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1); POSTING_READ(BLC_PWM_PCH_CTL1); I915_WRITE(BLC_PWM_PCH_CTL1, pch_ctl1 | BLM_PCH_PWM_ENABLE); + + intel_panel_actually_set_backlight(connector, panel->backlight.level); } static void i9xx_enable_backlight(struct intel_connector *connector)