All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
To: Martin Peres <martin.peres-GANU6spQydw@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	nouveau
	<Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org"
	<lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
	Guenter Roeck
	<guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
Subject: Re: [lm-sensors] hwmon API update
Date: Thu, 03 Mar 2011 21:48:15 +0100	[thread overview]
Message-ID: <1299185295.2255.13.camel@workstation> (raw)
In-Reply-To: <4D6FCFF2.7040604-GANU6spQydw@public.gmane.org>

Am Donnerstag, den 03.03.2011, 18:29 +0100 schrieb Martin Peres:
> Le 03/03/2011 16:22, Guenter Roeck a écrit :
> > On Thu, Mar 03, 2011 at 04:36:09AM -0500, Dave Airlie wrote:
> >> On Mon, Feb 14, 2011 at 8:08 AM, Jean Delvare<khali@linux-fr.org>  wrote:
> >>> On Sun, 13 Feb 2011 09:16:40 -0800, Guenter Roeck wrote:
> >>>> On Sun, Feb 13, 2011 at 07:18:44AM -0500, Martin Peres wrote:
> >>>>> Hi,
> >>>>>
> >>>>> I am working on power management on the nouveau driver and I need a way
> >>>>> to get data out of and send commands to the i2c drivers from the kernel
> >>>>> space.
> >> Martin,
> >>
> >> you probably should have cc'ed Matthew since it was his patch you based this on,
> >> and I think he can provide a good explaination.
> >>
> >> to clarify some points,
> >>
> >> radeon does probably want something exactly like this, we just haven't gotten to
> >> it completely yet, I'd rather not have two drivers in the kernel for
> >> exact same hardware,
> >> and I believe sharing the hwmon code to do what we want is a good plan since you
> >> don't go around reinventing wheels, but if hwmon/i2c maintainers have
> >> no interest
> >> it leaves with little choice but to implement about 5-10 i2c drivers
> >> again in drm codebase.
> >>
> >> Maybe hwmon/i2c maintainers could suggest a cleaner way to implement
> >> what we want,
> >> which I think I can summarize as
> >>
> >> a) access to monitored values in-kernel
> >> b) no userspace access to the same values except via sanitised via the driver.
> >>
> > This is not a matter of "no interest". Interest is there, but if one demands
> > too much one may get nothing.
> >
> > Request for b) so far was "no userspace access", period. This is unacceptable
> > since providing userspace access to monitored values is the whole point of hwmon.

And that is what we want to do. But it would be nice if the graphics
drivers could provide a _single_ interface to userspace. Not all boards
have i2c hardware monitoring chips and with a single interface we could
fall back to the internal gpu sensor, transparently for the user.

> >
> > I could imagine an API that covers both a) and b), as long as b) focuses
> > on the "sanitize" aspect and doesn't try to limit userspace access to attributes.
> >
> > Guenter
> b) was introduced by Dave, I never asked for it because I don't mind 
> duplicating sensor data (one hwmon device named nouveau and one for the 
> raw access to the i2c chip).

Sorry for the confusion Martin, I brought up the point of limiting
userspace access and did not cc the nouveau mailing list. I think it is
bad behaviour to expose values to userspace which are totally off the
real values. This confuses users and should be avoided, especially since
we can provide sanitized values.

Why should we push the logic and api for sanitizing the values to many
hwmon drivers if we could easily do this at a single point in the
graphics driver, if we provide the userspace interface ourself and use
the hwmon driver only to instrument the monitoring chip?

> My only wish was to provide a simple way for users to read/change their 
> fan speed and get the GPU temperature no matter if their card have an 
> i2c controller or not.
> I do agree that sanitizing could be of interest, I especially think 
> about tweaking the temperature value with parameters stored inside the 
> vbios.
> 
> I am fully open to suggestions as long as it involves sharing the code 
> in one way or another.
> 
> Martin
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
> 


_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

WARNING: multiple messages have this Message-ID (diff)
From: Lucas Stach <dev@lynxeye.de>
To: Martin Peres <martin.peres-GANU6spQydw@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	nouveau
	<Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org"
	<lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
	Guenter Roeck
	<guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
Subject: Re: [lm-sensors] [Nouveau]  hwmon API update
Date: Thu, 03 Mar 2011 20:48:15 +0000	[thread overview]
Message-ID: <1299185295.2255.13.camel@workstation> (raw)
In-Reply-To: <4D6FCFF2.7040604-GANU6spQydw@public.gmane.org>

Am Donnerstag, den 03.03.2011, 18:29 +0100 schrieb Martin Peres:
> Le 03/03/2011 16:22, Guenter Roeck a écrit :
> > On Thu, Mar 03, 2011 at 04:36:09AM -0500, Dave Airlie wrote:
> >> On Mon, Feb 14, 2011 at 8:08 AM, Jean Delvare<khali@linux-fr.org>  wrote:
> >>> On Sun, 13 Feb 2011 09:16:40 -0800, Guenter Roeck wrote:
> >>>> On Sun, Feb 13, 2011 at 07:18:44AM -0500, Martin Peres wrote:
> >>>>> Hi,
> >>>>>
> >>>>> I am working on power management on the nouveau driver and I need a way
> >>>>> to get data out of and send commands to the i2c drivers from the kernel
> >>>>> space.
> >> Martin,
> >>
> >> you probably should have cc'ed Matthew since it was his patch you based this on,
> >> and I think he can provide a good explaination.
> >>
> >> to clarify some points,
> >>
> >> radeon does probably want something exactly like this, we just haven't gotten to
> >> it completely yet, I'd rather not have two drivers in the kernel for
> >> exact same hardware,
> >> and I believe sharing the hwmon code to do what we want is a good plan since you
> >> don't go around reinventing wheels, but if hwmon/i2c maintainers have
> >> no interest
> >> it leaves with little choice but to implement about 5-10 i2c drivers
> >> again in drm codebase.
> >>
> >> Maybe hwmon/i2c maintainers could suggest a cleaner way to implement
> >> what we want,
> >> which I think I can summarize as
> >>
> >> a) access to monitored values in-kernel
> >> b) no userspace access to the same values except via sanitised via the driver.
> >>
> > This is not a matter of "no interest". Interest is there, but if one demands
> > too much one may get nothing.
> >
> > Request for b) so far was "no userspace access", period. This is unacceptable
> > since providing userspace access to monitored values is the whole point of hwmon.

