Re: [PATCH 3/6] drm/nouveau: add GSP hwmon support

[email protected] Tue, 21 Jul 2026 16:36:36 -0400
Newsgroups org.freedesktop.lists.nouveau,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 2026-07-21 at 23:36 +0400, Mohamed Ahmed wrote:
> It can work but it's strictly worse than this. nvif_msec() does busy
> looping, which would be overkill for this as it would be doing a lot
> more reading for something that changes at most once per 500ms poll
> cycle, and it keeps the CPU fully occupied with every read. It also
> couples us to GPU timing while the main thing we are waiting here on
> is whether the GSP's buffer writes are now visible in RAM so GPU side
> time doesn't offer us anything. I actually wasn't sure at first how
> to
> properly wait and did go over all the possible timing alternatives
> and
> jiffies looked to be the best here.
>=20
> That said, to address what Milos mentioned (the weirdness of files
> being -ENODATA), I am going to have to move this into nvkm/rusd,
> inside r570_rusd_supported()/r570_rusd_read() which doesn't have any
> other alternative available to do a similar style waiting loop.

Gotcha, sgtm