]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Implement blocking read for pipe CRC files
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 15 Oct 2013 17:55:40 +0000 (18:55 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 16 Oct 2013 11:32:16 +0000 (13:32 +0200)
commit89fda4193d149ce5745da7eb719d345f150aa401
tree49171943b164c5f1c00fc3418e43500834e9e681
parent881b0c3b876d8e6c0ee619ac3fc00cdccd48be65
drm/i915: Implement blocking read for pipe CRC files

seq_file is not quite the right interface for these ones. We have a
circular buffer with a new entry per vblank on one side and a process
wanting to dequeue the CRC with a read().

It's quite racy to wait for vblank in user land and then try to read a
pipe_crc file, sometimes the CRC interrupt hasn't been fired and we end
up with an EOF.

So, let's have the read on the pipe_crc file block until the interrupt
gives us a new entry. At that point we can wake the reading process.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c