All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915: Warn when releasing a frontbuffer while in use
Date: Tue, 09 Feb 2021 09:39:51 +0000	[thread overview]
Message-ID: <161286359136.7943.3112800560212828589@build.alporthouse.com> (raw)
In-Reply-To: <20210209021918.16234-3-ville.syrjala@linux.intel.com>

Quoting Ville Syrjala (2021-02-09 02:19:18)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Let's scream if we are about to release a frontbuffer which
> is still in use.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_frontbuffer.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index 7b38eee9980f..6fc6965b6133 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -224,6 +224,8 @@ static void frontbuffer_release(struct kref *ref)
>         struct drm_i915_gem_object *obj = front->obj;
>         struct i915_vma *vma;
>  
> +       drm_WARN_ON(obj->base.dev, atomic_read(&front->bits));

I had to double check the meaning of bits, and indeed they are cleared
by intel_frontbuffer_track as the scanout is switched away from the
object. A stacktrace here isn't particularly useful for tracking down
the leak, but it is a trivial method to make CI pay attention.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-02-09  9:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  2:19 [Intel-gfx] [PATCH 1/3] drm/i915: Disallow plane x+w>stride on ilk+ with X-tiling Ville Syrjala
2021-02-09  2:19 ` [PATCH 2/3] drm/i915: Fix overlay frontbuffer tracking Ville Syrjala
2021-02-09  2:19   ` [Intel-gfx] " Ville Syrjala
2021-02-09  9:33   ` Chris Wilson
2021-02-09  9:33     ` [Intel-gfx] " Chris Wilson
2021-02-09  2:19 ` [Intel-gfx] [PATCH 3/3] drm/i915: Warn when releasing a frontbuffer while in use Ville Syrjala
2021-02-09  9:39   ` Chris Wilson [this message]
2021-02-09  2:51 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Disallow plane x+w>stride on ilk+ with X-tiling Patchwork
2021-02-09  3:22 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-02-09 15:09   ` Ville Syrjälä
2021-02-09  9:22 ` [Intel-gfx] [PATCH 1/3] " Chris Wilson
2021-02-09  9:50   ` Chris Wilson
2021-02-09 14:44     ` Ville Syrjälä
2021-02-09 14:51       ` Ville Syrjälä
2021-02-09 15:21   ` Ville Syrjälä
2021-02-10 12:05     ` Juha-Pekka Heikkila
2021-02-09 17:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2021-02-09 21:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=161286359136.7943.3112800560212828589@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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.