From patchwork Thu Jul 6 12:58:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9828241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9EA00602BD for ; Thu, 6 Jul 2017 12:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FAB928621 for ; Thu, 6 Jul 2017 12:58:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8466C28628; Thu, 6 Jul 2017 12:58:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 02CF028621 for ; Thu, 6 Jul 2017 12:58:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B1B689DB7; Thu, 6 Jul 2017 12:58:32 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACA2689DB7 for ; Thu, 6 Jul 2017 12:58:31 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id 77so300600wrb.3 for ; Thu, 06 Jul 2017 05:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YZiLC7Kmw7CFatV8W2sABrU+joPaqDoLQreP86sfqxw=; b=H2glGhd8/GPSB8hodTAmrJFPbBzGrMb2Z0i4B2jX+BY5OZp28Mg9ns2jDWAZFFCj5y y+sNGWsfiq1jTrv+rzj/HbK/gL9zTFmjKs/WWEdeRDKQusAMtW/txK45khOvPXUi2U4+ wYOxdRQ2Ay0i8Xb1j166kAOlPRLqbW2y9t8bZ4fsEtm4mbsWZPWO5ToxpgwdqSzwe5+t PAAJCyAqAa7Flyswund1Q7POexeeotCmq9vcswXiUIIyL8TDU/m6uMUbJmJ9ElhcMFKj Dcw1Ey/WQ4RHQ4oqkt3Ho+3SKJx7G6P1k3YjNSULB73y67HyBQltgNWCgtwoex4XQEZK 9Bmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YZiLC7Kmw7CFatV8W2sABrU+joPaqDoLQreP86sfqxw=; b=OHB0FZ8eFzrx+hfBd0g7qmPKybI1ynUxlSUgnifTFpIBS0rLKZs2UJiwMtfCFDbMEJ lagTQ7yeKLQHtbkpD6EY17LWnCwwCr9nuoVSFeu+PIPk4XZel8yjsYrEGnM9hdVH98IL cqzdC3WLlHdbopgaDVySSRm/tYksLe2DLaAuPvNV1BqrTJptCikmhw4gbyz3aeEspi1v 5bWuwqOAW3GRilz41q7bRHPSqAZH85rOu+ynwg4+f0i7Rn7qY0Q5AkSz3zzO6mKeXOLf zD6sMJJrMlEitOFtUQPLhRkd7HGSPs6Xy7FPQm22ufJTIb5k8xtUJyD9X/1dp2WSIRlG 54kA== X-Gm-Message-State: AKS2vOxdfTghs4tPPO1gwiwPATTZVIAl+II//N+XO8knXdzi/xLQvqv9 gE8TPR0z9+XT2/Y0Kdo= X-Received: by 10.223.143.10 with SMTP id p10mr39597846wrb.120.1499345910029; Thu, 06 Jul 2017 05:58:30 -0700 (PDT) Received: from t460p.intel ([95.146.144.225]) by smtp.googlemail.com with ESMTPSA id 1sm296903wmn.32.2017.07.06.05.58.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 05:58:29 -0700 (PDT) To: Mattias Nyman , Chris Wilson References: <149916312833.4151.18216051262642111744@mail.alporthouse.com> From: Tvrtko Ursulin Message-ID: Date: Thu, 6 Jul 2017 13:58:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] TearFree true and Screen Rotation on Skylake X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP On 06/07/17 13:46, Mattias Nyman wrote: > On 4 July 2017 at 12:12, Chris Wilson wrote: >> >> Quoting Mattias Nyman (2017-07-04 10:50:00) >>> Hey! >>> I am unable to rotate my screen to left or right using Skylake Integrated >>> Graphics with the >>> Option TearFree true >>> in the /usr/share/X11/xorg.conf.d/20-intel.conf >>> >>> The screen turns black for a second, before returning to its previous >>> orientation. >>> >>> Terminal output: >>> $ xrandr --output HDMI1 --rotate left >>> xrandr: Configure crtc 0 failed >>> >>> Simply turning the TearFree option to false enables the screen to be rotated >>> again. >>> >>> I have installed the recommended 2017Q1 Intel Graphics Stack. >>> >>> I have described the issue on the linuxgraphics forum where I also included the >>> full 20-intel.conf, lspci -v output and the Xorg.0.log >>> https://01.org/linuxgraphics/forum/update-tool-support-forum/ >>> tearfree-and-screen-rotation >>> >>> Do let me know if I have missed something simple to get this working, or if I >>> can provide any more logs our other output to help with the issue. >> >> commit c62177ec321e009a1abcdc969dd808fb37136013 >> Author: Chris Wilson >> Date: Wed Apr 20 21:31:46 2016 +0100 >> >> sna: Force the shadow buffer even after we fail to set the crtc for TearFree >> >> As the first choice of orientation and tiling may be invalid, e.g. >> left/right rotation on Skylake, we need to force the second pass here to >> try and an alternate non-native rotation. >> > Can confirm this got it working. Installed from the latest commit on > the master branch after verifying the changes in the mentioned commit > were in there. You can also try the below patch for better performance, it will allow hardware rotation to be used: #define USE_SPANS 0 /* -1 force CPU, 1 force GPU */ diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 9fe09fff9218..257b93784579 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -69,8 +69,8 @@ #define FORCE_FLUSH 0 #define FORCE_FULL_SYNC 0 /* https://bugs.freedesktop.org/show_bug.cgi?id=61628 */ -#define DEFAULT_PIXMAP_TILING I915_TILING_X -#define DEFAULT_SCANOUT_TILING I915_TILING_X +#define DEFAULT_PIXMAP_TILING I915_TILING_Y +#define DEFAULT_SCANOUT_TILING I915_TILING_Y #define USE_INPLACE 1