intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use SwapbuffersWait config option to control waiting on fullscreen swaps
@ 2011-04-13  8:15 Chris Wilson
  2011-04-14 19:15 ` Jesse Barnes
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2011-04-13  8:15 UTC (permalink / raw)
  To: intel-gfx

As fullscreen swaps were going via a different path to the swapping of
ordinary windows, we were no longer honouring the xorg.conf option to
disable swapbuffer waiting.

This changes the code to only use pageflipping if the Option
"SwapbuffersWait" is set to "TRUE" (default).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Kristian Høgsberg <krh@bitplanet.net>
---
 src/intel_display.c |    2 +-
 src/intel_dri.c     |    2 +-
 src/intel_driver.c  |    2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/intel_display.c b/src/intel_display.c
index b6592c4..b55b110 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -1607,7 +1607,7 @@ Bool intel_mode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
 	gp.value = &has_flipping;
 	(void)drmCommandWriteRead(intel->drmSubFD, DRM_I915_GETPARAM, &gp,
 				  sizeof(gp));
-	if (has_flipping) {
+	if (has_flipping && intel->swapbuffers_wait) {
 		xf86DrvMsg(scrn->scrnIndex, X_INFO,
 			   "Kernel page flipping support detected, enabling\n");
 		intel->use_pageflipping = TRUE;
diff --git a/src/intel_dri.c b/src/intel_dri.c
index a39b512..cd72f45 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -425,7 +425,7 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 
 	/* Wait for the scanline to be outside the region to be copied */
 	if (pixmap_is_scanout(get_drawable_pixmap(dst)) &&
-	    intel->swapbuffers_wait) {
+	    intel->swapbuffers_wait && INTEL_INFO(intel)->gen < 60) {
 		BoxPtr box;
 		BoxRec crtcbox;
 		int y1, y2;
diff --git a/src/intel_driver.c b/src/intel_driver.c
index e867351..7014198 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -658,8 +658,6 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
 	intel->swapbuffers_wait = xf86ReturnOptValBool(intel->Options,
 						       OPTION_SWAPBUFFERS_WAIT,
 						       TRUE);
-	if (IS_GEN6(intel))
-		intel->swapbuffers_wait = FALSE;
 
 	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Framebuffer %s\n",
 		   intel->tiling & INTEL_TILING_FB ? "tiled" : "linear");
-- 
1.7.4.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] Use SwapbuffersWait config option to control waiting on fullscreen swaps
  2011-04-13  8:15 [PATCH] Use SwapbuffersWait config option to control waiting on fullscreen swaps Chris Wilson
@ 2011-04-14 19:15 ` Jesse Barnes
  2011-04-14 20:08   ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2011-04-14 19:15 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Wed, 13 Apr 2011 09:15:29 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> As fullscreen swaps were going via a different path to the swapping of
> ordinary windows, we were no longer honouring the xorg.conf option to
> disable swapbuffer waiting.
> 
> This changes the code to only use pageflipping if the Option
> "SwapbuffersWait" is set to "TRUE" (default).
> 

I'd rather keep flips in the nowait case, but use async flips instead,
but that requires a kernel change (I thought we had a flip flag for
this but I guess it got lost on its way upstream).

Jesse

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

* Re: [PATCH] Use SwapbuffersWait config option to control waiting on fullscreen swaps
  2011-04-14 19:15 ` Jesse Barnes
@ 2011-04-14 20:08   ` Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2011-04-14 20:08 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Thu, 14 Apr 2011 12:15:54 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Wed, 13 Apr 2011 09:15:29 +0100
> I'd rather keep flips in the nowait case, but use async flips instead,
> but that requires a kernel change (I thought we had a flip flag for
> this but I guess it got lost on its way upstream).

I always thought the restrictions on async pageflips were pretty
horrendous and wasn't sure if it would not cause rebinding our buffers
just when we wanted to flip as fast as possible.

As I look at it though, using SwapbuffersWait to force blits rather than
waits now doesn't preclude us from switching to async pageflips later.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

end of thread, other threads:[~2011-04-14 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13  8:15 [PATCH] Use SwapbuffersWait config option to control waiting on fullscreen swaps Chris Wilson
2011-04-14 19:15 ` Jesse Barnes
2011-04-14 20:08   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).