[Intel-gfx] [PATCH 2/2] Test case for drm_vblank_cleanup refcount validation patch

PrasannaKumar Muralidharan prasannatsmkumar at gmail.com
Thu Oct 12 17:52:37 UTC 2017


In i915 driver unload drm_vblank_get is added to test whether
drm_vblank_cleanup refcount validation patch is working.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar at gmail.com>
---
Changes since RFC:
Fix compile error

 drivers/gpu/drm/i915/i915_drv.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9f45cfe..d317da3 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1373,6 +1373,13 @@ void i915_driver_unload(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 
+	enum pipe pipe;
+	for_each_pipe(dev_priv, pipe) {
+		struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv,
+								  pipe);
+		drm_crtc_vblank_put(&crtc->base);
+	}
+
 	i915_driver_unregister(dev_priv);
 
 	if (i915_gem_suspend(dev_priv))
-- 
2.10.0



More information about the Intel-gfx mailing list