* [PATCH] drm/i915/display: Don't drop the async-put delay on self-requeue
@ 2026-11-04 5:39 Wentao Guan
2026-11-06 11:30 ` Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Wentao Guan @ 2026-11-04 5:39 UTC (permalink / raw)
To: joonas.lahtinen, imre.deak, jouni.hogander
Cc: intel-gfx, intel-xe, Wentao Guan, stable
cancel_async_put_work() also clears async_put_next_delay, so moving it
ahead of the requeue in intel_display_power_put_async_work() makes the
requeue always use a zero delay. That discards the delay accumulated by
concurrent async puts, including the 17 ms DC-state anti-toggle delay
requested for POWER_DOMAIN_DC_OFF.
Use cancel_delayed_work() directly to cancel the stale instance without
clearing the delay, and clear the delay only after the requeue has
consumed it.
Fixes: 30ca6365bb42 ("drm/i915: Fix assert on pending async-put power domain work when it requeues itself")
Cc: <stable@vger.kernel.org> # v6.11+
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
---
drivers/gpu/drm/i915/display/intel_display_power.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index b000ec001ccfc..7da6eda46e9e0 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -873,7 +873,7 @@ intel_display_power_put_async_work(struct work_struct *work)
* Cancel the work that got queued after this one got dequeued,
* since here we released the corresponding async-put reference.
*/
- cancel_async_put_work(power_domains, false);
+ cancel_delayed_work(&power_domains->async_put_work);
/* Requeue the work if more domains were async put meanwhile. */
if (!bitmap_empty(power_domains->async_put_domains[1].bits, POWER_DOMAIN_NUM)) {
@@ -885,9 +885,10 @@ intel_display_power_put_async_work(struct work_struct *work)
queue_async_put_domains_work(power_domains,
fetch_and_zero(&new_work_wakeref),
power_domains->async_put_next_delay);
- power_domains->async_put_next_delay = 0;
}
+ power_domains->async_put_next_delay = 0;
+
out_verify:
verify_async_put_domains_state(power_domains);
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915/display: Don't drop the async-put delay on self-requeue
2026-11-04 5:39 [PATCH] drm/i915/display: Don't drop the async-put delay on self-requeue Wentao Guan
@ 2026-11-06 11:30 ` Jani Nikula
2026-11-06 12:07 ` Wentao Guan
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2026-11-06 11:30 UTC (permalink / raw)
To: Wentao Guan, joonas.lahtinen, imre.deak, jouni.hogander
Cc: intel-gfx, intel-xe, Wentao Guan, stable
On Wed, 04 Nov 2026, Wentao Guan <guanwentao@uniontech.com> wrote:
> cancel_async_put_work() also clears async_put_next_delay, so moving it
> ahead of the requeue in intel_display_power_put_async_work() makes the
> requeue always use a zero delay. That discards the delay accumulated by
> concurrent async puts, including the 17 ms DC-state anti-toggle delay
> requested for POWER_DOMAIN_DC_OFF.
>
> Use cancel_delayed_work() directly to cancel the stale instance without
> clearing the delay, and clear the delay only after the requeue has
> consumed it.
>
> Fixes: 30ca6365bb42 ("drm/i915: Fix assert on pending async-put power domain work when it requeues itself")
> Cc: <stable@vger.kernel.org> # v6.11+
> Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
How did you find this?
Is there a bug report about this?
How did you test this?
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/intel_display_power.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index b000ec001ccfc..7da6eda46e9e0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -873,7 +873,7 @@ intel_display_power_put_async_work(struct work_struct *work)
> * Cancel the work that got queued after this one got dequeued,
> * since here we released the corresponding async-put reference.
> */
> - cancel_async_put_work(power_domains, false);
> + cancel_delayed_work(&power_domains->async_put_work);
>
> /* Requeue the work if more domains were async put meanwhile. */
> if (!bitmap_empty(power_domains->async_put_domains[1].bits, POWER_DOMAIN_NUM)) {
> @@ -885,9 +885,10 @@ intel_display_power_put_async_work(struct work_struct *work)
> queue_async_put_domains_work(power_domains,
> fetch_and_zero(&new_work_wakeref),
> power_domains->async_put_next_delay);
> - power_domains->async_put_next_delay = 0;
> }
>
> + power_domains->async_put_next_delay = 0;
> +
> out_verify:
> verify_async_put_domains_state(power_domains);
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915/display: Don't drop the async-put delay on self-requeue
2026-11-06 11:30 ` Jani Nikula
@ 2026-11-06 12:07 ` Wentao Guan
0 siblings, 0 replies; 3+ messages in thread
From: Wentao Guan @ 2026-11-06 12:07 UTC (permalink / raw)
To: Jani Nikula, joonas.lahtinen, imre.deak, jouni.hogander
Cc: intel-gfx, intel-xe, stable
Hi,
> On Wed, 04 Nov 2026, Wentao Guan <guanwentao@uniontech.com> wrote:
> > cancel_async_put_work() also clears async_put_next_delay, so moving it
> > ahead of the requeue in intel_display_power_put_async_work() makes the
> > requeue always use a zero delay. That discards the delay accumulated by
> > concurrent async puts, including the 17 ms DC-state anti-toggle delay
> > requested for POWER_DOMAIN_DC_OFF.
> >
> > Use cancel_delayed_work() directly to cancel the stale instance without
> > clearing the delay, and clear the delay only after the requeue has
> > consumed it.
> >
> > Fixes: 30ca6365bb42 ("drm/i915: Fix assert on pending async-put power domain work when it requeues itself")
> > Cc: <stable@vger.kernel.org> # v6.11+
> > Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
>
> How did you find this?
During a stable bugfix backport work, found by github copilot max(gpt-6.1-sol[ReasoningEffort=xhigh]).
> Is there a bug report about this?
Just see: https://github.com/deepin-community/kernel/pull/2239#discussion_r4463718883
> How did you test this?
Review again, build again, integation by anothor one.
It is not the original bug we met, the bug sovled by backport many i915 update commits as them in mainline.
BRs
Wentao Guan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-06 12:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 5:39 [PATCH] drm/i915/display: Don't drop the async-put delay on self-requeue Wentao Guan
2026-11-06 11:30 ` Jani Nikula
2026-11-06 12:07 ` Wentao Guan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox