[PATCH] drm/i915: Initialize CRC collection

Mika Kahola mika.kahola at intel.com
Mon May 28 12:17:54 UTC 2018


Ensure that the head and tail for crc ringbuffer is set to 0 when crc
debug file is opened and closed.

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 drivers/gpu/drm/i915/intel_pipe_crc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
index 39a4e4e..5fdd91f 100644
--- a/drivers/gpu/drm/i915/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
@@ -53,6 +53,7 @@ static int i915_pipe_crc_open(struct inode *inode, struct file *filep)
 	}
 
 	pipe_crc->opened = true;
+	pipe_crc->head = pipe_crc->tail = 0;
 	filep->private_data = inode->i_private;
 
 	spin_unlock_irq(&pipe_crc->lock);
@@ -68,6 +69,7 @@ static int i915_pipe_crc_release(struct inode *inode, struct file *filep)
 
 	spin_lock_irq(&pipe_crc->lock);
 	pipe_crc->opened = false;
+	pipe_crc->head = pipe_crc->tail = 0;
 	spin_unlock_irq(&pipe_crc->lock);
 
 	return 0;
-- 
2.7.4



More information about the Intel-gfx-trybot mailing list