[PATCH v4] drm: drm_vblank_cleanup: WARN when refcount > 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Warn when refcount is > 0 in drm_vblank_cleanup.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux