From patchwork Wed Apr 13 08:15:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 703231 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3D8GH3t002188 for ; Wed, 13 Apr 2011 08:16:37 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E15F89F576 for ; Wed, 13 Apr 2011 01:16:16 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (server109-228-6-236.live-servers.net [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 25BF69F5BD for ; Wed, 13 Apr 2011 01:15:43 -0700 (PDT) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.66.37; Received: from arrandale.alporthouse.com (unverified [78.156.66.37]) by fireflyinternet.com (Firefly Internet SMTP) with ESMTP id 31919672-1500050 for multiple; Wed, 13 Apr 2011 09:15:27 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 13 Apr 2011 09:15:29 +0100 Message-Id: <1302682529-18395-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-Originating-IP: 78.156.66.37 Subject: [Intel-gfx] [PATCH] Use SwapbuffersWait config option to control waiting on fullscreen swaps X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 13 Apr 2011 08:16:37 +0000 (UTC) X-MIME-Autoconverted: from base64 to 8bit by demeter1.kernel.org id p3D8GH3t002188 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 Cc: Jesse Barnes Cc: Kristian Høgsberg --- 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");