Re: [PATCH 1/2] video: always update the brightness when poking "brightness"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 31, 2008 at 10:58:48AM +0800, Zhang Rui wrote:
> On Wed, 2008-12-31 at 10:01 +0800, Matthew Garrett wrote:
> > If you want the actual brightness, why aren't you reading 
> > actual_brightness?
> > 
> right, that's the problem.
> because IMO, we don't need the actual_brightness any more. :)
> And if you agree that bd->props.brightness doesn't reflect the actual
> brightness, we can see that

Brightness and actual_brightness have different semantics, and 
maintaining that difference is worthwhile.

>                         if (bd->props.brightness != brightness) {
>                                 bd->props.brightness = brightness;
>                                 backlight_update_status(bd);
>                         }
> doesn't make sense because "bd->props.brightness != brightness" doesn't
> mean anything.

I agree that this doesn't seem like a meaningful check. For setups where 
brightness change is an expensive operation, this could be done in the 
driver rather than the core?

> But if bd->props.brightness does reflect the actual brightness, then do
> we need "actual_brightness" any more?

I think maintaining "brightness" as "user requested brightness" is 
sensible, for situations like Richard described. 

Patch looks good to me.
-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux