[Intel-gfx] [PATCH 06/10] drm/i915: Enable vblank interrupts for CRC generation

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Nov 4 13:51:44 CET 2014


From: Chris Wilson <chris at chris-wilson.co.uk>

Pineview requires this. But this changes the debug API...

References: https://bugs.freedesktop.org/show_bug.cgi?id=82280
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index e60d5c2..465a17b 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2711,10 +2711,15 @@ static int i915_pipe_crc_open(struct inode *inode, struct file *filep)
 	struct pipe_crc_info *info = inode->i_private;
 	struct drm_i915_private *dev_priv = info->dev->dev_private;
 	struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[info->pipe];
+	int ret;
 
 	if (info->pipe >= INTEL_INFO(info->dev)->num_pipes)
 		return -ENODEV;
 
+	ret = drm_vblank_get(dev_priv->dev, info->pipe);
+	if (ret)
+		return ret;
+
 	spin_lock_irq(&pipe_crc->lock);
 
 	if (pipe_crc->opened) {
@@ -2740,6 +2745,8 @@ static int i915_pipe_crc_release(struct inode *inode, struct file *filep)
 	pipe_crc->opened = false;
 	spin_unlock_irq(&pipe_crc->lock);
 
+	drm_vblank_put(dev_priv->dev, info->pipe);
+
 	return 0;
 }
 
-- 
1.9.3




More information about the Intel-gfx mailing list