drm/nouveau: wait for vblank on page flipping
Subsystems (3)
PATCH v2 1/1 drm/nouveau: wait for vblank on page flipping
---
Oops, fixed to apply this time..
drivers/gpu/drm/nouveau/nouveau_display.c +1 -1
@@ -593,7 +597,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,/* Emit a page flip */ if (nv_device (drm->device)->card_type >=NV_50 ) { - ret =nv50_display_flip_next (crtc, fb, chan,0 ); + ret =nv50_display_flip_next (crtc, fb, chan,1 );if (ret) {mutex_unlock (&chan->cli->mutex); goto fail_unreserve;
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Maarten Lankhorst
Signed-off-by Maarten Lankhorst <[email protected]>---
Oops, fixed to apply this time..drivers/gpu/drm/nouveau/nouveau_display.c +0
-0
drivers/gpu/drm/nouveau/nouveau_display.c nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · line 600
Quoted 5 lines
drivers/gpu/drm/nouveau/nouveau_display.c +1
-1@@ -593,7 +597,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,/* Emit a page flip */ if (nv_device (drm->device)->card_type >=NV_50 ) { - ret =nv50_display_flip_next (crtc, fb, chan,0 ); + ret =nv50_display_flip_next (crtc, fb, chan,1 );
Why would this work?
Quoted 3 lines
drivers/gpu/drm/nouveau/nouveau_display.c +0
-0if (ret) {mutex_unlock (&chan->cli->mutex); goto fail_unreserve;
Quoted 11 lines · Peter Hurley
Quoted 10 lines · Maarten Lankhorst
Signed-off-by Maarten Lankhorst <[email protected]>---
Oops, fixed to apply this time..drivers/gpu/drm/nouveau/nouveau_display.c +0
-0@@ -593,7 +597,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
Quoted 6 lines
drivers/gpu/drm/nouveau/nouveau_display.c nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · line 600
Quoted 4 lines
drivers/gpu/drm/nouveau/nouveau_display.c +1
-1/* Emit a page flip */ if (nv_device (drm->device)->card_type >=NV_50 ) { - ret =nv50_display_flip_next (crtc, fb, chan,0 ); + ret =nv50_display_flip_next (crtc, fb, chan,1 );Why would this work?
Because, when I added the code to support all this I kept it in mind and added a switch to use it.
Now. The reason I never switched this on is that (as I *already* mentioned in #nouveau to Maarten about another patch to enable vblank unconditionally in the DDX.......) we already have huge problems with memory bandwidth due to our cards usually starting up at low clock speeds. When I added page flipping support it made a huge difference to some games etc that were barely playable before.
So, it'd be really nice to be able to do this, yes. But, before I'll accept the patches a few things need to happen. I'd have done it before, but, I've always had higher priority things in the way (like, fixing the reclocking issue...)..
1. Fix the X server so that the page flipping path (dri2.c, line 1125) will be called even if theres no swap_interval set, this will allow page flipping to be used even in the absence of a sync-to-vblank request too.
2. Remove the GLXVBlank option from the nouveau ddx completely, default it to on. The application/user can now control it via other means anyway (drawable swap_interval).
3. Fix the DRM page flip ioctl to take a flag to request a non-vsync'd flip, and hook that bit up to the nv50_display_flip_next() call
I think that's everything... This will let us support both the speed improvements from flipping, and sync-to-vblank as the user chooses.
Ben.
Quoted 10 lines
drivers/gpu/drm/nouveau/nouveau_display.c nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · line 603
Quoted 4 lines
drivers/gpu/drm/nouveau/nouveau_display.c +0
-0if (ret) {mutex_unlock (&chan->cli->mutex); goto fail_unreserve;_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau