Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-08-28 Thread Hans de Goede
Hi, On 8/25/22 23:40, Yusuf Khan wrote: > Perhaps the Kconfig modifications could be postponed to stage 2 > since for people running distros that suddenly decide to disable > /sys/class/backlight/ it may be impractical for them to recompile > their kernels and such. In step 1, the Kconfig option

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-08-26 Thread Yusuf Khan
Perhaps the Kconfig modifications could be postponed to stage 2 since for people running distros that suddenly decide to disable /sys/class/backlight/ it may be impractical for them to recompile their kernels and such. Also stage 2 should probably take ~2 decades until it comes into being, for

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-08-25 Thread Hans de Goede
Hi Yusuf, On 8/24/22 04:18, Yusuf Khan wrote: > Sorry for the necro-bump, I hadnt seen this go by No problem. > My main concern with this proposal is the phasing out of > /sys/class/backlight/. > Currently on the user(user, not userland) level its easier for me to just > modify > the file and

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-08-24 Thread Yusuf Khan
Sorry for the necro-bump, I hadnt seen this go by My main concern with this proposal is the phasing out of /sys/class/backlight/. Currently on the user(user, not userland) level its easier for me to just modify the file and be done with it. xbacklight doesnt tell me when its failed, brightnessctl

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-05-31 Thread Hans de Goede
Hi, On 5/18/22 16:23, Jani Nikula wrote: > On Wed, 18 May 2022, Hans de Goede wrote: >> So how about: display_brightness or panel_brightness ? > > This is a prime opportunity to look at all the existing properties, and > come up with a new combination of capitalization, spacing, hyphens, >

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-05-18 Thread Ville Syrjälä
On Wed, May 18, 2022 at 02:59:58PM +0200, Hans de Goede wrote: > Hi, > > On 4/14/22 15:10, Jani Nikula wrote: > > There are some cases where we can actually get a rough PWM/luminance > > curve from i915 opregion. I think maybe 16 data points. We've never > > exposed that. My idea was that you'd

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-05-18 Thread Jani Nikula
On Wed, 18 May 2022, Hans de Goede wrote: > So how about: display_brightness or panel_brightness ? This is a prime opportunity to look at all the existing properties, and come up with a new combination of capitalization, spacing, hyphens, underscores, etc. to accompany the total lack of

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-05-18 Thread Hans de Goede
Hi, On 4/14/22 15:10, Jani Nikula wrote: > On Thu, 07 Apr 2022, Hans de Goede wrote: >> As discussed already several times in the past: >> https://www.x.org/wiki/Events/XDC2014/XDC2014GoedeBacklight/ >> >> https://lore.kernel.org/all/4b17ba08-39f3-57dd-5aad-d37d844b0...@linux.intel.com/ >> >>

