From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alex" <xnderv@yandex.com>
Cc: "Lyude Paul" <lyude@redhat.com>,
"Martin Roukala" <martin.roukala@mupuf.org>,
<dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH v2] drm/nouveau/therm: mask the update bit when reading back the fan PWM duty
Date: Sat, 05 Dec 2026 22:55:46 +0100 [thread overview]
Message-ID: <DND4UH9CTGQ7.2D2OXLOYJCI9O@kernel.org> (raw)
In-Reply-To: <20261029130012.21738-1-xnderv@yandex.com>
On Thu Oct 29, 2026 at 2:00 PM CET, Alex wrote:
> Fixes: cb9fa62671ac ("drm/nv50/pm: add support for pwm fan control")
> Fixes: bc79202f4c8f ("nvd0/therm: implement more appropriate pwm fan control functions")
<snip>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c
> index 684aff7..f56e763 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c
> @@ -74,7 +74,11 @@ gf119_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty)
> else if (indx < 2) {
> if (nvkm_rd32(device, 0x00d610 + (line * 0x04)) & 0x00000040) {
> *divs = nvkm_rd32(device, 0x00e114 + (indx * 8));
> - *duty = nvkm_rd32(device, 0x00e118 + (indx * 8));
> + /*
> + * Bit 31 is the update trigger set by pwm_set();
> + * it can still read back as set after a write.
> + */
> + *duty = nvkm_rd32(device, 0x00e118 + (indx * 8)) & 0x7fffffff;
> return 0;
> }
> } else if (indx == 2) {
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c
> index 9cf16a7..9272256 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c
> @@ -72,7 +72,11 @@ nv50_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty)
>
> if (nvkm_rd32(device, ctrl) & (1 << line)) {
> *divs = nvkm_rd32(device, 0x00e114 + (id * 8));
> - *duty = nvkm_rd32(device, 0x00e118 + (id * 8));
> + /*
> + * Bit 31 is the update trigger set by pwm_set();
> + * it can still read back as set after a write.
> + */
> + *duty = nvkm_rd32(device, 0x00e118 + (id * 8)) & 0x7fffffff;
> return 0;
> }
Those should be two separate patches, can you please split this one up and
resend?
Thanks,
Danilo
WARNING: multiple messages have this Message-ID (diff)
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alex" <xnderv@yandex.com>
Cc: Martin Roukala <martin.roukala@mupuf.org>,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/nouveau/therm: mask the update bit when reading back the fan PWM duty
Date: Sat, 05 Dec 2026 22:55:46 +0100 [thread overview]
Message-ID: <DND4UH9CTGQ7.2D2OXLOYJCI9O@kernel.org> (raw)
In-Reply-To: <20261029130012.21738-1-xnderv@yandex.com>
On Thu Oct 29, 2026 at 2:00 PM CET, Alex wrote:
> Fixes: cb9fa62671ac ("drm/nv50/pm: add support for pwm fan control")
> Fixes: bc79202f4c8f ("nvd0/therm: implement more appropriate pwm fan control functions")
<snip>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c
> index 684aff7..f56e763 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gf119.c
> @@ -74,7 +74,11 @@ gf119_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty)
> else if (indx < 2) {
> if (nvkm_rd32(device, 0x00d610 + (line * 0x04)) & 0x00000040) {
> *divs = nvkm_rd32(device, 0x00e114 + (indx * 8));
> - *duty = nvkm_rd32(device, 0x00e118 + (indx * 8));
> + /*
> + * Bit 31 is the update trigger set by pwm_set();
> + * it can still read back as set after a write.
> + */
> + *duty = nvkm_rd32(device, 0x00e118 + (indx * 8)) & 0x7fffffff;
> return 0;
> }
> } else if (indx == 2) {
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c
> index 9cf16a7..9272256 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv50.c
> @@ -72,7 +72,11 @@ nv50_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty)
>
> if (nvkm_rd32(device, ctrl) & (1 << line)) {
> *divs = nvkm_rd32(device, 0x00e114 + (id * 8));
> - *duty = nvkm_rd32(device, 0x00e118 + (id * 8));
> + /*
> + * Bit 31 is the update trigger set by pwm_set();
> + * it can still read back as set after a write.
> + */
> + *duty = nvkm_rd32(device, 0x00e118 + (id * 8)) & 0x7fffffff;
> return 0;
> }
Those should be two separate patches, can you please split this one up and
resend?
Thanks,
Danilo
next prev parent reply other threads:[~2026-12-05 21:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 13:00 [PATCH v2] drm/nouveau/therm: mask the update bit when reading back the fan PWM duty Alex
2026-11-18 16:54 ` Alex
2026-12-05 21:55 ` Danilo Krummrich [this message]
2026-12-05 21:55 ` Danilo Krummrich
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=DND4UH9CTGQ7.2D2OXLOYJCI9O@kernel.org \
--to=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=martin.roukala@mupuf.org \
--cc=nouveau@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
--cc=xnderv@yandex.com \
/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.