From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 4/4] drm/i915: switch off backlight for backlight class 0 brightness Date: Mon, 25 Aug 2014 23:24:55 +0200 Message-ID: <20140825212455.GR15520@phenom.ffwll.local> References: <53F3D812.1050800@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 95F1C6E3B0 for ; Mon, 25 Aug 2014 14:24:33 -0700 (PDT) Received: by mail-wg0-f46.google.com with SMTP id m15so13658988wgh.5 for ; Mon, 25 Aug 2014 14:24:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <53F3D812.1050800@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Clint Taylor Cc: Jani Nikula , intel-gfx@lists.freedesktop.org, kevin.strasser@intel.com, jesse.barnes@intel.com, rodrigo.vivi@intel.com List-Id: intel-gfx@lists.freedesktop.org On Tue, Aug 19, 2014 at 04:04:50PM -0700, Clint Taylor wrote: > On 08/12/2014 07:11 AM, Jani Nikula wrote: > >Make backlight class sysfs brightness 0 value switch off the backlight > >for connectors that have the backlight_power callback defined. For eDP, > >this has the similar caveats regarding power savings as bl_power as only > >the power sequencer backlight control is switched off. > > > >Signed-off-by: Jani Nikula > >--- > > drivers/gpu/drm/i915/intel_panel.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c > >index c365f2a57c75..574690afadb3 100644 > >--- a/drivers/gpu/drm/i915/intel_panel.c > >+++ b/drivers/gpu/drm/i915/intel_panel.c > >@@ -986,7 +986,8 @@ static int intel_backlight_device_update_status(struct backlight_device *bd) > > */ > > if (panel->backlight.enabled) { > > if (panel->backlight_power) { > >- bool enable = bd->props.power == FB_BLANK_UNBLANK; > >+ bool enable = bd->props.power == FB_BLANK_UNBLANK && > >+ bd->props.brightness != 0; > > panel->backlight_power(connector, enable); > > } > > } else { > > > Didn't get a chance to test this on nightly. > > Reviewed_by: Clinton Taylor All 4 patches merged, thanks. Aside: I really liked that your review here didn't just amount to an r-b tag, but had some comments and questions - that gives my a nice warm&fuzzy feeling that a real review has actually been done and not just some patch rubber stamping. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch