[Intel-gfx] TearFree true and Screen Rotation on Skylake

Tvrtko Ursulin tursulin at ursulin.net
Thu Jul 6 12:58:28 UTC 2017


On 06/07/17 13:46, Mattias Nyman wrote:
> On 4 July 2017 at 12:12, Chris Wilson <chris at chris-wilson.co.uk> 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 <chris at chris-wilson.co.uk>
>> 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:

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
  #define USE_SPANS 0 /* -1 force CPU, 1 force GPU */


More information about the Intel-gfx mailing list