From: Greg KH <gregkh@linuxfoundation.org>
To: "Uwe Kleine-König" <ukleinek@kernel.org>
Cc: stable@vger.kernel.org, stable-commits@vger.kernel.org,
nicolas.frattaroli@collabora.com,
Heiko Stuebner <heiko@sntech.de>
Subject: Re: Patch "pwm: rockchip: Round period/duty down on apply, up on get" has been added to the 6.16-stable tree
Date: Tue, 12 Aug 2025 10:53:11 +0200 [thread overview]
Message-ID: <2025081236-moneyless-enigmatic-891b@gregkh> (raw)
In-Reply-To: <c5s7efnva5gluplw65g6qqxjqpmcgprgtm6tsajkbdqibe73lb@lw5afb6b725i>
On Sat, Aug 09, 2025 at 11:45:23AM +0200, Uwe Kleine-König wrote:
> Hello Sasha,
>
> On Fri, Aug 08, 2025 at 06:30:33PM -0400, Sasha Levin wrote:
> > This is a note to let you know that I've just added the patch titled
> >
> > pwm: rockchip: Round period/duty down on apply, up on get
> >
> > to the 6.16-stable tree which can be found at:
> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >
> > The filename of the patch is:
> > pwm-rockchip-round-period-duty-down-on-apply-up-on-g.patch
> > and it can be found in the queue-6.16 subdirectory.
> >
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
> >
> >
> >
> > commit 51144efa3159cd95ab37e786c982822a060d7d1a
> > Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> > Date: Mon Jun 16 17:14:17 2025 +0200
> >
> > pwm: rockchip: Round period/duty down on apply, up on get
> >
> > [ Upstream commit 0b4d1abe5ca568c5b7f667345ec2b5ad0fb2e54b ]
> >
> > With CONFIG_PWM_DEBUG=y, the rockchip PWM driver produces warnings like
> > this:
> >
> > rockchip-pwm fd8b0010.pwm: .apply is supposed to round down
> > duty_cycle (requested: 23529/50000, applied: 23542/50000)
> >
> > This is because the driver chooses ROUND_CLOSEST for purported
> > idempotency reasons. However, it's possible to keep idempotency while
> > always rounding down in .apply().
> >
> > Do this by making .get_state() always round up, and making .apply()
> > always round down. This is done with u64 maths, and setting both period
> > and duty to U32_MAX (the biggest the hardware can support) if they would
> > exceed their 32 bits confines.
> >
> > Fixes: 12f9ce4a5198 ("pwm: rockchip: Fix period and duty cycle approximation")
> > Fixes: 1ebb74cf3537 ("pwm: rockchip: Add support for hardware readout")
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> > Link: https://lore.kernel.org/r/20250616-rockchip-pwm-rounding-fix-v2-1-a9c65acad7b6@collabora.com
> > Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
>
> while the new code makes the driver match the PWM rules now, I'd be
> conservative and not backport that patch because while I consider it a
> (very minor) fix that's a change in behaviour and maybe people depend on
> that old behaviour. So let's not break our user's workflows and reserve
> that for a major release. Please drop this patch from your queue.
Now dropped, but note, any behavior change is ok for ANY kernel version
as we guarantee they all work the same :)
So good luck with your users in the 6.17 release...
thanks
greg k-h
next prev parent reply other threads:[~2025-08-12 8:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250808223033.1417018-1-sashal@kernel.org>
2025-08-09 9:45 ` Patch "pwm: rockchip: Round period/duty down on apply, up on get" has been added to the 6.16-stable tree Uwe Kleine-König
2025-08-12 8:53 ` Greg KH [this message]
2025-08-12 10:36 ` Uwe Kleine-König
2025-08-12 10:53 ` Greg KH
2025-08-12 20:15 ` Uwe Kleine-König
2025-08-13 13:30 ` Nicolas Frattaroli
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=2025081236-moneyless-enigmatic-891b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=nicolas.frattaroli@collabora.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ukleinek@kernel.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