]> git.baikalelectronics.ru Git - kernel.git/commit
drm/core: Fail atomic IOCTL with no CRTC state but with signaling.
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Tue, 20 Jun 2017 17:57:06 +0000 (13:57 -0400)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 28 Jun 2017 08:00:52 +0000 (10:00 +0200)
commitb20694d9a81178d9964805e4bc1d4a377382b7c6
tree3de02eece569b112e8d1bac14ac82b56c4bc91c2
parentefd8185bb6f8072c525ea88f686de52a0831a3f0
drm/core: Fail atomic IOCTL with no CRTC state but with signaling.

Problem : While running IGT kms_atomic_transition test suite i encountered
a hang in drmHandleEvent immediately following  an atomic_commit.
After dumping the atomic state I relized that in this case there was
not even one CRTC attached to the state and only disabled
planes. This probably due to a commit which hadn't changed any property
which would require attaching crtc state. This means drmHandleEvent
will never wake up from read since without CRTC in atomic state
the event fd will not be signaled.

Fix: Protect against this issue by failing atomic_commit early in
drm_mode_atomic_commit where such probelm can be identified.

v2:
Fix typos and extra newlines.

Change-Id: I3ee28ffae35fd1e8bfe553146c44da53da02e6f8
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1497981426-27203-1-git-send-email-Andrey.Grodzovsky@amd.com
drivers/gpu/drm/drm_atomic.c