Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-12 Thread Terje Bergström
On 11.06.2013 15:09, Daniel Vetter wrote: Maybe it wasn't clear, but -EAGAIN does _not_ resubmit work. -EAGAIN is used to restart the ioctl if we had to kick a thread (to make sure it doesn't hold any locks), e.g. for a blocking wait on oustanding rendering. The codepaths taken work exactly as

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-12 Thread Daniel Vetter
On Wed, Jun 12, 2013 at 12:28 PM, Terje Bergström tbergst...@nvidia.com wrote: On 11.06.2013 15:09, Daniel Vetter wrote: Maybe it wasn't clear, but -EAGAIN does _not_ resubmit work. -EAGAIN is used to restart the ioctl if we had to kick a thread (to make sure it doesn't hold any locks), e.g.

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-11 Thread Thierry Reding
On Tue, May 28, 2013 at 01:12:12PM -0600, Keith Packard wrote: Thierry Reding thierry.red...@gmail.com writes: 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

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-11 Thread Daniel Vetter
On Tue, Jun 11, 2013 at 12:48 PM, Thierry Reding thierry.red...@gmail.com wrote: On Tue, May 28, 2013 at 01:12:12PM -0600, Keith Packard wrote: Thierry Reding thierry.red...@gmail.com writes: That doesn't sound right. Maybe drmIoctl() needs fixing instead. Looking at the history,

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-11 Thread Terje Bergström
On 11.06.2013 14:00, Daniel Vetter wrote: We don't use the EAGAIN ioctl restarting to resubmit the batchbuffer which blew up the gpu (that one has been submitted already in a different ioctl call), but to be able to restart the ioctl after the reset has completed: We need to kick every thread

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-11 Thread Daniel Vetter
On Tue, Jun 11, 2013 at 1:43 PM, Terje Bergström tbergst...@nvidia.com wrote: On 11.06.2013 14:00, Daniel Vetter wrote: We don't use the EAGAIN ioctl restarting to resubmit the batchbuffer which blew up the gpu (that one has been submitted already in a different ioctl call), but to be able to

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-06-11 Thread Thierry Reding
On Tue, Jun 11, 2013 at 02:09:31PM +0200, Daniel Vetter wrote: On Tue, Jun 11, 2013 at 1:43 PM, Terje Bergström tbergst...@nvidia.com wrote: On 11.06.2013 14:00, Daniel Vetter wrote: We don't use the EAGAIN ioctl restarting to resubmit the batchbuffer which blew up the gpu (that one has

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-05-28 Thread Thierry Reding
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.

Re: [PATCH 2/6] gpu: host1x: Fix syncpoint wait return value

2013-05-28 Thread Keith Packard
Thierry Reding thierry.red...@gmail.com writes: 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