return LINE_LEN(crc->values_cnt);
}
+static unsigned int crtc_crc_poll(struct file *file, poll_table *wait)
+{
+ struct drm_crtc *crtc = file->f_inode->i_private;
+ struct drm_crtc_crc *crc = &crtc->crc;
+ unsigned ret;
+
+ poll_wait(file, &crc->wq, wait);
+
+ spin_lock_irq(&crc->lock);
+ if (crc->source && crtc_crc_data_count(crc))
+ ret = POLLIN | POLLRDNORM;
+ else
+ ret = 0;
+ spin_unlock_irq(&crc->lock);
+
+ return ret;
+}
+
static const struct file_operations drm_crtc_crc_data_fops = {
.owner = THIS_MODULE,
.open = crtc_crc_open,
.read = crtc_crc_read,
+ .poll = crtc_crc_poll,
.release = crtc_crc_release,
};