All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	intel-gfx@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org, harry.wentland@amd.com
Subject: Re: [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with signaling.
Date: Mon, 12 Jun 2017 13:08:05 +0200	[thread overview]
Message-ID: <7c001485-0485-5ba6-0be1-8738523d3fe5@linux.intel.com> (raw)
In-Reply-To: <1497043819-28591-1-git-send-email-Andrey.Grodzovsky@amd.com>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Maarten Lankhorst <maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Andrey Grodzovsky
	<Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: harry.wentland-5C7GfCeVMHo@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with signaling.
Date: Mon, 12 Jun 2017 13:08:05 +0200	[thread overview]
Message-ID: <7c001485-0485-5ba6-0be1-8738523d3fe5@linux.intel.com> (raw)
In-Reply-To: <1497043819-28591-1-git-send-email-Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>

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.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-06-12 11:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 21:30 [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with signaling Andrey Grodzovsky
2017-06-09 21:30 ` Andrey Grodzovsky
2017-06-09 22:47 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-12 11:08 ` Maarten Lankhorst [this message]
2017-06-12 11:08   ` [PATCH] " Maarten Lankhorst
2017-06-12 14:12   ` Andrey Grodzovsky
2017-06-12 14:12     ` Andrey Grodzovsky
2017-06-15 20:46 ` Andrey Grodzovsky
2017-06-19 15:35 ` Harry Wentland
2017-06-19 15:35   ` Harry Wentland
2017-06-19 19:24   ` Sean Paul
2017-06-19 19:24     ` Sean Paul
2017-06-19 20:11     ` Andrey Grodzovsky
2017-06-20  9:29       ` [Intel-gfx] " Daniel Vetter
2017-06-20  9:29         ` Daniel Vetter
2017-06-20 17:57   ` [PATCH v2] " Andrey Grodzovsky
2017-06-20 17:57     ` Andrey Grodzovsky
2017-06-26 19:44     ` Harry Wentland
2017-06-26 19:44       ` Harry Wentland
2017-06-27  7:37       ` Daniel Vetter
2017-06-27  7:37         ` Daniel Vetter
2017-06-27 14:29         ` Maarten Lankhorst
2017-06-27 14:29           ` Maarten Lankhorst
2017-06-27 15:01           ` Daniel Vetter
2017-06-27 15:01             ` Daniel Vetter
2017-06-28 10:23             ` Maarten Lankhorst
2017-06-28 10:23               ` Maarten Lankhorst
2017-06-20 18:30 ` ✓ Fi.CI.BAT: success for drm/core: Fail atomic IOCTL with no CRTC state but with signaling. (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c001485-0485-5ba6-0be1-8738523d3fe5@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=Andrey.Grodzovsky@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.