Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-28 Thread Tobias Klausmann
Well fixing the return of wrong values in this function is reasonable by any means, of course not reading the mem in the first place would be nice, but deciding this is imho not in the scope of a temp_get function but somewhere in the code calling temp_get. On 1/26/18 3:03 PM, Karol Herbst wro

Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-28 Thread Tobias Klausmann
Not sure if i understand completely what you intend to say here, with this we prevent hwmon from reporting utterly wrong temperature values returning an error (we could return -EBUSY or somehting instead, granted), yet if the device is shadowed, getting a sane temp value out of is seems unlikel

Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-26 Thread Karol Herbst
well I just tried to say, that you are not fixing the issue you think were fixing. In your case the GPU is powered off and you get garbage values from any mmio read, so parsing those values is just wrong and we need to prevent doing anything on the hw whenever it is powered off directly in hwmon.

Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-26 Thread Karol Herbst
no, we can't do that. We actually have to prevent this from hwom. The issue here is, that the reg read returns 0x and parsing that is the first step in the first place. On Thu, Jan 25, 2018 at 7:16 PM, Tobias Klausmann wrote: > This fixes wrong temperature outputs e.g. 511°C if the card i

[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-26 Thread Tobias Klausmann
This fixes wrong temperature outputs e.g. 511°C if the card is asleep. Signed-off-by: Tobias Klausmann --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu/drm

Re: [Nouveau] [PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed

2018-01-26 Thread Rhys Kidd
On 25 January 2018 at 13:16, Tobias Klausmann < tobias.johannes.klausm...@mni.thm.de> wrote: > This fixes wrong temperature outputs e.g. 511°C if the card is asleep. > > Signed-off-by: Tobias Klausmann > LGTM, Reviewed-by: Rhys Kidd > --- > drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c