Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-18 Thread Xavier Bestel
On Tue, 2009-02-17 at 16:10 -0800, Ian Romanick wrote: Are vblanks | Is anyone | happening? | listening? | What to do? YesYes Update MSC based on vblank interrupts YesNoDisable IRQ, estimate MSC next time someone listens

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-18 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xavier Bestel wrote: On Tue, 2009-02-17 at 16:10 -0800, Ian Romanick wrote: Are vblanks | Is anyone | happening? | listening? | What to do? YesYes Update MSC based on vblank interrupts YesNoDisable

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Michel Dänzer
On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote: Recall our last discussion where I outlined the cases we'd have to deal with in the modeset ioctl if we didn't use

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Jesse Barnes
On Tuesday, February 17, 2009 9:04 am Michel Dänzer wrote: On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote: Recall our last discussion where I outlined the cases we'd

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Michel Dänzer
On Tue, 2009-02-17 at 09:27 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 9:04 am Michel Dänzer wrote: On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote:

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Jesse Barnes
On Tuesday, February 17, 2009 9:27 am Jesse Barnes wrote: On Tuesday, February 17, 2009 9:04 am Michel Dänzer wrote: On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote:

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Michel Dänzer
On Tue, 2009-02-17 at 09:47 -0800, Jesse Barnes wrote: Btw I don't have a problem with keeping this functionality, but we need to fix it (the problem above is the only one I'm aware of atm). That means: 1) removing the last count stuff and providing a disable timer knob 2) changing

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Jesse Barnes
On Tuesday, February 17, 2009 9:43 am Michel Dänzer wrote: On Tue, 2009-02-17 at 09:27 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 9:04 am Michel Dänzer wrote: On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote:

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Michel Dänzer
On Tue, 2009-02-17 at 10:34 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 9:43 am Michel Dänzer wrote: On Tue, 2009-02-17 at 09:27 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 9:04 am Michel Dänzer wrote: On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote:

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Jesse Barnes
On Tuesday, February 17, 2009 10:49 am Michel Dänzer wrote: On Tue, 2009-02-17 at 10:34 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 9:43 am Michel Dänzer wrote: On Tue, 2009-02-17 at 09:27 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 9:04 am Michel Dänzer wrote:

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michel Dänzer wrote: On Mon, 2009-02-16 at 10:42 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote: Can you think of a case where those frames would matter?

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jesse Barnes wrote: As to your example, I wasn't looking for theoretical issues, but real apps that would depend on this behavior. I haven't played with many video apps, so I'm not sure if what you outlined is common behavior, or if apps

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Jesse Barnes
On Tuesday, February 17, 2009 4:10 pm Ian Romanick wrote: Stepping back, there are two separate axes (Are vblanks happening? Is anyone listening?) that give four separate cases. I think we can derive sensible behavior in all cases. Here is my suggestion: Are vblanks | Is anyone |

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jesse Barnes wrote: On Tuesday, February 17, 2009 4:10 pm Ian Romanick wrote: Stepping back, there are two separate axes (Are vblanks happening? Is anyone listening?) that give four separate cases. I think we can derive sensible behavior in all

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Jesse Barnes
On Tuesday, February 17, 2009 5:26 pm Ian Romanick wrote: Jesse Barnes wrote: On Tuesday, February 17, 2009 4:10 pm Ian Romanick wrote: Stepping back, there are two separate axes (Are vblanks happening? Is anyone listening?) that give four separate cases. I think we can derive sensible

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-17 Thread Michel Dänzer
On Tue, 2009-02-17 at 17:34 -0800, Jesse Barnes wrote: On Tuesday, February 17, 2009 5:26 pm Ian Romanick wrote: Jesse Barnes wrote: On Tuesday, February 17, 2009 4:10 pm Ian Romanick wrote: Stepping back, there are two separate axes (Are vblanks happening? Is anyone listening?) that

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-16 Thread Dave Airlie
On Mon, Feb 16, 2009 at 5:33 PM, Michel Dänzer mic...@daenzer.net wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote: On Friday, February 13, 2009 2:33 am Michel Dänzer wrote: On Thu, 2009-02-12 at 09:15 -0800, Jesse Barnes wrote: It does, but take a look at that code again. If

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-16 Thread Jesse Barnes
On Sunday, February 15, 2009 11:33 pm Michel Dänzer wrote: On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote: Recall our last discussion where I outlined the cases we'd have to deal with in the modeset ioctl if we didn't use get/put to just keep interrupts on around the calls: But we

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-15 Thread Michel Dänzer
On Fri, 2009-02-13 at 10:27 -0800, Jesse Barnes wrote: On Friday, February 13, 2009 2:33 am Michel Dänzer wrote: On Thu, 2009-02-12 at 09:15 -0800, Jesse Barnes wrote: It does, but take a look at that code again. If interrupts are disabled by the timer, we'll capture the frame count.

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-13 Thread Michel Dänzer
On Thu, 2009-02-12 at 09:15 -0800, Jesse Barnes wrote: On Thursday, February 12, 2009 2:11 am Michel Dänzer wrote: On Wed, 2009-02-11 at 14:29 -0800, Jesse Barnes wrote: The current wait_vblank condition won't return if the wait sequence is more than 8M behind the current counter. This

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-13 Thread Jesse Barnes
On Friday, February 13, 2009 2:33 am Michel Dänzer wrote: On Thu, 2009-02-12 at 09:15 -0800, Jesse Barnes wrote: It does, but take a look at that code again. If interrupts are disabled by the timer, we'll capture the frame count. If, sometime later, they're re-enabled, we'll end up in

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-12 Thread Michel Dänzer
On Wed, 2009-02-11 at 14:29 -0800, Jesse Barnes wrote: Michel may want to change this a bit (make the check smaller), but I'd still like something like this to go in. Yeah, as I've explained before, if we're changing this, we might as well go all the way and make it match the 3s timeout as

Re: [PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-12 Thread Jesse Barnes
On Thursday, February 12, 2009 2:11 am Michel Dänzer wrote: On Wed, 2009-02-11 at 14:29 -0800, Jesse Barnes wrote: Michel may want to change this a bit (make the check smaller), but I'd still like something like this to go in. Yeah, as I've explained before, if we're changing this, we might

[PATCH] drm: make drm_wait_vblank return immediately for very old sequence values

2009-02-11 Thread Jesse Barnes
Michel may want to change this a bit (make the check smaller), but I'd still like something like this to go in. The current wait_vblank condition won't return if the wait sequence is more than 8M behind the current counter. This causes problems in the wraparound case, which can happen if vblank