RE: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-29 Thread Lattannavar, Sameer
; Alex Deucher ; Yusuf Khan Subject: Re: [RFC] drm/kms: control display brightness through drm_connector properties On Fri, 29 Apr 2022 08:59:24 + Simon Ser wrote: > On Friday, April 29th, 2022 at 10:55, Hans de Goede > wrote: > > > I believe that we can fix the new inte

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-29 Thread Pekka Paalanen
On Fri, 29 Apr 2022 08:59:24 + Simon Ser wrote: > On Friday, April 29th, 2022 at 10:55, Hans de Goede > wrote: > > > I believe that we can fix the new interface, the plan is for there > > to be some helper code to proxy the new connector properties to what > > is still a good old

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-29 Thread Simon Ser
On Friday, April 29th, 2022 at 10:55, Hans de Goede wrote: > I believe that we can fix the new interface, the plan is for there > to be some helper code to proxy the new connector properties to what > is still a good old backlight-device internally in the kernel,. > > This proxy-ing code could

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-29 Thread Hans de Goede
Hi, On 4/27/22 16:26, Daniel Vetter wrote: > On Wed, Apr 27, 2022 at 05:23:22PM +0300, Jani Nikula wrote: >> On Wed, 27 Apr 2022, Daniel Vetter wrote: >>> On Thu, Apr 14, 2022 at 01:24:30PM +0300, Jani Nikula wrote: On Mon, 11 Apr 2022, Alex Deucher wrote: > On Mon, Apr 11, 2022 at

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-27 Thread Daniel Vetter
On Wed, Apr 27, 2022 at 05:23:22PM +0300, Jani Nikula wrote: > On Wed, 27 Apr 2022, Daniel Vetter wrote: > > On Thu, Apr 14, 2022 at 01:24:30PM +0300, Jani Nikula wrote: > >> On Mon, 11 Apr 2022, Alex Deucher wrote: > >> > On Mon, Apr 11, 2022 at 6:18 AM Hans de Goede > >> > wrote: > >> >> >

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-27 Thread Jani Nikula
On Wed, 27 Apr 2022, Daniel Vetter wrote: > On Thu, Apr 14, 2022 at 01:24:30PM +0300, Jani Nikula wrote: >> On Mon, 11 Apr 2022, Alex Deucher wrote: >> > On Mon, Apr 11, 2022 at 6:18 AM Hans de Goede wrote: >> >> >> >> Hi, >> >> >> >> On 4/8/22 17:11, Alex Deucher wrote: >> >> > On Fri, Apr 8,

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-27 Thread Daniel Vetter
On Thu, Apr 14, 2022 at 01:24:30PM +0300, Jani Nikula wrote: > On Mon, 11 Apr 2022, Alex Deucher wrote: > > On Mon, Apr 11, 2022 at 6:18 AM Hans de Goede wrote: > >> > >> Hi, > >> > >> On 4/8/22 17:11, Alex Deucher wrote: > >> > On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede > >> > wrote: > >>

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-14 Thread Jani Nikula
On Thu, 07 Apr 2022, Hans de Goede wrote: > As discussed already several times in the past: > https://www.x.org/wiki/Events/XDC2014/XDC2014GoedeBacklight/ > > https://lore.kernel.org/all/4b17ba08-39f3-57dd-5aad-d37d844b0...@linux.intel.com/ > > The current userspace API for brightness control

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-14 Thread Jani Nikula
On Mon, 11 Apr 2022, Alex Deucher wrote: > On Mon, Apr 11, 2022 at 6:18 AM Hans de Goede wrote: >> >> Hi, >> >> On 4/8/22 17:11, Alex Deucher wrote: >> > On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede wrote: >> >> >> >> Hi, >> >> >> >> On 4/8/22 16:08, Alex Deucher wrote: >> >>> On Fri, Apr 8,

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-13 Thread Hans de Goede
Hi, On 4/13/22 10:32, Daniel Vetter wrote: > On Fri, Apr 08, 2022 at 12:26:24PM +0200, Hans de Goede wrote: >> Hi, >> >> On 4/8/22 12:16, Simon Ser wrote: >>> Would it be an option to only support the KMS prop for Good devices, >>> and continue using the suboptimal existing sysfs API for Bad

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-13 Thread Simon Ser
On Wednesday, April 13th, 2022 at 10:32, Daniel Vetter wrote: > Inflicting hotplug complications on all userspace (including uevent > handling for this hotpluggable backlight and everything) just because > fixing the old crap systems is work is imo really not a good idea. Much > better if we get

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-13 Thread Daniel Vetter
On Fri, Apr 08, 2022 at 12:26:24PM +0200, Hans de Goede wrote: > Hi, > > On 4/8/22 12:16, Simon Ser wrote: > > Would it be an option to only support the KMS prop for Good devices, > > and continue using the suboptimal existing sysfs API for Bad devices? > > > > (I'm just throwing ideas around to

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-12 Thread Mikhail Gusarov
On 11 Apr 2022, at 13:50, Hans de Goede wrote: > The problem is we already lack the manpower for a quirk database, > and even if we ever get the manpower then it would still be good > to avoid the work necessary to add models to the database where > the kernel already knows how things work, see

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Alex Deucher
On Mon, Apr 11, 2022 at 6:18 AM Hans de Goede wrote: > > Hi, > > On 4/8/22 17:11, Alex Deucher wrote: > > On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede wrote: > >> > >> Hi, > >> > >> On 4/8/22 16:08, Alex Deucher wrote: > >>> On Fri, Apr 8, 2022 at 4:07 AM Daniel Vetter wrote: > > On

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Hans de Goede
Hi Pekka, On 4/11/22 13:34, Pekka Paalanen wrote: > On Mon, 11 Apr 2022 12:18:30 +0200 > Hans de Goede wrote: > >> Hi, >> >> On 4/8/22 17:11, Alex Deucher wrote: >>> On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede wrote: > > ... > >>> So set it to a level we can guarantee can call it 0.

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Pekka Paalanen
On Mon, 11 Apr 2022 12:18:30 +0200 Hans de Goede wrote: > Hi, > > On 4/8/22 17:11, Alex Deucher wrote: > > On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede wrote: > >> ... > > So set it to a level we can guarantee can call it 0. If we have the > > flag we are just punting on the problem in

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Carsten Haitzler
On Mon, 11 Apr 2022 12:27:37 +0200 Hans de Goede said: > Hi, > > On 4/7/22 20:58, Carsten Haitzler wrote: > > On Thu, 7 Apr 2022 17:38:59 +0200 Hans de Goede said: > > > > Below you covered our usual /sys/class/backlight device friends... what > > about DDC monitor controls? These function

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Hans de Goede
Hi Simon, On 4/8/22 10:22, Simon Ser wrote: > Hi Hans, > > Thanks for your details replies! > > On Thursday, April 7th, 2022 at 19:43, Hans de Goede > wrote: > >>> On Thursday, April 7th, 2022 at 17:38, Hans de Goede >>> wrote: >>> The drm_connector brightness properties

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Hans de Goede
Hi, On 4/7/22 20:58, Carsten Haitzler wrote: > On Thu, 7 Apr 2022 17:38:59 +0200 Hans de Goede said: > > Below you covered our usual /sys/class/backlight device friends... what about > DDC monitor controls? These function similarly but just remotely control a > screen via I2C and also suffer

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-11 Thread Hans de Goede
Hi, On 4/8/22 17:11, Alex Deucher wrote: > On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede wrote: >> >> Hi, >> >> On 4/8/22 16:08, Alex Deucher wrote: >>> On Fri, Apr 8, 2022 at 4:07 AM Daniel Vetter wrote: On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: > On Thu, Apr

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Alex Deucher
On Fri, Apr 8, 2022 at 10:56 AM Hans de Goede wrote: > > Hi, > > On 4/8/22 16:08, Alex Deucher wrote: > > On Fri, Apr 8, 2022 at 4:07 AM Daniel Vetter wrote: > >> > >> On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: > >>> On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: >

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Hans de Goede
Hi Simon, On 4/8/22 10:22, Simon Ser wrote: > Hi Hans, > > Thanks for your details replies! > > On Thursday, April 7th, 2022 at 19:43, Hans de Goede > wrote: > >>> On Thursday, April 7th, 2022 at 17:38, Hans de Goede >>> wrote: >>> The drm_connector brightness properties

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Hans de Goede
Hi, On 4/8/22 16:08, Alex Deucher wrote: > On Fri, Apr 8, 2022 at 4:07 AM Daniel Vetter wrote: >> >> On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: >>> On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: Hi Simon, On 4/7/22 18:51, Simon Ser wrote: > Very

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Alex Deucher
On Fri, Apr 8, 2022 at 4:07 AM Daniel Vetter wrote: > > On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: > > On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: > > > > > > Hi Simon, > > > > > > On 4/7/22 18:51, Simon Ser wrote: > > > > Very nice plan! Big +1 for the overall

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Hans de Goede
Hi, On 4/8/22 12:16, Simon Ser wrote: > Would it be an option to only support the KMS prop for Good devices, > and continue using the suboptimal existing sysfs API for Bad devices? > > (I'm just throwing ideas around to see what sticks, feel free to ignore.) Currently suid-root or pkexec

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Hans de Goede
Hi, On 4/8/22 11:58, Hans de Goede wrote: > Hi Daniel, > > On 4/8/22 10:07, Daniel Vetter wrote: >> On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: >>> On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: Hi Simon, On 4/7/22 18:51, Simon Ser wrote: > Very

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Simon Ser
Would it be an option to only support the KMS prop for Good devices, and continue using the suboptimal existing sysfs API for Bad devices? (I'm just throwing ideas around to see what sticks, feel free to ignore.)

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Hans de Goede
Hi, On 4/8/22 11:58, Hans de Goede wrote: > Hi Daniel, > > On 4/8/22 10:07, Daniel Vetter wrote: >> On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: >>> On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: Hi Simon, On 4/7/22 18:51, Simon Ser wrote: > Very

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Hans de Goede
Hi Daniel, On 4/8/22 10:07, Daniel Vetter wrote: > On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: >> On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: >>> >>> Hi Simon, >>> >>> On 4/7/22 18:51, Simon Ser wrote: Very nice plan! Big +1 for the overall approach. >>> >>>

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Simon Ser
Hi Hans, Thanks for your details replies! On Thursday, April 7th, 2022 at 19:43, Hans de Goede wrote: > > On Thursday, April 7th, 2022 at 17:38, Hans de Goede > > wrote: > > > >> The drm_connector brightness properties > >> === > >> > >> bl_brightness: rw

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-08 Thread Daniel Vetter
On Thu, Apr 07, 2022 at 05:05:52PM -0400, Alex Deucher wrote: > On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: > > > > Hi Simon, > > > > On 4/7/22 18:51, Simon Ser wrote: > > > Very nice plan! Big +1 for the overall approach. > > > > Thanks. > > > > > On Thursday, April 7th, 2022 at 17:38,

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-07 Thread Alex Deucher
On Thu, Apr 7, 2022 at 1:43 PM Hans de Goede wrote: > > Hi Simon, > > On 4/7/22 18:51, Simon Ser wrote: > > Very nice plan! Big +1 for the overall approach. > > Thanks. > > > On Thursday, April 7th, 2022 at 17:38, Hans de Goede > > wrote: > > > >> The drm_connector brightness properties > >>

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-07 Thread Carsten Haitzler
On Thu, 7 Apr 2022 17:38:59 +0200 Hans de Goede said: Below you covered our usual /sys/class/backlight device friends... what about DDC monitor controls? These function similarly but just remotely control a screen via I2C and also suffer from the same problems of "need root" and "have to do some

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-07 Thread Hans de Goede
Hi Simon, On 4/7/22 18:51, Simon Ser wrote: > Very nice plan! Big +1 for the overall approach. Thanks. > On Thursday, April 7th, 2022 at 17:38, Hans de Goede > wrote: > >> The drm_connector brightness properties >> === >> >> bl_brightness: rw 0-int32_max

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-04-07 Thread Simon Ser
Very nice plan! Big +1 for the overall approach. On Thursday, April 7th, 2022 at 17:38, Hans de Goede wrote: > The drm_connector brightness properties > === > > bl_brightness: rw 0-int32_max property controlling the brightness setting > of the connected

[RFC] drm/kms: control display brightness through drm_connector properties

2022-04-07 Thread Hans de Goede
As discussed already several times in the past: https://www.x.org/wiki/Events/XDC2014/XDC2014GoedeBacklight/ https://lore.kernel.org/all/4b17ba08-39f3-57dd-5aad-d37d844b0...@linux.intel.com/ The current userspace API for brightness control offered by /sys/class/backlight devices has various