dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
To: daniel.vetter@intel.com, jani.nikula@linux.intel.com,
	seanpaul@chromium.org, airlied@linux.ie,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	ville.syrjala@linux.intel.com
Cc: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Subject: [PATCH v4] drm: drm_vblank_cleanup: WARN when refcount > 0
Date: Sun, 26 Nov 2017 18:16:05 +0530	[thread overview]
Message-ID: <20171126124605.20062-1-prasannatsmkumar@gmail.com> (raw)

Warn when refcount is > 0 in drm_vblank_cleanup.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
---
Changes in v4:
* Print refcount value.

Changes in v3:
* Dropped i915 patch that is used for testing this.

No changes in v2.


 drivers/gpu/drm/drm_vblank.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 3e61aeb..062cc17 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -403,9 +403,15 @@ void drm_vblank_cleanup(struct drm_device *dev)
 		return;
 
 	for (pipe = 0; pipe < dev->num_crtcs; pipe++) {
+		unsigned int refcount;
 		struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
 
-		WARN_ON(atomic_read(&vblank->refcount) > 0);
+		refcount = atomic_read(&vblank->refcount);
+		if (refcount > 0) {
+			DRM_DEBUG("vblank refcount: %u in %s\n", refcount,
+				   __func__);
+			WARN_ON(refcount > 0);
+		}
 
 		WARN_ON(READ_ONCE(vblank->enabled) &&
 			drm_core_check_feature(dev, DRIVER_MODESET));
-- 
2.10.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

                 reply	other threads:[~2017-11-26 12:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20171126124605.20062-1-prasannatsmkumar@gmail.com \
    --to=prasannatsmkumar@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=seanpaul@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).