drm/crc: Add support for polling on the data fd.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 2 Feb 2018 14:27:43 +0000 (15:27 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 5 Feb 2018 12:22:44 +0000 (13:22 +0100)
commit4beb3b40ae7f994af01200323441df13f8f5b241
tree4d9aa86bf9990ee9a1a5cd596d1b6501678df7f1
parentbc4fde30e5906a047848339a8eddcc4e7277abc3
drm/crc: Add support for polling on the data fd.

This will make it possible for userspace to know whether reading
will block, without blocking on the fd. This makes it possible to
drain all queued CRC's in blocking mode, without having to reopen
the fd.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180202142743.68527-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[mlankhorst: Use POLLIN|POLLRDNORM, based on Ville's suggestion]
drivers/gpu/drm/drm_debugfs_crc.c