From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "airlied-cv59FeDIM0c@public.gmane.org"
<airlied-cv59FeDIM0c@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Terje Bergstrom
<tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>,
xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org
Subject: Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value
Date: Tue, 28 May 2013 12:39:27 +0200 [thread overview]
Message-ID: <20130528103927.GB11547@mithrandir> (raw)
In-Reply-To: <51A30372.6080907-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]
On Mon, May 27, 2013 at 09:55:46AM +0300, Arto Merilainen wrote:
> On 05/26/2013 01:12 PM, Thierry Reding wrote:
> >* PGP Signed by an unknown key
> >
> >On Fri, May 17, 2013 at 02:49:44PM +0300, Arto Merilainen wrote:
[...]
> >Thinking about it, maybe it would be good to have two separate error
> >codes. Keeping -EAGAIN for the case where a zero timeout was passed
> >doesn't sound too bad to differentiate it from the case where a non-
> >zero timeout was passed and it actually timed out. What do you think?
>
> I agree, in this case it would not look bad at all. However, user
> space libraries may loop until the ioctl return code is something
> else than -EAGAIN or -EINTR. Especially function drmIoctl() in
> libdrm does this which is why I noted this isssue in the first
> place.
>
> If user space uses zero timeout to just check if a syncpoint value
> has already passed the library continues looping until the syncpoint
> value actually passes. Of course, we could just modify the ioctl
> interface to "cast" this return code to something else but that does
> not seem correct.
That doesn't sound right. Maybe drmIoctl() needs fixing instead. Looking
at the history, drmIoctl() was introduced to automatically loop if a
signal was received (commit 8b9ab108ec1f2ba2b503f713769c4946849b3cb2).
However the ioctl(3p) manpage doesn't mention that ioctl() returns
EAGAIN in case it is interrupted by a signal.
I'm adding Keith as author of that commit and the xorg-devel mailing
list on Cc to get some more eyes on this.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-05-28 10:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-17 11:49 [PATCH 0/6] Miscellaneous fixes to host1x Arto Merilainen
[not found] ` <1368791388-31441-1-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-17 11:49 ` [PATCH 1/6] gpu: host1x: Fixes to host1x firewall Arto Merilainen
[not found] ` <1368791388-31441-2-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-26 10:02 ` Thierry Reding
2013-05-27 6:22 ` Arto Merilainen
2013-05-17 11:49 ` [PATCH 3/6] gpu: host1x: Fix memory access in syncpt request Arto Merilainen
[not found] ` <1368791388-31441-4-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-26 10:15 ` Thierry Reding
2013-05-27 6:56 ` Arto Merilainen
2013-05-17 11:49 ` [PATCH 4/6] gpu: host1x: Fix client_managed type Arto Merilainen
[not found] ` <1368791388-31441-5-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-26 10:17 ` Thierry Reding
2013-05-17 11:49 ` [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value Arto Merilainen
[not found] ` <1368791388-31441-3-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-26 10:12 ` Thierry Reding
2013-05-27 6:55 ` Arto Merilainen
[not found] ` <51A30372.6080907-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-28 10:39 ` Thierry Reding [this message]
2013-05-28 19:12 ` Keith Packard
[not found] ` <86y5ay6hrn.fsf-07MG1JmyPZaz9DMzp4kqnw@public.gmane.org>
2013-06-11 10:48 ` Thierry Reding
2013-06-11 11:00 ` Daniel Vetter
2013-06-11 11:43 ` Terje Bergström
2013-06-11 12:09 ` Daniel Vetter
[not found] ` <CAKMK7uGRW4uqsSaDEehTZwknZH+mNEgyKB6-4TgfgUOaTOcoLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-11 18:19 ` Thierry Reding
2013-06-12 10:28 ` Terje Bergström
2013-06-12 11:00 ` Daniel Vetter
2013-05-17 11:49 ` [PATCH 5/6] gpu: host1x: Rework CPU syncpoint increment Arto Merilainen
[not found] ` <1368791388-31441-6-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-26 10:24 ` Thierry Reding
2013-05-17 11:49 ` [PATCH 6/6] drm/tegra: Fix syncpoint increment return code Arto Merilainen
[not found] ` <1368791388-31441-7-git-send-email-amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-26 10:26 ` Thierry Reding
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=20130528103927.GB11547@mithrandir \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox