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 Tue, 2008-12-30 at 18:34 +0800, Richard Purdie wrote:
> On Wed, 2008-12-24 at 11:07 +0800, Zhang Rui wrote:
> > bd->props.brightness is a cached value.
> > the current code has some potential problems when poking the
> > backlight I/F.
> > 
> > For example,
> > 1. set the brightness level to 5 via sysfs I/F
> > 2. set the backlight to another level via the procfs,
> > 3. setting it back to 5 doesn't work because bd->props.brightness
> > is still 5.
> > 
> > http://bugzilla.kernel.org/show_bug.cgi?id=12249
> 
> The root of the problem here is that there are two interfaces
> controlling the same piece of hardware.
then how about this case:
1. set the brightness level to 5 via sysfs I/F
2. set the backlight to another level via HOTKEYS.
3. setting it back to 5 doesn't work because bd->props.brightness
is still 5.

> Personally, I'd like to see the
> proc interfaces to backlights depreacated but we do need to make them
> work I guess. The real bug looks like the proc interface should update
> props.brightness for that hardware...
IMO, the real problem is that bd->props.brightness doesn't reflect the
actual brightness.
If we can make sure that bd->props.brightness is always updated when
the brightness is change, we won't have this problem any more.
But I'm afraid we can't, because backlight can be changed in other ways,
either via procfs or hotkeys.
Of course we can fix these two problems in the ACPI video driver, but I
think this patch is safer. because we don't know if there is any other
case besides procfs and hotkey that is not covered.

thanks,
rui

--
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