From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Lyude Paul <lyude@redhat.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH 2/3] drm/vblank: Warn when silently cancelling vblank works
Date: Tue, 3 Oct 2023 16:34:49 +0300 [thread overview]
Message-ID: <ZRwYeYYI2QxtDlHj@intel.com> (raw)
In-Reply-To: <391fcadb309b9ac381336a5676506a701f8cc1c5.camel@redhat.com>
On Wed, Sep 20, 2023 at 03:55:28PM -0400, Lyude Paul wrote:
> Good point!
>
> Reviewed-by: Lyude Paul <lyude@redhat.com>
Thanks. Pushed to drm-misc-next.
>
> On Wed, 2023-09-20 at 17:03 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Silently cancelling vblank works is a bit rude, especially
> > if said works do any resource management (eg. free memory).
> > WARN if we ever hit this.
> >
> > TODO: Maybe drm_crtc_vblank_off() should wait for any
> > pending work to reach its target vblank before actually
> > doing anything drastic?
> >
> > Cc: Lyude Paul <lyude@redhat.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/drm_vblank_work.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_vblank_work.c b/drivers/gpu/drm/drm_vblank_work.c
> > index bd481fdd6b87..43cd5c0f4f6f 100644
> > --- a/drivers/gpu/drm/drm_vblank_work.c
> > +++ b/drivers/gpu/drm/drm_vblank_work.c
> > @@ -73,6 +73,9 @@ void drm_vblank_cancel_pending_works(struct drm_vblank_crtc *vblank)
> >
> > assert_spin_locked(&vblank->dev->event_lock);
> >
> > + drm_WARN_ONCE(vblank->dev, !list_empty(&vblank->pending_work),
> > + "Cancelling pending vblank works!\n");
> > +
> > list_for_each_entry_safe(work, next, &vblank->pending_work, node) {
> > list_del_init(&work->node);
> > drm_vblank_put(vblank->dev, vblank->pipe);
>
> --
> Cheers,
> Lyude Paul (she/her)
> Software Engineer at Red Hat
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-10-03 13:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 14:03 [Intel-xe] [PATCH 1/3] drm/i915: Use vblank worker to unpin old legacy cursor fb safely Ville Syrjala
2023-09-20 14:03 ` [Intel-xe] [PATCH 2/3] drm/vblank: Warn when silently cancelling vblank works Ville Syrjala
2023-09-20 19:55 ` Lyude Paul
2023-10-03 13:34 ` Ville Syrjälä [this message]
2023-09-20 14:03 ` [Intel-xe] [PATCH 3/3] maybe xe is broken enough that it gives you a new vma every time? Ville Syrjala
2023-09-20 17:27 ` [Intel-xe] [PATCH v2 " Ville Syrjala
2023-09-20 14:06 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/3] drm/i915: Use vblank worker to unpin old legacy cursor fb safely Patchwork
2023-09-20 14:06 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-20 14:07 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-20 14:14 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-20 14:15 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-20 14:16 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-09-20 14:48 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
2023-09-20 18:45 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/3] drm/i915: Use vblank worker to unpin old legacy cursor fb safely (rev2) Patchwork
2023-09-20 18:45 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-20 18:46 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-20 18:53 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-20 18:54 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-20 18:55 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
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=ZRwYeYYI2QxtDlHj@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lyude@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox