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: <20090806071353.GB21847@elf.ucw.cz>
Date:	Thu, 6 Aug 2009 09:13:54 +0200
From:	Pavel Machek <pavel@....cz>
To:	Zhang Rui <rui.zhang@...el.com>
Cc:	linux-acpi <linux-acpi@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Len Brown <lenb@...nel.org>,
	Richard Purdie <rpurdie@...ys.net>,
	Matthew Garrett <mjg59@...f.ucam.org>, Greg KH <greg@...ah.com>
Subject: Re: [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS
	devices

> > > No,
> > > For a ALS policy, user space should set a brightness level as the base
> > > point, i.e. the backlight when display adjustment is 100.
> > > and then uses the adjustment values gotten from this mappings to
> > > calculate the actual brightness level the display should be put in.
> > 
> > Ok, so just make the code return only the "adjustement" -- userspace
> > does not really need to know "illuminance" and you can do the mapping
> > in the kernel AFAICT.
> > 			
> 
> ALS exports
> 1. the current ambient light illuminance
> 2. the mappings
> 
> Backlight device exports
> 1. the brightness levels.
> 
> User space needs to:
> 1. set a brightness level as the base point
> 2. read the current ambient light illuminance from ALS device
> 3. read the ambient light illuminance to display adjustment mappings
> 4. calculate a proper brightness level we should set.
> 
> For example, if we set brightness 6 as the default brightness, i.e. the
> brightness level when ambient light illuminance is 300.
> Now we walk outdoors, and the current illuminance is 1000,
> then we should set the new_brightness_level to (6 * 150%)

Yes, so just export

ALS exports
1. the current ambient light illuminance
2. the current mapped ambient light illuminance

Backlight device exports
1. the brightness levels.
 
User space needs to:
1. set a brightness level as the base point
2. read the current mapped ambient light illuminance from ALS device
3. calculate a proper brightness level we should set.

You get

a) nicer interface
b) simpler userland
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