Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663425

Re: [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with signaling.

From Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with signaling.
Date 2017-06-12 13:10 +0200
Message-ID <tRvol-1nx-5@gated-at.bofh.it> (permalink)
References <tRvol-1nx-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Op 09-06-17 om 23:30 schreef Andrey Grodzovsky:
> Problem:
> While running IGT kms_atomic_transition test suite i encountered
> a hang in drmHandleEvent immidietly follwoing 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 singnaled.
> This point to a bug in IGT but also DRM should gracefully
> fail  such scenario so no hang on user side will happen.
>
> Fix:
> Explicitly fail by failing atomic_commit early in
> drm_mode_atomic_commit where such problem can be identified.
>
> Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
> ---
>  drivers/gpu/drm/drm_atomic.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
Patch itself looks sane, but I'm worried about failing with -EINVAL when the same configuration with TEST_ONLY would otherwise succeed on it.
Not sure whether we should fail or not, since sending 0 events could still be considered success.

I don't mind either way, but definitely something that should be discussed before applying.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with  signaling. Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2017-06-12 13:10 +0200

csiph-web