Re: Fixing the kernels backlight API

2014-02-14 Thread Hans de Goede
Hi, On 02/13/2014 09:12 PM, Matthew Garrett wrote: On Thu, Feb 13, 2014 at 08:43:10PM +0100, Hans de Goede wrote: I can understand where Dave is coming from, from a kernel pov, so this might really be easier to just solve in userspace. I don't know if you've seen my very rough sketch of how

Re: Fixing the kernels backlight API

2014-02-13 Thread Hans de Goede
Hi, On 02/12/2014 09:14 PM, Dave Airlie wrote: The biggest remaining stumbling block is the backlight API, because opening the sysfs files requires root rights. I'll very likely write a little helper for this for now, but in the long run it would be good to have a better solution. While

Re: Fixing the kernels backlight API

2014-02-13 Thread Hans de Goede
Hi, On 02/12/2014 11:26 PM, David Herrmann wrote: Hi On Wed, Feb 12, 2014 at 9:43 PM, Ville Syrjälä ville.syrj...@linux.intel.com wrote: On Thu, Feb 13, 2014 at 06:14:04AM +1000, Dave Airlie wrote: The biggest remaining stumbling block is the backlight API, because opening the sysfs

Re: Fixing the kernels backlight API

2014-02-13 Thread Hans de Goede
Hi, On 02/13/2014 07:37 AM, Alexander E. Patrakov wrote: 13.02.2014 04:26, David Herrmann wrote: The attach stuff actually sounds doable, but who decides which one to attach? You still need some user-space script during device-plug for that. But to be honest, the simplest way would be a

Re: Fixing the kernels backlight API

2014-02-13 Thread Matthew Garrett
On Thu, Feb 13, 2014 at 02:41:53PM +0100, Hans de Goede wrote: I still believe we need to do better, but maybe that better needs to be done in userspace rather then in the kernel. One option is to put it on the connector but provide some mechanism for userspace to define the relationship

Re: Fixing the kernels backlight API

2014-02-13 Thread Hans de Goede
Hi, On 02/13/2014 06:19 PM, Matthew Garrett wrote: On Thu, Feb 13, 2014 at 02:41:53PM +0100, Hans de Goede wrote: I still believe we need to do better, but maybe that better needs to be done in userspace rather then in the kernel. One option is to put it on the connector but provide some

Re: Fixing the kernels backlight API

2014-02-13 Thread Matthew Garrett
On Thu, Feb 13, 2014 at 08:43:10PM +0100, Hans de Goede wrote: I can understand where Dave is coming from, from a kernel pov, so this might really be easier to just solve in userspace. I don't know if you've seen my very rough sketch of how this could work in userspace in my other mail. The

Fixing the kernels backlight API

2014-02-12 Thread Hans de Goede
Hi All, Quick self intro: I've been a FOSS developer for 15+ years now and I've been working for Red Hat for 5 years. Recently I've moved to the graphics team. One of my first tasks in the graphics team is to make the xserver run without root rights. I'm making good progress with this, having

Re: Fixing the kernels backlight API

2014-02-12 Thread Dave Airlie
The biggest remaining stumbling block is the backlight API, because opening the sysfs files requires root rights. I'll very likely write a little helper for this for now, but in the long run it would be good to have a better solution. While discussion this in the graphics devroom at

Re: Fixing the kernels backlight API

2014-02-12 Thread Ville Syrjälä
On Thu, Feb 13, 2014 at 06:14:04AM +1000, Dave Airlie wrote: The biggest remaining stumbling block is the backlight API, because opening the sysfs files requires root rights. I'll very likely write a little helper for this for now, but in the long run it would be good to have a

Re: Fixing the kernels backlight API

2014-02-12 Thread David Herrmann
Hi On Wed, Feb 12, 2014 at 9:43 PM, Ville Syrjälä ville.syrj...@linux.intel.com wrote: On Thu, Feb 13, 2014 at 06:14:04AM +1000, Dave Airlie wrote: The biggest remaining stumbling block is the backlight API, because opening the sysfs files requires root rights. I'll very likely write a

Re: Fixing the kernels backlight API

2014-02-12 Thread Alexander E. Patrakov
13.02.2014 04:26, David Herrmann wrote: The attach stuff actually sounds doable, but who decides which one to attach? You still need some user-space script during device-plug for that. But to be honest, the simplest way would be a backlightd bus-activatable daemon. SetBacklight() then takes a