And that is what we want to do. But it would be nice if the graphics
drivers could provide a _single_ interface to userspace. Not all boards
have i2c hardware monitoring chips and with a single interface we could
fall back to the internal gpu sensor, transparently for the user.

> >
> > I could imagine an API that covers both a) and b), as long as b) focuses
> > on the "sanitize" aspect and doesn't try to limit userspace access to attributes.
> >
> > Guenter
> b) was introduced by Dave, I never asked for it because I don't mind 
> duplicating sensor data (one hwmon device named nouveau and one for the 
> raw access to the i2c chip).

Sorry for the confusion Martin, I brought up the point of limiting
userspace access and did not cc the nouveau mailing list. I think it is
bad behaviour to expose values to userspace which are totally off the
real values. This confuses users and should be avoided, especially since
we can provide sanitized values.

Why should we push the logic and api for sanitizing the values to many
hwmon drivers if we could easily do this at a single point in the
graphics driver, if we provide the userspace interface ourself and use
the hwmon driver only to instrument the monitoring chip?

> My only wish was to provide a simple way for users to read/change their 
> fan speed and get the GPU temperature no matter if their card have an 
> i2c controller or not.
> I do agree that sanitizing could be of interest, I especially think 
> about tweaking the temperature value with parameters stored inside the 
> vbios.
> 
> I am fully open to suggestions as long as it involves sharing the code 
> in one way or another.
> 
> Martin
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
> 



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2011-03-03 20:48 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13 12:18 hwmon API update Martin Peres
2011-02-13 12:18 ` [lm-sensors] " Martin Peres
2011-02-13 17:16 ` Guenter Roeck
2011-02-13 17:16   ` [lm-sensors] " Guenter Roeck
2011-02-13 20:00   ` Martin Peres
2011-02-13 20:00     ` [lm-sensors] " Martin Peres
2011-02-13 22:08   ` Jean Delvare
2011-02-13 22:08     ` [lm-sensors] " Jean Delvare
     [not found]     ` <20110213230833.0ee2ff16-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-03-03  9:36       ` Dave Airlie
2011-03-03  9:36         ` [lm-sensors] [Nouveau] " Dave Airlie
     [not found]         ` <AANLkTindG=m4FhNS202MH8YVBUCoDEADTQLxo-Bf_8qx-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-03 13:09           ` [lm-sensors] " Martin Peres
2011-03-03 13:09             ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-03 15:22         ` Guenter Roeck
2011-03-03 15:22           ` [lm-sensors] " Guenter Roeck
     [not found]           ` <20110303152216.GA21667-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-03-03 17:29             ` [lm-sensors] " Martin Peres
2011-03-03 17:29               ` [lm-sensors] [Nouveau] " Martin Peres
     [not found]               ` <4D6FCFF2.7040604-GANU6spQydw@public.gmane.org>
2011-03-03 20:48                 ` Lucas Stach [this message]
2011-03-03 20:48                   ` Lucas Stach
2011-03-03 21:19                   ` Guenter Roeck
2011-03-03 21:19                     ` [lm-sensors] " Guenter Roeck
2011-03-03 21:56                     ` [lm-sensors] " Lucas Stach
2011-03-03 21:56                       ` [lm-sensors] [Nouveau] " Lucas Stach
2011-03-03 22:03                       ` [lm-sensors] " Guenter Roeck
2011-03-03 22:03                         ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 23:53                         ` [lm-sensors] " Martin Peres
2011-03-03 23:53                           ` [lm-sensors] [Nouveau] " Martin Peres
     [not found]                           ` <4D7029E8.4040706-GANU6spQydw@public.gmane.org>
2011-03-04  0:59                             ` [lm-sensors] " Guenter Roeck
2011-03-04  0:59                               ` [lm-sensors] [Nouveau] " Guenter Roeck
     [not found]                               ` <20110304005900.GB31318-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-03-04  8:36                                 ` [lm-sensors] " Martin Peres
2011-03-04  8:36                                   ` [lm-sensors] [Nouveau] " Martin Peres
2011-02-14 16:23 ` [lm-sensors] " Matthew Garrett
2011-02-14 18:19 ` Guenter Roeck
2011-02-14 18:22 ` Matthew Garrett
2011-02-14 19:01 ` Guenter Roeck
2011-02-14 19:05 ` Matthew Garrett
2011-02-14 19:33 ` Guenter Roeck
2011-02-14 19:40 ` Matthew Garrett
2011-02-14 21:25 ` Guenter Roeck
2011-02-14 21:29 ` Matthew Garrett
2011-02-15 21:50 ` Jean Delvare
2011-02-15 22:07 ` Jean Delvare
2011-02-15 22:23 ` Guenter Roeck
2011-02-28 17:50 ` Lucas Stach
2011-02-28 18:42 ` Guenter Roeck
2011-02-28 23:24 ` Lucas Stach
2011-10-10 22:29 ` Kristen Eisenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299185295.2255.13.camel@workstation \
    --to=dev-8ppwabl0hbeelga04laivw@public.gmane.org \
    --cc=Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=martin.peres-GANU6spQydw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.