]> git.baikalelectronics.ru Git - kernel.git/commit
drm/crc: Only open CRC on atomic drivers when the CRTC is active.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 6 Jul 2017 13:03:15 +0000 (15:03 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 17 Jul 2017 14:34:51 +0000 (16:34 +0200)
commit4f8f79095c2f744a7b5746956faf3258bf50c6b0
tree8855386457a0b84cfd111e7a37f5798401981724
parenta036e4bc3a2f8d75fb818fe5caa83f81d86aeaf5
drm/crc: Only open CRC on atomic drivers when the CRTC is active.

Commit 939ed8f39214 ("drm: crc: Wait for a frame before returning
from open()") adds a wait for CRC frame, but with the CRTC off
this will never be generated. For atomic drivers we know if a CRTC
is active through crtc_state->active, so when inactive reject the
open with -EIO.

Just like with the previous patch changing debugfs opening semantics,
this patch has been tested against igt.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 939ed8f39214 ("drm: crc: Wait for a frame before returning from open()")
Testcase: debugfs_test.read_all_entries
Link: http://patchwork.freedesktop.org/patch/msgid/15f9d300-65d3-63aa-00e3-e83f5e4d5a7a@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_debugfs_crc.c