From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754807AbcIJIUn (ORCPT ); Sat, 10 Sep 2016 04:20:43 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36846 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbcIJIUj (ORCPT ); Sat, 10 Sep 2016 04:20:39 -0400 MIME-Version: 1.0 In-Reply-To: <3188F52F-1372-4D59-B790-C15E584A44F2@goldelico.com> References: <954d43b570092fe92b8b49cf8f475c027d3d8342.1473066997.git.hns@goldelico.com> <20160910031736.xwnepaoifpedqfbr@squirrel.local> <3188F52F-1372-4D59-B790-C15E584A44F2@goldelico.com> From: Matthijs van Duin Date: Sat, 10 Sep 2016 10:20:16 +0200 Message-ID: Subject: Re: [PATCH] ARM: dts: omap3-gta04: reduce panel backlight PWM frequency to 83Hz To: "H. Nikolaus Schaller" Cc: David Rivshin , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Mark Rutland , Russell King , Marek Belisko , "linux-omap@vger.kernel.org" , devicetree , lkml , Discussions about the Letux Kernel , Neil Armstrong Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10 September 2016 at 09:08, H. Nikolaus Schaller wrote: > Reducing the PWM frequency is good by itself since it should not be unnecessarily > fast and helps to make the PWM to "average current" translation more linear. > > The non-linear effect is that the PWM controlled DC/DC converter reacts almost > immediately to a 1->0 control transition but needs some time (ca. 0.5ms) to recover > on a 0->1 transition. DT already allows for compensation of many non-linearities by specifying the duty cycle of each brightness increment. Though, as you observed, there's one limitation it cannot fix here: > If we just fix the PWM generator to output a steady 1 signal at 100%, we have a > very significant change if we switch to 99%, depending on PWM frequency. Specifically the next-to-brightest step (assuming 0.5ms off-time) would be: 75% @ 500 Hz 90% @ 200 Hz 95% @ 100 Hz 96% @ 83 Hz Note that perceptually the distance to 100% might be smaller due to non-linear response of the eye. That's my experience with pwm controlled leds anyway, which may or may not apply to backlights (though with my laptop's backlight I never really have use for the distinct steps at the brightest end while those at the darkest end seem disproportionally large). > This effect becomes smaller if the PWM frequency is reduced and 83Hz seems more > reasonable (although still a little arbitrary) than the current value. While 500Hz is perhaps a bit high, 83Hz actually seems very low to me. Searching a bit around yielded 175 Hz as common frequency for CCFL backlights and higher for LED backlights (source: http://www.tftcentral.co.uk/articles/pulse_width_modulation.htm). (I may be reacting a bit twitchy here due to having encountered dimmed LED lighting that was flickering obnoxiously for me while noone else noticed this.) Matthijs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthijs van Duin Subject: Re: [PATCH] ARM: dts: omap3-gta04: reduce panel backlight PWM frequency to 83Hz Date: Sat, 10 Sep 2016 10:20:16 +0200 Message-ID: References: <954d43b570092fe92b8b49cf8f475c027d3d8342.1473066997.git.hns@goldelico.com> <20160910031736.xwnepaoifpedqfbr@squirrel.local> <3188F52F-1372-4D59-B790-C15E584A44F2@goldelico.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <3188F52F-1372-4D59-B790-C15E584A44F2-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "H. Nikolaus Schaller" Cc: David Rivshin , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Mark Rutland , Russell King , Marek Belisko , "linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , devicetree , lkml , Discussions about the Letux Kernel , Neil Armstrong List-Id: devicetree@vger.kernel.org On 10 September 2016 at 09:08, H. Nikolaus Schaller wrote: > Reducing the PWM frequency is good by itself since it should not be unnecessarily > fast and helps to make the PWM to "average current" translation more linear. > > The non-linear effect is that the PWM controlled DC/DC converter reacts almost > immediately to a 1->0 control transition but needs some time (ca. 0.5ms) to recover > on a 0->1 transition. DT already allows for compensation of many non-linearities by specifying the duty cycle of each brightness increment. Though, as you observed, there's one limitation it cannot fix here: > If we just fix the PWM generator to output a steady 1 signal at 100%, we have a > very significant change if we switch to 99%, depending on PWM frequency. Specifically the next-to-brightest step (assuming 0.5ms off-time) would be: 75% @ 500 Hz 90% @ 200 Hz 95% @ 100 Hz 96% @ 83 Hz Note that perceptually the distance to 100% might be smaller due to non-linear response of the eye. That's my experience with pwm controlled leds anyway, which may or may not apply to backlights (though with my laptop's backlight I never really have use for the distinct steps at the brightest end while those at the darkest end seem disproportionally large). > This effect becomes smaller if the PWM frequency is reduced and 83Hz seems more > reasonable (although still a little arbitrary) than the current value. While 500Hz is perhaps a bit high, 83Hz actually seems very low to me. Searching a bit around yielded 175 Hz as common frequency for CCFL backlights and higher for LED backlights (source: http://www.tftcentral.co.uk/articles/pulse_width_modulation.htm). (I may be reacting a bit twitchy here due to having encountered dimmed LED lighting that was flickering obnoxiously for me while noone else noticed this.) Matthijs -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html