From: Jeremy Cline <jcline@redhat.com>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Karol Herbst <kherbst@redhat.com>,
Jeremy Cline <jcline@redhat.com>
Subject: [PATCH v2 0/2] Add fine-grain temperature reporting
Date: Wed, 16 Sep 2020 15:47:09 -0400 [thread overview]
Message-ID: <20200916194711.999602-1-jcline@redhat.com> (raw)
In-Reply-To: <20200812204952.1921587-1-jcline@redhat.com>
Hi folks,
This series adjusts the temp_get() interface in the thermal functions to
report milli-degrees, and additionally alters the way errors are
reported. As I went through all the users and implementations I realized
that Pascal's temp_get() implementation didn't include turning negative
temperatures to 0 like other implementations, so I separated error
reporting from the temperature in the API.
Couple of things I'm on the fence about here:
* I allowed the nvkm_therm_temp_get() functions to accept NULL as a way
to check if temperature reading is available rather than adding a
separate helper, but was torn about whether this is clearer than a
separate helper function.
* I added a WARN_ON in places that previously called
nvkm_therm_temp_get() and didn't check the return value for an error.
This may not be a reasonable error handling method.
Jeremy Cline (2):
drm/nouveau: return temperatures in temp_get() via parameter
drm/nouveau: Add fine-grain temperature reporting
.../nouveau/include/nvkm/subdev/bios/therm.h | 13 +++++++++
.../drm/nouveau/include/nvkm/subdev/therm.h | 28 ++++++++++++++++++-
drivers/gpu/drm/nouveau/nouveau_hwmon.c | 12 ++++----
.../gpu/drm/nouveau/nvkm/subdev/therm/base.c | 28 +++++++++++++++----
.../gpu/drm/nouveau/nvkm/subdev/therm/g84.c | 11 ++++----
.../gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 11 ++++----
.../gpu/drm/nouveau/nvkm/subdev/therm/nv40.c | 9 ++----
.../gpu/drm/nouveau/nvkm/subdev/therm/nv50.c | 9 ++----
.../gpu/drm/nouveau/nvkm/subdev/therm/priv.h | 17 +++++++++--
.../gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 12 +++++---
10 files changed, 110 insertions(+), 40 deletions(-)
--
2.26.2
next prev parent reply other threads:[~2020-09-16 19:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 20:49 [PATCH] drm/nouveau: Add fine-grain temperature reporting Jeremy Cline
2020-08-13 12:43 ` Karol Herbst
2020-09-09 4:05 ` [Nouveau] " Ben Skeggs
2020-09-09 8:22 ` Karol Herbst
2020-09-09 14:07 ` Jeremy Cline
2020-09-10 4:23 ` Ben Skeggs
2020-09-16 19:47 ` Jeremy Cline [this message]
2020-09-16 19:47 ` [PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter Jeremy Cline
2020-09-16 20:01 ` Karol Herbst
2020-09-16 20:03 ` Karol Herbst
2020-09-17 14:11 ` Jeremy Cline
2020-09-17 14:23 ` Karol Herbst
2020-09-16 19:47 ` [PATCH v2 2/2] drm/nouveau: Add fine-grain temperature reporting Jeremy Cline
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=20200916194711.999602-1-jcline@redhat.com \
--to=jcline@redhat.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).