lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131023090925.GC11954@ulmo.nvidia.com>
Date:	Wed, 23 Oct 2013 11:09:26 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Mark Zhang <nvmarkzhang@...il.com>
Cc:	rpurdie@...ys.net, jg1.han@...sung.com,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
	tomi.valkeinen@...com, linux-pwm@...r.kernel.org,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: How to set fops in "struct platform_pwm_backlight_data"?

On Wed, Oct 23, 2013 at 04:49:29PM +0800, Mark Zhang wrote:
> On 10/23/2013 04:00 PM, Thierry Reding wrote:
> > On Wed, Oct 23, 2013 at 10:16:24AM +0800, Mark Zhang wrote:
> >> On 10/22/2013 08:49 PM, Thierry Reding wrote:
> >>> On Tue, Oct 22, 2013 at 04:55:09PM +0800, Mark Zhang wrote:
> >>>> On 10/22/2013 03:24 PM, Thierry Reding wrote:
> >>>>> On Fri, Oct 18, 2013 at 12:48:12PM +0800, Mark Zhang wrote:
> >>>> [...]
> >>>>>>>
> >>>>>>
> >>>>>> Okay, I just want to set the "notify" function pointer in "struct
> >>>>>> platform_pwm_backlight_data", because I want to tune the brightness
> >>>>>> value before the pwm-bl sets the brightness to hardware. I don't know
> >>>>>> how to do that, unless we define the platform data explicitly.
> >>>>>
> >>>>> Okay, my question should have been what you need the functions for and
> >>>>> why you think you need them.
> >>>>>
> >>>>
> >>>> If I understanding you correctly, I suppose I've said that: "because I
> >>>> want to tune the brightness value before the pwm-bl sets the brightness
> >>>> to hardware".
> >>>
> >>> Why do you want to tune the brightness value? What are you trying to
> >>> achieve?
> >>>
> >>
> >> Oh, Tegra has a feature named PRISM(aka SmartDimmer). It changes the
> >> color value to make the display looks bright so that we can reduce the
> >> backlight brightness to save power. So everytime PRISM is triggered, we
> >> call "backlight_update_status", then in the "notify" callback, we change
> >> the brightness value which pwm-bl provides by considering the PRISM
> >> compensations.
> > 
> > If you automatically call backlight_update_status() everytime PRISM
> > gives you new data, can't you just pass the correct value in in the
> > first place so that you don't have to tweak it in the .notify()
> > callback?
> 
> OK, how to do that? -- "pass the correct value in in the first place"?

Well, if you call backlight_update_status(), then you can pass in a
brightness value, right? You usually do that by setting the backlight's
props.brightness field.

So when PRISM gives you new data, you could just read out the current
brightness, compute the new one based on the current one and the PRISM
data, set the props.brightness field to that value and then call
backlight_update_status().

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