From patchwork Sun Oct 7 06:38:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 1560601 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 1534E3FC1A for ; Sun, 7 Oct 2012 06:40:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E17979EEF3 for ; Sat, 6 Oct 2012 23:40:35 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.mpg.de (mx1.mpg.de [134.76.10.32]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CD2C9E954 for ; Sat, 6 Oct 2012 23:39:16 -0700 (PDT) X-IronPort-Reputation-Score: None X-IronPort-AV: E=McAfee;i="5400,1158,6857"; a="68975509" X-IronPort-AV: E=Sophos;i="4.80,547,1344204000"; d="scan'208";a="68975509" Received: from smtp-out.tuebingen.mpg.de (HELO tuebingen.mpg.de) ([192.124.26.249]) by mailer1.mpg.de with ESMTP; 07 Oct 2012 08:39:16 +0200 Received: from [10.38.134.15] (account mario.kleiner@tuebingen.mpg.de HELO fir.kyb.local) by tuebingen.mpg.de (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 20975510; Sun, 07 Oct 2012 08:39:16 +0200 From: Mario Kleiner To: intel-gfx@lists.freedesktop.org Date: Sun, 7 Oct 2012 08:38:10 +0200 Message-Id: <1349591890-13732-4-git-send-email-mario.kleiner@tuebingen.mpg.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1349591890-13732-1-git-send-email-mario.kleiner@tuebingen.mpg.de> References: <1349591890-13732-1-git-send-email-mario.kleiner@tuebingen.mpg.de> Cc: daniel.vetter@ffwll.ch, Mario Kleiner Subject: [Intel-gfx] [PATCH 3/3] ddx/dri2: Prevent option 'SwapBuffersWait' from disabling pageflip. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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 Commit 1d102cc6ed21d1c4afa47800eecd24b9d663f689 introduced a change, where setting option 'SwapBuffersWait' to 'off' disables kms pageflipping of fullscreen windows. Afaics this change had no benefit, but only downsides: 1. Apps which don't want to throttle their swaps to video refresh rate and therefore set swap_limit to zero, will run through the non-vsynced, tearing copyswap path, as before the change. 2. Apps which set their swap_limit > 0, because they want throttled and vsynced swaps, will still get throttled to video refresh rate, regardless of the 'SwapBuffersWait' 'off', because their swaps are still scheduled via the normal kernel vblank events path, as before the change. The only differences are that more inefficient copyswaps instead of kms pageflips are used for fullscreen drawables, timestamping gets unreliable and tearing is present at the top of the screen due to lack of vsync. Therefore no longer disable pageflipping if SwapBuffersWait is off. Signed-off-by: Mario Kleiner --- src/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel_display.c b/src/intel_display.c index b2a5904..ac3dd8f 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -1731,7 +1731,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 && intel->swapbuffers_wait) { + if (has_flipping) { xf86DrvMsg(scrn->scrnIndex, X_INFO, "Kernel page flipping support detected, enabling\n"); intel->use_pageflipping = TRUE;