All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/nouveau: wait for vblank on page flipping
@ 2013-03-28 15:16 Maarten Lankhorst
       [not found] ` <51545EE3.8020406-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Maarten Lankhorst @ 2013-03-28 15:16 UTC (permalink / raw)
  To: nouveau; +Cc: dri-devel@lists.freedesktop.org

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
Oops, fixed to apply this time..

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 4610c3a..020542e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/nouveau: wait for vblank on page flipping
       [not found] ` <51545EE3.8020406-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2013-03-28 21:33   ` Peter Hurley
  2013-03-29  2:20     ` [Nouveau] " Ben Skeggs
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Hurley @ 2013-03-28 21:33 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org

On Thu, 2013-03-28 at 16:16 +0100, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> ---
> Oops, fixed to apply this time..
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index 4610c3a..020542e 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -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?

>  		if (ret) {
>  			mutex_unlock(&chan->cli->mutex);
>  			goto fail_unreserve;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Nouveau] [PATCH v2] drm/nouveau: wait for vblank on page flipping
  2013-03-28 21:33   ` Peter Hurley
@ 2013-03-29  2:20     ` Ben Skeggs
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Skeggs @ 2013-03-29  2:20 UTC (permalink / raw)
  To: Peter Hurley; +Cc: nouveau, dri-devel@lists.freedesktop.org

On Fri, Mar 29, 2013 at 7:33 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
> On Thu, 2013-03-28 at 16:16 +0100, Maarten Lankhorst wrote:
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>> ---
>> Oops, fixed to apply this time..
>>
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
>> index 4610c3a..020542e 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
>> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
>> @@ -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?
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.

>
>>               if (ret) {
>>                       mutex_unlock(&chan->cli->mutex);
>>                       goto fail_unreserve;
>
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-29  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 15:16 [PATCH v2] drm/nouveau: wait for vblank on page flipping Maarten Lankhorst
     [not found] ` <51545EE3.8020406-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-03-28 21:33   ` Peter Hurley
2013-03-29  2:20     ` [Nouveau] " Ben Skeggs

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.