From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: do not setup backlight if not available according to VBT Date: Wed, 9 Apr 2014 15:45:26 +0200 Message-ID: <20140409134526.GW9262@phenom.ffwll.local> References: <1397039735-2561-1-git-send-email-jani.nikula@intel.com> <1397039735-2561-2-git-send-email-jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by gabe.freedesktop.org (Postfix) with ESMTP id D71D06E0A9 for ; Wed, 9 Apr 2014 06:45:29 -0700 (PDT) Received: by mail-ee0-f51.google.com with SMTP id c13so1907507eek.38 for ; Wed, 09 Apr 2014 06:45:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1397039735-2561-2-git-send-email-jani.nikula@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jani Nikula Cc: aaron.lu@intel.com, intel-gfx@lists.freedesktop.org, kent.baxley@canonical.com, stable@vger.kernel.org, EGriffith92@gmail.com List-Id: intel-gfx@lists.freedesktop.org On Wed, Apr 09, 2014 at 01:35:35PM +0300, Jani Nikula wrote: > Some machines use an external EC for controlling the backlight. Info > about this is present in the VBT. Do not setup native backlight control > if no PWM backlight is available or supported according to VBT. The > acpi_backlight interface appears to work for the EC control. > > In most cases there has been no harm done, but it looks like there are > machines out there that have both an EC and our PWM line connected to > the same wire. This, obviously, does not end well. > > This should fix the regression caused by > commit bc0bb9fd1c7810407ab810d204bbaecb255fddde > Author: Jani Nikula > Date: Thu Nov 14 12:14:29 2013 +0200 > > drm/i915: remove QUIRK_NO_PCH_PWM_ENABLE > > AFAICT the quirk removed by the above commit effectively resulted in > i915 not driving the backlight PWM output, thus not messing things up. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76276 > Reference: https://bugzilla.kernel.org/show_bug.cgi?id=47941 > CC: Aaron Lu > CC: Kamal Mostafa > CC: Eric Griffith > CC: Kent Baxley > CC: stable@vger.kernel.org [v3.14+] Imo this part is a bit frisky - if we get positive testing on the xps13 machines I'd shovel this into 3.15-fixes and then resurrect the old hack for stable kernels. Imo this is risky enough that we should attempt to backport it before 3.15 is actually released. -Daniel > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/intel_panel.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c > index cb058408c70e..0eead16aeda7 100644 > --- a/drivers/gpu/drm/i915/intel_panel.c > +++ b/drivers/gpu/drm/i915/intel_panel.c > @@ -1065,6 +1065,11 @@ int intel_panel_setup_backlight(struct drm_connector *connector) > unsigned long flags; > int ret; > > + if (!dev_priv->vbt.backlight.present) { > + DRM_DEBUG_KMS("native backlight control not available per VBT\n"); > + return 0; > + } > + > /* set level and max in panel struct */ > spin_lock_irqsave(&dev_priv->backlight_lock, flags); > ret = dev_priv->display.setup_backlight(intel_connector); > -- > 1.7.9.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch