diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/benchmarks/.gitignore xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/benchmarks/.gitignore --- xserver-xorg-video-intel-2.99.917+git20170309/benchmarks/.gitignore 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/benchmarks/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -dri2-swap -dri3-swap diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/changelog xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/changelog --- xserver-xorg-video-intel-2.99.917+git20170309/debian/changelog 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/changelog 2017-10-18 20:04:25.000000000 +0000 @@ -1,330 +1,19 @@ -xserver-xorg-video-intel (2:2.99.917+git20170309-0ubuntu1) zesty; urgency=medium +xserver-xorg-video-intel (2:2.99.917+git1710181804.4798e18~a~padoka0) artful; urgency=medium - * Merge from Debian git, remaining changes: - - install dri3info - - build against renamed libxcb-util-dev - * revert-dpms-fix.patch: Dropped, this driver is not used by default - anymore, so lessen the maintenance burden. + * Checkout from master git branch up to commit + 4798e18b2b2c8b0a05dc967e6140fd9962bc1a73 - -- Timo Aaltonen Thu, 09 Mar 2017 11:39:09 +0200 + * enabled DRI3 by default -xserver-xorg-video-intel (2:2.99.917+git20170309-1) UNRELEASED; urgency=medium + -- Paulo Dias Wed, 18 Oct 2017 18:04:25 -0200 - * New upstream snapshot. +xserver-xorg-video-intel (2:2.99.917+git1412301240.0d42b0e~padoka0) utopic; urgency=medium - -- Timo Aaltonen Thu, 09 Mar 2017 11:24:07 +0200 + * Checkout from master git branch up to commit + 0d42b0ed25d4112e0b3e3218e5c42947bbeb9e27 + * enabled dri3, nodes, swap -xserver-xorg-video-intel (2:2.99.917+git20161206-1) unstable; urgency=medium - - [ Andreas Boll ] - * New upstream snapshot. - - sna: Add missing NULL check for readdir result in - has_connector_backlight (Closes: #847073). Thanks to James Clarke for - tracking this down. - * Bump debhelper compat to 10. - * Stop passing --disable-silent-rules to configure, debhelper does - that for a while. - * debhelper installs to debian/tmp by default, no need to specify it. - * Update a bunch of URLs in packaging to https. - - -- Timo Aaltonen Wed, 14 Dec 2016 11:33:01 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20161105-1) unstable; urgency=medium - - * New upstream snapshot. - * control: Bump policy to 3.9.8, no changes. - - -- Timo Aaltonen Thu, 17 Nov 2016 12:44:07 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160706-1ubuntu1) yakkety; urgency=medium - - * Merge from Debian. - - -- Timo Aaltonen Wed, 06 Jul 2016 22:40:09 +0300 - -xserver-xorg-video-intel (2:2.99.917+git20160706-1) unstable; urgency=medium - - * New upstream snapshot. - * fix-fd-leak-when-intel-scrn-create-fails.diff, sna-let-modesetting- - handle-gen9+.diff: Dropped as the fallback to modesetting will be - fully handled in the xserver. - * .docs: Include a minimal xorg.conf. - - -- Timo Aaltonen Wed, 06 Jul 2016 22:34:40 +0300 - -xserver-xorg-video-intel (2:2.99.917+git20160522-1ubuntu1) yakkety; urgency=medium - - * Merge from Debian. - * install-dri3info.diff: Install dri3info with the driver, add libxcomposite-dev - to build-depends. - - -- Timo Aaltonen Tue, 05 Apr 2016 13:11:57 +0300 - -xserver-xorg-video-intel (2:2.99.917+git20160522-1) unstable; urgency=medium - - * New upstream snapshot. (Closes: #823116) - * fix-fd-leak-when-intel-scrn-create-fails.diff: Fix a failure falling back - on another driver when scrn create fails. - - -- Timo Aaltonen Tue, 24 May 2016 11:40:02 +0300 - -xserver-xorg-video-intel (2:2.99.917+git20160325-1ubuntu1) xenial; urgency=medium - - * Merge from Debian. - - -- Timo Aaltonen Tue, 05 Apr 2016 11:44:56 +0300 - -xserver-xorg-video-intel (2:2.99.917+git20160325-1) unstable; urgency=medium - - * New upstream snapshot. - - -- Timo Aaltonen Tue, 29 Mar 2016 10:29:35 +0300 - -xserver-xorg-video-intel (2:2.99.917+git20160307-2) unstable; urgency=medium - - * Disable the patch to use modesetting on skylake for now, since it reveals - modeset/server bugs. (Closes: #817784) - - -- Timo Aaltonen Thu, 10 Mar 2016 22:16:19 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160307-1) unstable; urgency=medium - - [ Timo Aaltonen ] - * New upstream snapshot. - * control: Update the description, older hw likely still wants this - driver. - * sna-let-modesetting-handle-gen9+.diff: Use modesetting+glamor on - Skylake and up. - - [ Matthias Klose ] - * Move the shared libraries into multiarch libdir. - * rules: Enable parallel builds. - - -- Timo Aaltonen Wed, 09 Mar 2016 21:26:17 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160218-1ubuntu3) xenial; urgency=medium - - * Rebuild against new xserver. - - -- Timo Aaltonen Thu, 03 Mar 2016 16:21:42 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160218-1ubuntu2) xenial; urgency=medium - - * Move the shared libraries into the multiarch libdir. - * Enable parallel builds. - - -- Matthias Klose Fri, 26 Feb 2016 16:24:05 +0100 - -xserver-xorg-video-intel (2:2.99.917+git20160218-1ubuntu1) xenial; urgency=medium - - * Merge from Debian. - - -- Timo Aaltonen Fri, 19 Feb 2016 00:18:14 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160218-1) unstable; urgency=medium - - * New upstream snapshot. - - -- Timo Aaltonen Fri, 19 Feb 2016 00:06:43 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160127-1ubuntu1) xenial; urgency=medium - - * Merge from debian. - - -- Timo Aaltonen Tue, 02 Feb 2016 18:39:09 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20160127-1) unstable; urgency=medium - - * New upstream snapshot. - * control: Document build-depends for dri3info and tests, benchmarks. - * control: Update description to mention that this driver is - deprecated in favor of -modesetting. - * rules: Use upstream-unstable branch to build a snapshot tarball. - * control: Add libxss-dev to build-depends for intel-virtual-output. - - -- Timo Aaltonen Wed, 27 Jan 2016 14:56:38 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20151217-1~exp1ubuntu1) xenial; urgency=medium - - * Merge from debian. - * Refresh revert-dpms-fix.patch. - - -- Timo Aaltonen Thu, 17 Dec 2015 15:43:05 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20151217-1~exp1) experimental; urgency=medium - - * New upstream snapshot. - - -- Timo Aaltonen Thu, 17 Dec 2015 15:10:01 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20151019-1~exp1ubuntu1) xenial; urgency=medium - - * Merge from Debian experimental. - * Drop sna-check-for-system-memory-contents.diff, randr.patch. Upstream. - - -- Timo Aaltonen Wed, 28 Oct 2015 07:50:57 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20151019-1~exp1) experimental; urgency=medium - - * New upstream snapshot. - * rules: Fix valgrind-enabling check. - * README.source: Mention that dpkg-source complains about symlinks - which are real files on the tarball, and add a command to clean - those before source build (copied from libdrm). - * patches: Dropped, all upstream. - - -- Timo Aaltonen Tue, 27 Oct 2015 19:07:45 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu4) wily; urgency=medium - - * debian/patches/randr.patch: - - Combine upstream RandR changes to fix hotplug events not working - (LP: #1505695) - - -- Robert Ancell Wed, 14 Oct 2015 14:59:19 +0100 - -xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu3) wily; urgency=medium - - * debian/patches/revert-dpms-fix.patch: - - Revert a DPMS change that causes the screen to turn off when returning - from a greeter (LP: #1501941) - - -- Robert Ancell Tue, 06 Oct 2015 14:25:00 +1300 - -xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu2) wily; urgency=medium - - * Rebuild for libxcb-util. - * libxcb-util0-dev -> libxcb-util-dev. - - -- Matthias Klose Tue, 01 Sep 2015 13:12:05 +0200 - -xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu1) wily; urgency=medium - - [ Robert Hooker ] - * Merge from debian-experimental - - debian/patches/fix-sna-external-slave-rotation.patch - debian/patches/fix-sna-fstat-include.patch - debian/patches/fix-uxa-fstat-include.patch - debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch - debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff - Drop all upstream patches. - - [ Timo Aaltonen ] - * sna-check-for-system-memory-contents.diff: Fix corruption on - lightdm, while logging in and blank background on unity. - - -- Timo Aaltonen Thu, 20 Aug 2015 14:14:34 +0300 - -xserver-xorg-video-intel (2:2.99.917-2) unstable; urgency=medium - - [ Robert Ancell ] - * debian/patches/fix-sna-fstat-include.patch: - * debian/patches/fix-uxa-fstat-include.patch: - - Fix missing include for fstat (Closes: #790911) - - [ Alessio Treglia ] - * fix-yuv-to-rgb-shared-on-intel-gen8.patch: Fix faulty yuv2rgb translation - on Intel Generation 8 Graphics. (LP: #1449892, Closes: #787142) - - [ Timo Aaltonen ] - * rules: Fix valgrind-enabling check. - * source: Add extend-diff-ignore to not complain about symlinks. - * README.source: Mention that dpkg-source complains about symlinks - which are real files on the tarball, and add a command to clean - those before source build (copied from libdrm). - - [ Adam Borowski ] - * Add x32 to the list of architectures. (Closes: #775200) - - [ Vincent Cheng ] - * Explicitly declare source format 1.0. - * Update valgrind build-dependency architecture list. - - -- Vincent Cheng Thu, 16 Jul 2015 01:00:41 -0700 - -xserver-xorg-video-intel (2:2.99.917-1ubuntu1) wily; urgency=medium - - * Merge with Debian, remaining Ubuntu changes: - * debian/rules: - - Fix valgrind-enabling check (DEB_HOST_ARCH_OS instead of DEB_HOST_ARCH) - - Use SNA by default. - - Fix rotating external display with optimus results in corruption. - * debian/patches/fix-sna-fstat-include.patch: - * debian/patches/fix-uxa-fstat-include.patch: - - Fix missing include for fstat - * debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch: - - Fix faulty yuv2rgb translation on Intel Generation 8 Graphics. - * debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff: - - Fix rotation on SKL. - - -- Robert Ancell Tue, 14 Jul 2015 15:21:57 +1200 - -xserver-xorg-video-intel (2:2.99.917-1) unstable; urgency=medium - - * Upload to unstable. (Closes: #748753) - - -- Vincent Cheng Thu, 07 May 2015 00:46:06 -0700 - -xserver-xorg-video-intel (2:2.99.917-1~exp1) experimental; urgency=medium - - * New upstream prerelease 2.99.917. - * Update upstream changelog. - * Update to Standards version 3.9.6. - - -- Vincent Cheng Sun, 21 Dec 2014 21:37:27 -0800 - -xserver-xorg-video-intel (2:2.99.916+git20141119-1~exp1ubuntu1) vivid; urgency=medium - - * Merge from debian experimental (LP: #1401784, #1401788) - * Drop upstream patches. - - -- Timo Aaltonen Fri, 12 Dec 2014 09:24:52 +0200 - -xserver-xorg-video-intel (2:2.99.916+git20141119-1~exp1) experimental; urgency=medium - - * New upstream snapshot. - - -- maximilian attems Sun, 23 Nov 2014 00:04:02 +0100 - -xserver-xorg-video-intel (2:2.99.916-1~exp1) experimental; urgency=medium - - [ Vincent Cheng ] - * New upstream prerelease 2.99.916. - - sna: Add the current CRTC mode last (Closes: #750605) - * Update debian/copyright. (Closes: #730643) - * Revert to source format 1.0. - - [ Laurent Bigonville ] - * debian/xserver-xorg-video-intel.maintscript: Explicitly remove - i915-kms.conf on upgrade. (Closes: #713340) - - -- Vincent Cheng Sun, 14 Sep 2014 01:29:56 -0700 - -xserver-xorg-video-intel (2:2.99.914-1~exp1ubuntu6) vivid; urgency=medium - - * Actually add the previous patch to series this time. - - -- Timo Aaltonen Thu, 06 Nov 2014 13:41:47 +0200 - -xserver-xorg-video-intel (2:2.99.914-1~exp1ubuntu5) vivid; urgency=medium - - * sna-use-vmask-in-3dstate-ps.diff: Fix GPU hang on BDW with xvideo. - (LP: #1390016) - - -- Timo Aaltonen Thu, 06 Nov 2014 13:17:05 +0200 - -xserver-xorg-video-intel (2:2.99.914-1~exp1ubuntu4) utopic; urgency=medium - - * Fix a crash when fglrx steals the screen in DGPU or IGPU mode. - - fix-uxa-fglrx-stealing.diff - - -- Maarten Lankhorst Thu, 09 Oct 2014 09:39:17 +0200 - -xserver-xorg-video-intel (2:2.99.914-1~exp1ubuntu3) utopic; urgency=medium - - * Add patch to enable SNA with fglrx. (LP: #1359105) - - -- Maarten Lankhorst Mon, 22 Sep 2014 15:29:05 +0200 + -- Paulo Dias Tue, 30 Dec 2014 12:41:29 -0200 xserver-xorg-video-intel (2:2.99.914-1~exp1ubuntu2) utopic; urgency=medium diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/compat xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/compat --- xserver-xorg-video-intel-2.99.917+git20170309/debian/compat 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/compat 2014-09-18 08:11:22.000000000 +0000 @@ -1 +1 @@ -10 +8 diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/control xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/control --- xserver-xorg-video-intel-2.99.917+git20170309/debian/control 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/control 2017-08-22 20:03:18.000000000 +0000 @@ -9,9 +9,11 @@ maximilian attems , Vincent Cheng , Build-Depends: - debhelper (>= 10), + debhelper (>= 8), + dh-autoreconf, pkg-config, - xserver-xorg-dev (>= 2:1.11.99.901), +# Depend on latest server to ensure XMir support + xserver-xorg-dev (>= 2:1.14.2.901-2ubuntu4~), x11proto-core-dev, x11proto-fonts-dev, x11proto-xinerama-dev, @@ -31,13 +33,14 @@ libxext-dev, libxfixes-dev, libx11-xcb-dev, - libxcb-util-dev, + libxcb-util0-dev, libxcb-dri2-0-dev, # end xvmc libudev-dev [linux-any], - quilt, + dpkg-dev (>= 1.14.17), + quilt (>= 0.46-7~), xutils-dev (>= 1:7.5+4), - valgrind [amd64 arm64 armhf i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el s390x x32], + valgrind [amd64 armel armhf i386 mips mipsel powerpc s390x], # intel-virtual-output: libxinerama-dev, libxrandr-dev, @@ -46,19 +49,14 @@ libxtst-dev, libxrender-dev, libpixman-1-dev, - libxss-dev, -# dri3info: - libxcomposite-dev, -# tests, benchmarks: -# libcairo2-dev, -# libpng12-dev, -Standards-Version: 3.9.8 -Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/driver/xserver-xorg-video-intel.git -Vcs-Browser: https://anonscm.debian.org/git/pkg-xorg/driver/xserver-xorg-video-intel.git -Homepage: https://www.x.org/ + libxfont1-dev, +Standards-Version: 3.9.5 +Vcs-Git: git://anonscm.debian.org/pkg-xorg/driver/xserver-xorg-video-intel +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-xorg/driver/xserver-xorg-video-intel.git +Homepage: http://www.x.org/ Package: xserver-xorg-video-intel -Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 x32 +Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 Depends: ${shlibs:Depends}, ${misc:Depends}, @@ -74,13 +72,9 @@ for i810/i815 and i9xx and newer chipsets. . This package is built from the X.org xf86-video-intel driver module. - . - The use of this driver is discouraged if your hw is new enough (ca. - 2007 and newer). You can try uninstalling this driver and let the - server use it's builtin modesetting driver instead. Package: xserver-xorg-video-intel-dbg -Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 x32 +Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 Depends: xserver-xorg-video-intel (= ${binary:Version}), ${shlibs:Depends}, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/copyright xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/copyright --- xserver-xorg-video-intel-2.99.917+git20170309/debian/copyright 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/copyright 2014-09-18 08:11:22.000000000 +0000 @@ -1,5 +1,5 @@ This package was downloaded from -https://xorg.freedesktop.org/releases/individual/driver/ +http://xorg.freedesktop.org/releases/individual/driver/ This copyright file is based on xf86-video-intel 2.3.1. @@ -57,19 +57,17 @@ The copyright holders are: * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas: -src/legacy/i810/i810_accel.c -src/legacy/i810/i810_wmark.c -src/legacy/i810/i810_reg.h -src/legacy/i810/i810_driver.c -src/legacy/i810/i810_memory.c -src/legacy/i810/i810_cursor.c -src/legacy/i810/i810_xaa.c +src/i810_accel.c +src/i810_wmark.c +src/i810_reg.h +src/i810_driver.c +src/i810_memory.c +src/i810_io.c +src/i810_cursor.c +src/i830_accel.c src/i830_xaa.c src/i830_exa.c -* Copyright © 1999 Keith Packard -src/uxa/uxa-unaccel.c - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc. src/xvmc/xf86dri.h @@ -77,81 +75,51 @@ * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2002 David Dawes -src/uxa/intel_memory.c +src/i830_memory.c +src/i830.h src/i830_ring.h src/i830_cursor.c -src/legacy/i810_ring.h -src/legacy/i810.h -src/uxa/common.h +src/i810_ring.h +src/i810.h +src/common.h src/xvmc/xf86dristr.h -src/uxa/intel.h -src/uxa/intel_batchbuffer.h - -* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -* Copyright © 2010 Intel Corporation -src/intel_module.c * Copyright 2000 Intel Corporation. All Rights Reserved: -src/legacy/i810_hwmc.c -src/legacy/i810_video.c -src/uxa/intel_video.c -src/uxa/intel_video.h -src/sna/sna_video.h - -* Copyright ® 2001 Keith Packard -src/uxa/uxa-accel.c -src/uxa/uxa-render.c -src/uxa/uxa.c +src/i810_hwmc.c +src/i830_video.h +src/i810_video.c +src/i830_video.c * Copyright 2001 Intel Corporation. All Rights Reserved. -src/legacy/i810/xvmc/I810XvMC.h -src/legacy/i810/xvmc/I810XvMC.c +src/xvmc/I810XvMC.h +src/xvmc/I810XvMC.c * Copyright 2001 VA Linux Systems Inc., Fremont, California. -* Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas. -src/i830_common.h - -* Copyright 2001 VA Linux Systems Inc., Fremont, California * Copyright 2002 by David Dawes -src/sna/sna_dri.c -src/uxa/intel_dri.c -src/uxa/intel_driver.c - -* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas -* Copyright 2002 David Dawes -src/sna/sna.h +src/i830_dri.c +src/i830_driver.c -* Copyright 2000 Intel Corporation. All Rights Reserved -* Copyright 2002 by Alan Hourihane and David Dawes -src/sna/sna_video.c - -* Copyright 2001 VA Linux Systems Inc., Fremont, California -* Copyright 2002 by David Dawes -src/sna/sna_driver.c +* Copyright 2001 VA Linux Systems Inc., Fremont, California. +* Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas. +src/i830_common.h * Copyright 2002 David Dawes * Copyright 2006 Intel Corporation src/i830_modes.c * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. -src/legacy/i810_common.h +src/i810_common.h * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. -src/uxa/i830_reg.h -src/uxa/i830_3d.c -src/uxa/i915_reg.h -src/uxa/i965_reg.h -src/sna/gen2_render.h -src/sna/gen3_render.h -src/sna/gen4_render.h -src/sna/gen5_render.h -xvmc/i830_reg.h -xvmc/i915_reg.h -xvmc/intel_batchbuffer.c +src/i830_reg.h +src/i830_3d.c +src/i915_3d.c +src/i915_reg.h +src/xvmc/intel_batchbuffer.c * Copyright 2005 Tungsten Graphics, Inc., Cedar Park, Texas. -src/uxa/brw_structs.h -src/uxa/brw_defines.h +src/brw_structs.h +src/brw_defines.h * Copyright 2005 Red Hat, Inc. src/i830_io.c @@ -162,10 +130,6 @@ * Copyright (c) 2005 Jesse Barnes src/i830_exa.c -* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas -* Copyright 2005 Jesse Barnes -src/uxa/intel_uxa.c - * Copyright 2005 Thomas Hellstrom. All rights reserved. src/xvmc/driDrawable.c src/xvmc/driDrawable.h @@ -188,14 +152,14 @@ src/ch7xxx/ch7xxx.h * Copyright 2006 Intel Corporation: -xvmc/i915_xvmc.c -xvmc/i915_xvmc.h -xvmc/i915_structs.h +src/xvmc/i915_xvmc.c +src/xvmc/i915_xvmc.h +src/xvmc/i915_structs.h src/i915_hwmc.h -src/uxa/i915_video.c -src/uxa/i915_3d.h -src/uxa/i915_render.c -src/uxa/intel_batchbuffer.c +src/i915_hwmc.c +src/i915_video.c +src/i915_render.c +src/i915_3d.h src/exa_wm.g4i src/exa_wm_src_sample_argb.g4a src/exa_wm_mask_affine.g4a @@ -222,13 +186,14 @@ src/i830_crt.c src/i830_display.c src/i830_sdvo_regs.h -src/uxa/i830_render.c +src/i830_render.c src/i830_tv.c src/i830_display.h src/i830_debug.h src/packed_yuv_sf.g4a src/packed_yuv_wm.g4a -src/uxa/i965_video.c +src/i965_video.c +src/i965_render.c src/ch7017/ch7017.c src/ch7017/ch7017_reg.h src/sil164/Makefile.am @@ -236,222 +201,24 @@ src/ivch/ivch.c src/ivch/ivch_reg.h src/ivch/ivch_module.c -src/sna/brw/brw_eu.c -src/sna/brw/brw_eu.h -src/sna/brw/brw_emit.c * Copyright 2007 Intel Corporation: src/bios_reader/bios_dumper.c src/bios_reader/bios_reader.c +src/i830_hwmc.h +src/i830_hwmc.c src/i830_quirks.c -xvmc/intel_xvmc.c -xvmc/intel_xvmc.h -xvmc/intel_xvmc_private.h -src/sna/sna_video_hwmc.c -src/sna/sna_video_hwmc.h -src/uxa/intel_hwmc.c +src/xvmc/intel_xvmc.c +src/xvmc/intel_xvmc.h * Copyright 2007 Dave Mueller src/tfp410/tfp410.c src/tfp410/tfp410.h src/tfp410/tfp410_reg.h -* Copyright 2007 Red Hat, Inc -src/uxa/intel_display.c - -* Copyright 2007 Red Hat, Inc -* Copyright 2006,2008 Intel Corporation -src/uxa/i965_render.c - -* Copyright © 2008 Intel Corporation -xvmc/i965_xvmc.c -xvmc/intel_xvmc_dump.c - -* Copyright © 2008 Keith Packard -src/sna/brw/brw_disasm.c - -* Copyright © 2000,2008 Keith Packard -* Copyright 2005 Zack Rusin, Trolltech -src/uxa/uxa-priv.h - -* Copyright © 2000, 2008 Keith Packard -* Copyright 2004 Eric Anholt -* Copyright 2005 Zack Rusin -src/uxa/uxa.h - - -* Copyright © 2009 Intel Corporation -src/sna/atomic.h -xvmc/xvmc_vld.c - -* Copyright © 2010-2012 Intel Corporation -* Copyright © 2010 Francisco Jerez -src/intel_list.h - -* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. All Rights Reserved -* Copyright 2005 Jesse Barnes -* Copyright 2010 Intel Corporation -src/sna/sna_transform.c - -* Copyright © 2006,2010 Intel Corporation -src/uxa/i915_3d.h - -* Copyright 2010 Intel Corporation -src/render_program/exa_wm_mask_affine.g5a -src/render_program/exa_wm_mask_affine.g6a -src/render_program/exa_wm_mask_affine.g7a -src/render_program/exa_wm_mask_projective.g6a -src/render_program/exa_wm_mask_projective.g7a -src/render_program/exa_wm_src_affine.g5a -src/render_program/exa_wm_src_affine.g6a -src/render_program/exa_wm_src_affine.g7a -src/render_program/exa_wm_src_projective.g6a -src/render_program/exa_wm_src_projective.g7a -src/sna/sna_gradient.c -src/sna/sna_tiling.c -src/uxa/uxa-glyphs.c - -* Copyright 2010-2011 Intel Corporation -src/render_program/exa_wm_affine.g6i -src/sna/gen3_render.c - -* Copyright 2000-2011 Intel Corporation. All Rights Reserved -src/sna/sna_video_overlay.c -src/sna/sna_video_sprite.c -src/sna/sna_video_textured.c - -* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas -* Copyright 2005 Jesse Barnes -* Copyright 2009-2011 Intel Corporation -src/sna/sna_blt.c - -* Copyright 2007 Red Hat, Inc -* Copyright 2006,2008,2011 Intel Corporation -src/sna/gen4_render.c -src/sna/gen5_render.c -src/sna/gen7_render.c -src/sna/gen6_render.c - -* Copyright 2006,2011 Intel Corporation -src/sna/gen2_render.c - -* Copyright 2007-2011 Intel Corporation -src/sna/kgem_debug.c -src/sna/kgem_debug_gen2.c -src/sna/kgem_debug_gen3.c -src/sna/kgem_debug_gen4.c -src/sna/kgem_debug_gen5.c -src/sna/kgem_debug_gen6.c -src/sna/kgem_debug_gen7.c - -* Copyright 2007 David Turner -* Copyright 2008 M Joonas Pihlaja -* Copyright 2011 Intel Corporation -src/sna/sna_trapezoids_precise.c -src/sna/sna_trapezoids.c -src/sna/sna_trapezoids_boxes.c -src/sna/sna_trapezoids_imprecise.c -src/sna/sna_trapezoids_mono.c - - - -* Copyright © 2011 Intel Corporation -src/sna/blt.c -src/sna/brw/brw_test.c -src/sna/brw/brw_test.h -src/sna/brw/brw_test_gen4.c -src/sna/brw/brw_test_gen5.c -src/sna/brw/brw_test_gen6.c -src/sna/brw/brw_test_gen7.c -src/sna/compiler.h -src/sna/kgem.c -src/sna/kgem.h -src/sna/sna_accel.c -src/sna/sna_composite.c -src/sna/sna_damage.c -src/sna/sna_io.c -src/sna/sna_render.c -src/sna/sna_stream.c -src/uxa/i965_3d.c -src/uxa/intel_glamor.c -src/uxa/intel_glamor.h - -* Copyright © 1998 Keith Packard -* Copyright © 2012 Intel Corporation -src/sna/fb/fb.h -src/sna/fb/fbarc.c -src/sna/fb/fbarcbits.h -src/sna/fb/fbbitmap.c -src/sna/fb/fbblt.c -src/sna/fb/fbbltone.c -src/sna/fb/fbcopy.c -src/sna/fb/fbfill.c -src/sna/fb/fbgc.c -src/sna/fb/fbglyph.c -src/sna/fb/fbglyphbits.h -src/sna/fb/fbimage.c -src/sna/fb/fbline.c -src/sna/fb/fblinebits.h -src/sna/fb/fbpoint.c -src/sna/fb/fbpointbits.h -src/sna/fb/fbpush.c -src/sna/fb/fbrop.h -src/sna/fb/fbseg.c -src/sna/fb/fbsegbits.h -src/sna/fb/fbspan.c -src/sna/fb/fbstipple.c -src/sna/fb/fbtile.c -src/sna/fb/fbutil.c - -* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. -* Copyright © 2012 Intel Corporation -src/sna/fb/fbpict.h - -* Copyright © 2000 SuSE, Inc. -* Copyright © 2007 Red Hat, Inc. -* Copyright © 2012 Intel Corporation -src/sna/fb/fbpict.c - -* Copyright 2000 SuSE, Inc -* Copyright 2008 Red Hat, Inc -* Copyright 2010 Intel Corporation -src/sna/sna_glyphs.c - -* Copyright 2012 Red Hat, Inc. -src/compat-api.h -src/sna/fb/fbclip.c -src/sna/fb/fbclip.h - -* Copyright 2012 Intel Corporation -src/sna/gen4_vertex.c - -* Copyright 2013 Intel Corporation -src/i915_pciids.h -src/intel_device.c -src/sna/sna_acpi.c -src/sna/sna_cpu.c -src/sna/sna_cpuid.h -src/sna/sna_display_fake.c -src/sna/sna_threads.c -src/sna/sna_vertex.c -tools/virtual.c - -* Copyright 2007 Red Hat, Inc -* Copyright 2013 Intel Corporation -src/sna/sna_display.c - -* Copyright 2011,2012,2013 Intel Corporation -src/sna/gen4_source.c - -* Copyright 2011-2013 Intel Corporation -src/sna/gen4_common.c -src/sna/gen4_common.h -src/sna/gen6_common.c -src/sna/gen6_common.h - ==== -src/legacy/i810_dga.c is Copyright 2000 by Alan Hourihane, Sychdyn, North Wales, UK +src/i810_dga.c is Copyright 2000 by Alan Hourihane, Sychdyn, North Wales, UK and covered by the following license: - @@ -624,38 +391,13 @@ src/tfp410/tfp410_module.c src/ch7xxx/ch7xxx_module.c src/ch7017/ch7017_module.c -xvmc/i915_program.h -xvmc/intel_batchbuffer.h +src/xvmc/i915_program.h +src/xvmc/intel_batchbuffer.h src/scripts/clock-graph.5c src/scripts/clock.5c src/scripts/fix.5c src/scripts/tv.5c src/sil164/sil164_module.c -src/legacy/i810_dri.h -src/legacy/i810_dri.c +src/i810_dri.h +src/i810_dri.c src/i830_dri.h - -src/intel_driver.h -src/intel_options.[ch] -src/legacy/legacy.h -src/sna/brw/brw.h -src/sna/brw/brw_sf.c -src/sna/brw/brw_wm.c -src/sna/fb/sfb.h - -src/sna/gen4_source.h -src/sna/gen4_vertex.h -src/sna/gen6_render.h -src/sna/gen7_render.h -src/sna/kgem_debug.h -src/sna/rop.h -src/sna/sna_damage.h -src/sna/sna_module.h -src/sna/sna_reg.h -src/sna/sna_render.h -src/sna/sna_render_inline.h -src/sna/sna_trapezoids.h - -src/uxa/uxa_module.h - -xvmc/i965_reg.h diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/dri3-flush-broken.patch xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/dri3-flush-broken.patch --- xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/dri3-flush-broken.patch 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/dri3-flush-broken.patch 2014-09-18 08:11:22.000000000 +0000 @@ -0,0 +1,82 @@ +--- a/src/sna/sna_accel.c ++++ b/src/sna/sna_accel.c +@@ -1408,6 +1408,9 @@ + + __sna_pixmap_free_cpu(sna, priv); + ++ if (priv->flush) ++ sna_accel_watch_flush(sna, -1); ++ + if (priv->header) { + assert(pixmap->drawable.pScreen == sna->scrn->pScreen); + assert(!priv->shm); +--- a/src/sna/sna_dri3.c ++++ b/src/sna/sna_dri3.c +@@ -39,6 +39,8 @@ + #include + #include + ++#define MESA_HAS_NO_FENCES 1 ++ + static DevPrivateKeyRec sna_sync_fence_private_key; + struct sna_sync_fence { + SyncFenceSetTriggeredFunc set_triggered; +@@ -49,6 +51,22 @@ + return dixLookupPrivate(&fence->devPrivates, &sna_sync_fence_private_key); + } + ++static inline void mark_dri3_pixmap(struct sna *sna, struct sna_pixmap *priv, struct kgem_bo *bo) ++{ ++ if (!MESA_HAS_NO_FENCES) ++ return; ++ ++ bo->flush = true; ++ if (bo->exec) ++ sna->kgem.flush = 1; ++ if (bo == priv->gpu_bo) ++ priv->flush |= 3; ++ else ++ priv->shm = true; ++ ++ sna_accel_watch_flush(sna, 1); ++} ++ + static void sna_sync_flush(struct sna *sna, struct sna_pixmap *priv) + { + struct kgem_bo *bo = NULL; +@@ -94,11 +112,13 @@ + DBG(("%s: associated pixmap=%ld\n", __FUNCTION__, get_drawable_pixmap(draw)->drawable.serialNumber)); + sna_sync_flush(sna, sna_pixmap(get_drawable_pixmap(draw))); + } else { /* SyncFence are currently per-screen, sigh */ +- struct sna_pixmap *priv; ++ if (!MESA_HAS_NO_FENCES) { ++ struct sna_pixmap *priv; + +- DBG(("%s: flushing all DRI3 pixmaps\n", __FUNCTION__)); +- list_for_each_entry(priv, &sna->dri3.pixmaps, cow_list) +- sna_sync_flush(sna, priv); ++ DBG(("%s: flushing all DRI3 pixmaps\n", __FUNCTION__)); ++ list_for_each_entry(priv, &sna->dri3.pixmaps, cow_list) ++ sna_sync_flush(sna, priv); ++ } + + sna_accel_flush(sna); + } +@@ -278,6 +298,8 @@ + } + list_add(&priv->cow_list, &sna->dri3.pixmaps); + ++ mark_dri3_pixmap(sna, priv, bo); ++ + return pixmap; + + free_pixmap: +@@ -337,6 +359,8 @@ + priv->pinned |= PIN_DRI3; + list_move(&priv->cow_list, &sna->dri3.pixmaps); + ++ mark_dri3_pixmap(sna, priv, bo); ++ + *stride = (priv->pinned & PIN_DRI3) ? priv->gpu_bo->pitch : priv->cpu_bo->pitch; + *size = kgem_bo_size((priv->pinned & PIN_DRI3) ? priv->gpu_bo : priv->cpu_bo); + DBG(("%s: exporting %s pixmap=%ld, handle=%d, stride=%d, size=%d\n", diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/install-dri3info.diff xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/install-dri3info.diff --- xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/install-dri3info.diff 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/install-dri3info.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -diff --git a/tools/Makefile.am b/tools/Makefile.am -index 92df266..d5e127a 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -42,7 +42,7 @@ cursor_LDADD = $(TOOL_CURSOR_LIBS) - endif - - if X11_DRI3 --noinst_PROGRAMS += dri3info -+bin_PROGRAMS += dri3info - dri3info_SOURCES = dri3info.c - dri3info_CFLAGS = $(X11_DRI3_CFLAGS) $(DRI_CFLAGS) - dri3info_LDADD = $(X11_DRI3_LIBS) $(DRI_LIBS) diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/series xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/series --- xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/series 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/series 2014-09-18 08:12:27.000000000 +0000 @@ -1,6 +1,5 @@ -#placeholder +#dri3-flush-broken.patch +# XMir series - -# ubuntu -install-dri3info.diff +#xmir.patch diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/xmir.patch xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/xmir.patch --- xserver-xorg-video-intel-2.99.917+git20170309/debian/patches/xmir.patch 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/patches/xmir.patch 2014-09-18 08:11:22.000000000 +0000 @@ -0,0 +1,391 @@ +commit 80db93ed6b05fade9e0c7a581cc2b503f66d2416 +Author: Chris Wilson +Date: Wed Jul 24 01:44:30 2013 +0100 + + sna: Add XMir support + + With lots of updates by Christopher James Halse Rogers as he updated the + XMir API - but now supposedly frozen! + + " ickle: I think the xmir api should be pretty much stable now, + barring people coming up with more awesome ways of doing things." + + Signed-off-by: Christopher James Halse Rogers + Signed-off-by: Chris Wilson + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -67,6 +67,7 @@ + intel_driver.h \ + intel_options.c \ + intel_module.c \ ++ intel_xmir.h \ + compat-api.h \ + $(NULL) + +--- a/src/intel_device.c ++++ b/src/intel_device.c +@@ -162,10 +162,23 @@ + return ret; + } + ++static int __intel_open_xmir(const struct pci_device *pci) ++{ ++ char id[20]; ++ ++ snprintf(id, sizeof(id), ++ "pci:%04x:%02x:%02x.%d", ++ pci->domain, pci->bus, pci->dev, pci->func); ++ return xmir_get_drm_fd(id); ++} ++ + static int __intel_open_device(const struct pci_device *pci, const char *path) + { + int fd; + ++ if (xorgMir) ++ return __intel_open_xmir(pci); ++ + if (path == NULL) { + char id[20]; + int ret; +--- a/src/intel_driver.h ++++ b/src/intel_driver.h +@@ -1,6 +1,8 @@ + #ifndef INTEL_DRIVER_H + #define INTEL_DRIVER_H + ++#include "intel_xmir.h" ++ + struct xf86_platform_device; + + #define INTEL_VERSION 4000 +@@ -134,6 +136,6 @@ + int intel_put_master(ScrnInfoPtr scrn); + void intel_put_device(ScrnInfoPtr scrn); + +-#define hosted() (0) ++#define hosted() (xorgMir) + + #endif /* INTEL_DRIVER_H */ +--- /dev/null ++++ b/src/intel_xmir.h +@@ -0,0 +1,15 @@ ++#ifndef INTEL_XMIR_H ++#define INTEL_XMIR_H ++ ++#include ++ ++#if XMIR ++#include ++#include ++#else ++typedef struct xmir_screen xmir_screen; ++#define xorgMir 0 ++#define xmir_get_drm_fd(id) -1 ++#endif ++ ++#endif /* INTEL_XMIR_H */ +--- a/src/sna/Makefile.am ++++ b/src/sna/Makefile.am +@@ -80,6 +80,7 @@ + sna_video_overlay.c \ + sna_video_sprite.c \ + sna_video_textured.c \ ++ sna_xmir.c \ + gen2_render.c \ + gen2_render.h \ + gen3_render.c \ +--- a/src/sna/sna.h ++++ b/src/sna/sna.h +@@ -365,6 +365,7 @@ + + EntityInfoPtr pEnt; + const struct intel_device_info *info; ++ xmir_screen *xmir; + + ScreenBlockHandlerProcPtr BlockHandler; + ScreenWakeupHandlerProcPtr WakeupHandler; +@@ -1215,4 +1216,18 @@ + #define RR_Rotate_All (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270) + #define RR_Reflect_All (RR_Reflect_X | RR_Reflect_Y) + ++/* sna_xmir.c */ ++ ++#if XMIR ++bool sna_xmir_create(struct sna *sna); ++bool sna_xmir_pre_init(struct sna *sna); ++void sna_xmir_init(struct sna *sna, ScreenPtr screen); ++void sna_xmir_post_damage(struct sna *sna); ++#else ++inline static bool sna_xmir_create(struct sna *sna) { return true; } ++inline static bool sna_xmir_pre_init(struct sna *sna) { return true; } ++inline static void sna_xmir_init(struct sna *sna, ScreenPtr screen) { } ++inline static void sna_xmir_post_damage(struct sna *sna) { } ++#endif ++ + #endif /* _SNA_H */ +--- a/src/sna/sna_dri2.c ++++ b/src/sna/sna_dri2.c +@@ -2873,6 +2873,13 @@ + void sna_dri2_destroy_window(WindowPtr win) { } + #endif + ++#if DRI2INFOREC_VERSION >= 8 && XMIR ++static int sna_dri_auth_magic2(ScreenPtr screen, uint32_t magic) ++{ ++ return xmir_auth_drm_magic(to_sna_from_screen(screen)->xmir, magic); ++} ++#endif ++ + static bool has_i830_dri(void) + { + return access(DRI_DRIVER_PATH "/i830_dri.so", R_OK) == 0; +@@ -3027,6 +3034,13 @@ + info.ReuseBufferNotify = sna_dri2_reuse_buffer; + #endif + ++#if DRI2INFOREC_VERSION >= 8 && XMIR ++ if (sna->xmir) { ++ info.version = 8; ++ info.AuthMagic2 = sna_dri_auth_magic2; ++ } ++#endif ++ + #if USE_ASYNC_SWAP + info.version = 10; + info.scheduleSwap0 = 1; +--- a/src/sna/sna_driver.c ++++ b/src/sna/sna_driver.c +@@ -548,6 +548,9 @@ + goto cleanup; + } + ++ if (!sna_xmir_create(sna)) ++ goto cleanup; ++ + /* Sanity check */ + if (hosted() && (sna->flags & SNA_IS_HOSTED) == 0) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, +@@ -559,6 +562,7 @@ + xf86DrvMsg(scrn->scrnIndex, X_PROBED, "CPU: %s\n", + sna_cpu_features_to_string(sna->cpu_features, buf)); + ++ /* XXX query depth from host */ + if (!xf86SetDepthBpp(scrn, 24, 0, 0, + Support32bppFb | + SupportConvert24to32 | PreferConvert24to32)) +@@ -592,6 +596,9 @@ + + sna_setup_capabilities(scrn, fd); + ++ if (!sna_xmir_pre_init(sna)) ++ goto cleanup; ++ + kgem_init(&sna->kgem, fd, + xf86GetPciInfoForEntity(pEnt->index), + sna->info->gen); +@@ -710,6 +717,8 @@ + + if (*tv == NULL || ((*tv)->tv_usec | (*tv)->tv_sec) || has_shadow(sna)) + sna_accel_block_handler(sna, tv); ++ ++ sna_xmir_post_damage(sna); + } + + static void +@@ -1090,6 +1099,8 @@ + if (!miDCInitialize(screen, xf86GetPointerScreenFuncs())) + return FALSE; + ++ sna_xmir_init(sna, screen); /* after DirectCursor is initialised */ ++ + if (sna_cursors_init(screen, sna)) + xf86DrvMsg(scrn->scrnIndex, X_INFO, "HW Cursor enabled\n"); + +--- /dev/null ++++ b/src/sna/sna_xmir.c +@@ -0,0 +1,183 @@ ++/*************************************************************************** ++ ++ Copyright 2013 Intel Corporation. All Rights Reserved. ++ ++ Permission is hereby granted, free of charge, to any person obtaining a ++ copy of this software and associated documentation files (the ++ "Software"), to deal in the Software without restriction, including ++ without limitation the rights to use, copy, modify, merge, publish, ++ distribute, sub license, and/or sell copies of the Software, and to ++ permit persons to whom the Software is furnished to do so, subject to ++ the following conditions: ++ ++ The above copyright notice and this permission notice (including the ++ next paragraph) shall be included in all copies or substantial portions ++ of the Software. ++ ++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ++ IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, ++ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR ++ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR ++ THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ ++ **************************************************************************/ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include "sna.h" ++ ++#if XMIR ++ ++/* Theory of Operation ++ * ------------------- ++ * ++ * 1. Clients render to their pixmaps and Windows aggregating damage. ++ * 2. Before blocking, we walk the list of dirty Windows and submit ++ * any damage to Mir. This consumes the xfer buffer. ++ * 3. Clients continue to render and we accumulate damage. However, ++ * as there is now no xfer buffer free, damage accumulates. ++ * 4. Mir reports that its exchange has complete and gives us a new ++ * transport buffer. ++ * 5. Before going to sleep, we iterate over dirty Windows and copy ++ * their damage into the xfer buffer and send back to Mir. ++ * ++ * Clients render uninterrupted, but we only send damage to Mir once ++ * every frame. ++ */ ++ ++#define FORCE_FULL_REDRAW 0 ++ ++static void ++sna_xmir_copy_to_mir(xmir_window *xmir_win, RegionPtr region) ++{ ++ PixmapPtr pixmap = get_window_pixmap(xmir_window_to_windowptr(xmir_win)); ++ struct sna *sna = to_sna_from_pixmap(pixmap); ++ const BoxRec *dst_box = xmir_window_get_drawable_region(xmir_win); ++ struct kgem_bo *src, *dst; ++ BoxRec *box; ++ const int pitch = xmir_window_get_stride(xmir_win); ++ int16_t sx, sy, dx, dy; ++ int n; ++ ++#if FORCE_FULL_REDRAW ++ RegionRec whole = { { 0, 0, pixmap->drawable.width, pixmap->drawable.height } }; ++ region = &whole; ++#endif ++ ++ assert(region); ++ ++ DBG(("%s: copying region (%d, %d), (%d, %d) x %d, dst box=(%d, %d), (%d, %d), pitch=%d, fd=%d\n", ++ __FUNCTION__, ++ region->extents.x1, region->extents.y1, ++ region->extents.x2, region->extents.y2, ++ REGION_NUM_RECTS(region), ++ dst_box->x1, dst_box->y1, ++ dst_box->x2, dst_box->y2, ++ pitch, xmir_window_get_fd(xmir_win))); ++ ++ box = REGION_RECTS(region); ++ n = REGION_NUM_RECTS(region); ++ if (n == 0) ++ return; ++ ++ dst = kgem_create_for_prime(&sna->kgem, ++ xmir_window_get_fd(xmir_win), ++ pitch * (dst_box->y2 - dst_box->y1)); ++ if (dst == NULL) ++ return; ++ ++ dst->pitch = pitch; ++ ++ if (get_window_deltas(pixmap, &sx, &sy)) ++ RegionTranslate(region, sx, sy); ++ ++ dx = sx + dst_box->x1; ++ dy = sy + dst_box->y1; ++ ++ src = NULL; ++ if (!wedged(sna)) ++ src = __sna_render_pixmap_bo(sna, pixmap, ®ion->extents, true); ++ if (src && sna->render.copy_boxes(sna, GXcopy, ++ pixmap, src, 0, 0, ++ pixmap, dst, -dx, -dy, ++ box, n, COPY_LAST)) { ++ kgem_submit(&sna->kgem); ++ n = 0; ++ } else { ++ void *ptr = kgem_bo_map__gtt(&sna->kgem, dst); ++ if (ptr && sna_drawable_move_region_to_cpu(&pixmap->drawable, ++ region, MOVE_READ)) { ++ kgem_bo_sync__gtt(&sna->kgem, dst); ++ if (sigtrap_get() == 0) { ++ do { ++ memcpy_blt(pixmap->devPrivate.ptr, ptr, ++ pixmap->drawable.bitsPerPixel, ++ pixmap->devKind, dst->pitch, ++ box->x1, box->y1, ++ box->x1 - dx, box->y1 - dy, ++ box->x2 - box->x1, ++ box->y2 - box->y1); ++ box++; ++ } while (--n); ++ sigtrap_put(); ++ } ++ } ++ } ++ ++ if (sx | sy) ++ RegionTranslate(region, -sx, -sy); ++ ++ if (n == 0) ++ xmir_submit_rendering_for_window(xmir_win, region); ++ ++ kgem_bo_destroy(&sna->kgem, dst); ++} ++ ++static xmir_driver sna_xmir_driver = { ++ XMIR_DRIVER_VERSION, ++ sna_xmir_copy_to_mir ++}; ++ ++bool sna_xmir_create(struct sna *sna) ++{ ++ if (!xorgMir) ++ return true; ++ ++ sna->xmir = xmir_screen_create(sna->scrn); ++ if (sna->xmir == NULL) ++ return false; ++ ++ sna->flags |= SNA_IS_HOSTED; ++ return true; ++} ++ ++bool sna_xmir_pre_init(struct sna *sna) ++{ ++ if (sna->xmir == NULL) ++ return true; ++ ++ return xmir_screen_pre_init(sna->scrn, sna->xmir, &sna_xmir_driver); ++} ++ ++void sna_xmir_init(struct sna *sna, ScreenPtr screen) ++{ ++ if (sna->xmir == NULL) ++ return; ++ ++ xmir_screen_init(screen, sna->xmir); ++} ++ ++void sna_xmir_post_damage(struct sna *sna) ++{ ++ if (sna->xmir == NULL) ++ return; ++ ++ xmir_screen_for_each_damaged_window(sna->xmir, ++ sna_xmir_copy_to_mir); ++} ++ ++#endif diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/README.source xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/README.source --- xserver-xorg-video-intel-2.99.917+git20170309/debian/README.source 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/README.source 2014-09-18 08:11:22.000000000 +0000 @@ -14,12 +14,6 @@ Alternatively, instead of using quilt directly, you can drop the patch in to debian/patches and add the name of the patch to debian/patches/series. -While building from git, dpkg-source can complain about symlinks vs. -normal files mismatches. To work around this issue, before uploading, -and without committing: - - find -type l | while read dest; do src=$(readlink -f $dest); rm $dest; cp $src $dest; done - ------------------------------------ Guide To The X Strike Force Packages ------------------------------------ diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/rules xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/rules --- xserver-xorg-video-intel-2.99.917+git20170309/debian/rules 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/rules 2016-05-18 03:27:40.000000000 +0000 @@ -4,6 +4,10 @@ SOURCE_VERSION := $(shell dpkg-parsechangelog | awk -F': ' '/^Version: / {print $$2}') BUILDER := $(shell dpkg-parsechangelog | awk -F': ' '/^Maintainer: / {print $$2}') +export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) +export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) +export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) + DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) ifeq ($(DEB_HOST_ARCH_OS), linux) @@ -16,20 +20,24 @@ override_dh_auto_configure: dh_auto_configure -- \ --enable-sna \ - --enable-uxa \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib/xserver-xorg-video-intel \ + --enable-rendernode \ + --enable-create2 \ + --enable-async-swap \ + --with-default-accel=sna \ --with-builderstring="$(SOURCE_NAME) $(SOURCE_VERSION) ($(BUILDER))" \ + --disable-silent-rules \ + --with-default-dri=3 \ $(valgrind) +# Install in debian/tmp to retain control through dh_install: +override_dh_auto_install: + dh_auto_install --destdir=debian/tmp + # Kill *.la files, libxvmc symlinks, and forget no-one: override_dh_install: find debian/tmp -name '*.la' -delete rm -f debian/tmp/usr/lib/libI810XvMC.so rm -f debian/tmp/usr/lib/libIntelXvMC.so - mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) - mv debian/tmp/usr/lib/libI810XvMC.so.* debian/tmp/usr/lib/libIntelXvMC.so.* \ - debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/. dh_install --fail-missing # Debug package: @@ -44,11 +52,11 @@ dh_installchangelogs debian/upstream.changelog %: - dh $@ --with quilt,xsf --builddirectory=build/ + dh $@ --with quilt,autoreconf,xsf --builddirectory=build/ # Snapshots should only target experimental: generate-snapshot: UPSTREAM_VERSION = $(shell echo $(SOURCE_VERSION) | sed 's/^[0-9]*://;s/-.*$$//') -generate-snapshot: UPSTREAM_BRANCH ?= upstream-unstable +generate-snapshot: UPSTREAM_BRANCH ?= upstream-experimental generate-snapshot: ORIG = ../$(SOURCE_NAME)_$(UPSTREAM_VERSION).orig.tar.gz generate-snapshot: if [ -f $(ORIG) ]; then \ diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/source/format xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/source/format --- xserver-xorg-video-intel-2.99.917+git20170309/debian/source/format 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/source/format 2014-09-18 08:13:37.000000000 +0000 @@ -1 +1 @@ -1.0 +3.0 (native) diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/upstream.changelog xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/upstream.changelog --- xserver-xorg-video-intel-2.99.917+git20170309/debian/upstream.changelog 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/upstream.changelog 2014-09-18 08:11:22.000000000 +0000 @@ -1,3322 +1,3 @@ -commit baec802b21387d04aebb10ac29e719a1800c5aa0 -Author: Chris Wilson -Date: Sun Dec 21 14:41:12 2014 +0000 - - 2.99.917 snapshot - -commit 01ce7efe73538047abd38bbbb95fc4012ebeb9b4 -Author: Chris Wilson -Date: Sat Dec 20 13:36:50 2014 +0000 - - sna: Fix Drawable offsets prior to performing shadow discard - - Signed-off-by: Chris Wilson - -commit c27e6306e86797553351a71e2917a9b1158ec388 -Author: Chris Wilson -Date: Sat Dec 20 12:46:52 2014 +0000 - - sna/dri2: Check for implicit flushing after updating a Pixmap buffer - - Signed-off-by: Chris Wilson - -commit 5c16a4ec9b59123336483238ee6017db5491e255 -Author: Chris Wilson -Date: Sat Dec 20 09:38:41 2014 +0000 - - sna: Skip allocation of new TearFree buffer if not actually flipping - - After showing the new front buffer, we have to avoid writing to the back - buffer whilst the flip is still pending (as it may still be being shown - by the display). To do this we check if there are any outstanding flips, - and reallocate if so. However, with a CRTC override, we may just be - flipping that one CRTC and not the current TearFree back buffer and in - that case we can avoid the reallocation. - - Signed-off-by: Chris Wilson - -commit 9b3b591476cc52cc285a8a1f02462db37d5e10c2 -Author: Chris Wilson -Date: Fri Dec 19 12:25:30 2014 +0000 - - sna/dri2: Preserve the shadow CRTCs when copying to other areas - - In the Composite setup, if we are doing a DRI2 copy onto the front - buffer, we are fully cognizant that the copy will not go onto the - unredirected Windows of another Client. So we can preserve the shadow - CRTC mapping for those Clients, and prevent ping-ponging between CRTC - modes. - - Signed-off-by: Chris Wilson - -commit 391b50c81decd208c47c109217b2c882c064ac69 -Author: Chris Wilson -Date: Fri Dec 19 11:11:38 2014 +0000 - - sna/dri2: Report changes in pitch when swapping bo - - As we have relaxed the pitch restriction between front/back buffers when - swapping, we need to make sure that any change is also reported back - along with the change in front/back names. - - Signed-off-by: Chris Wilson - -commit ada97d27250aa09b1a27d5f6640fea011fade997 -Author: Chris Wilson -Date: Fri Dec 19 09:43:33 2014 +0000 - - sna/dri2: Look for preferred CRTC for visible portion of the window - - Signed-off-by: Chris Wilson - -commit 6f99bbe67e6e70d5b24611c7afa0dffc5632aaab -Author: Chris Wilson -Date: Fri Dec 19 08:37:07 2014 +0000 - - sna/dri2: Prevent NULL pointer dereference of Window private - - In case we receive quick successive calls to DRI2GetBuffers on the same - Window, we need to check that the private exists before dereferencing - it. - - Signed-off-by: Chris Wilson - -commit fdd7508e53043f82f9cf422fc968c6574334a667 -Author: Chris Wilson -Date: Fri Dec 19 07:59:24 2014 +0000 - - sna/dri2: Decouple Window cache on Pixmap changes - - If the Pixmap for a Window is changed (i.e. Composite - redirection/unredirection), we also need to decouple any associated DRI2 - front buffer for the Pixmap (e.g. used for single CRTC flipping). - - Signed-off-by: Chris Wilson - -commit 82e480267079f8678245e37724f95ae87f55b582 -Author: Chris Wilson -Date: Wed Dec 17 08:01:00 2014 +0000 - - intel-virtual-output: Do not attempt to tidy up the local display if it fails - - Just fix the segfault dereferencing the primary display if we bail - during its setup. - - Signed-off-by: Chris Wilson - -commit c211b3bc61efa7d13a5f5f1276649d90bf4ef854 -Author: Chris Wilson -Date: Wed Dec 17 07:51:31 2014 +0000 - - intel-virtual-output: Add version number to verbose output - - Signed-off-by: Chris Wilson - -commit 123754de41380b94922768d021987b1dea3b39c4 -Author: Chris Wilson -Date: Tue Dec 16 10:31:22 2014 +0000 - - sna: Make error debug tracing available at normal debug levels - - Signed-off-by: Chris Wilson - -commit 99537089346ed7a1bc6b02349fad93845e865bb9 -Author: Chris Wilson -Date: Fri Dec 12 15:36:25 2014 +0000 - - sna: Tune handling of kernel error detection during intial setup - - Signed-off-by: Chris Wilson - -commit 01692b8cf229f45813cf3a1059577a779d71dfa8 -Author: Chris Wilson -Date: Fri Dec 12 15:13:04 2014 +0000 - - sna: Fix TearFree multi-monitor operation whilst wedged - - The crtc flip (for when the kernel can't do a pageflip) made the mistake - of setting the shadow buffer to the scanout - nullifying the effect of - the TearFree. - - Signed-off-by: Chris Wilson - -commit 343299c78bfc1044da0b965e99de9ad312b05cca -Author: Chris Wilson -Date: Fri Dec 12 09:40:51 2014 +0000 - - sna/trapezoids: Check the pixmap is wrapped before deferencing it - - When we AddTraps to a low resolution bitmap, we need to fallback as we - don't wrap it with a GPU pixmap. - - Signed-off-by: Chris Wilson - -commit 60ebac591596ccb768b684b1909064570dd1cf47 -Author: Chris Wilson -Date: Fri Dec 12 07:55:51 2014 +0000 - - sna: Add another Xinerama vs RandR guard - - Another place used rrScrPriv without checking for its validity. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87257 - Signed-off-by: Chris Wilson - -commit f587d71f3c91f9ddcc4cdbe8a0f9ce59590d9db2 -Author: Chris Wilson -Date: Thu Dec 11 08:53:54 2014 +0000 - - sna: Catch NULL RandR screen private - - If Xinerama is enabled, than RandR12 will be silently disabled. Be - careful not to dereference the rrScrPiv when it doesn't exist. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87207 - Signed-off-by: Chris Wilson - -commit 04a09d353fc5ad8a55eb2457dc8bb43638ba879e -Author: Chris Wilson -Date: Tue Dec 9 20:43:52 2014 +0000 - - uxa/dri: Remove defunct intel->back_pixmap - - This was only required for glamor support. - - Signed-off-by: Chris Wilson - -commit 08ee9a75df16ee276835df5fc613648db2566154 -Author: Chris Wilson -Date: Tue Dec 9 20:40:20 2014 +0000 - - uxa/dri: Fix triple buffer swapping - - Fixes regression from - - commit 0aa2edbd29c8dd26a5f3748e3875c445ea358a6d - Author: Chris Wilson - Date: Wed Nov 5 11:56:20 2014 +0000 - - Remove defunct glamor support - - where the wrong branch of pixmap exchange upon SwapBuffers was kept when - removing the glamor paths. - - Reported-by: Rui Matos - Signed-off-by: Chris Wilson - -commit fc984e8953d61901b255422c8f56eb79a2dd2a28 -Author: Chris Wilson -Date: Tue Jul 22 08:38:42 2014 +0100 - - sna/dri3: Mesa relies upon implicit fences for X/Compositor synchronisation - - The decision has been made that DRI3/intel shall continue with DRI2-style - implicit fencing for synchronisation between X and clients using pixmaps - as texture sources. (The other way around uses explicit fencing!) - - References: https://bugs.freedesktop.org/show_bug.cgi?id=81551 - Signed-off-by: Chris Wilson - -commit d247cb7d0cdb73736f31612157e47f166af68ba0 -Author: Chris Wilson -Date: Mon Dec 8 10:07:25 2014 +0000 - - sna/gen6: Poke PSMI control around WAIT_FOR_EVENT to prevent idling - - The bspec recommends preventing the hardware from going to sleep around - a WAIT_FOR_EVENT, and tells us to use disable sleep bit in PSMI control - to accomplish this. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=62373 - Signed-off-by: Chris Wilson - -commit d39dc73a80161d290555877942e5990daf0c0411 -Author: Chris Wilson -Date: Mon Dec 8 08:33:11 2014 +0000 - - sna: Inline check for pending events before reading from drm fd - - Signed-off-by: Chris Wilson - -commit f8aecdffada438306dff8923cdfc0df527509672 -Author: Chris Wilson -Date: Thu Dec 4 11:23:11 2014 +0000 - - sna: Clear the read flags for the shared drm fd after use - - In ZaphodHeads, we may reuse the same select read flags and attempt to - read from a blocking drm fd multiple times. However, if we clear the - read flags after first exhausting the fd, we shouldn't then block on - subsequent heads. - - Signed-off-by: Chris Wilson - -commit 594470c809627feab4891bade5ec6d80e1d0a919 -Author: Chris Wilson -Date: Thu Dec 4 11:16:58 2014 +0000 - - sna: Update the fence marker after submitting a new batch - - Signed-off-by: Chris Wilson - -commit 9c2c485df9fd39ae36779f765a892e36835a8001 -Author: Chris Wilson -Date: Mon Dec 1 14:26:46 2014 +0000 - - sna: Validate that the reg/insn size is well defined - - Signed-off-by: Chris Wilson - -commit 263d10998617ba935179942d2440a1607cd3c21c -Author: Chris Wilson -Date: Mon Dec 1 13:26:46 2014 +0000 - - sna: Clamp downsampling tile size - - For very large scale factors, it is possible for the current calculation - to underflow and try negative tile sizes. - - Signed-off-by: Chris Wilson - -commit 88e9bb760fbd1249bb364a6b68aceee0b442738c -Author: Chris Wilson -Date: Mon Dec 1 10:47:32 2014 +0000 - - sna: Explicitly disable unused pipes after an output reconfiguration - - Signed-off-by: Chris Wilson - -commit ddf5feba786cf0147c4db9720c96e9a5636573b0 -Author: Chris Wilson -Date: Mon Dec 1 10:00:32 2014 +0000 - - sna: Generate a backtrace on assertion failures - - Signed-off-by: Chris Wilson - -commit e12ec452a99396f76138a5961c8195e22ca12ac1 -Author: Chris Wilson -Date: Mon Dec 1 09:46:20 2014 +0000 - - sna: Cancel pending mode change notification - - Along a couple of paths, we either do not care about the notification - (i.e. during suspend) or do it explicitly. There we should mark the work - as done. - - Signed-off-by: Chris Wilson - -commit 700c036d180a09e4f7ec30466f7f6dda1c1d0066 -Author: Chris Wilson -Date: Mon Dec 1 09:31:41 2014 +0000 - - sna: Reject modesets with 0 outputs - - Signed-off-by: Chris Wilson - -commit dd421005cac981e75f734d50263675521943ed7b -Author: Chris Wilson -Date: Mon Dec 1 09:29:07 2014 +0000 - - sna: Add a few more asserts to sna_crtc_flip() - - Check that we are updating an active CRTC with a valid mode and - associated outputs. - - Signed-off-by: Chris Wilson - -commit 104517507f267aca7433f8b85dec89e9013a640e -Author: Chris Wilson -Date: Mon Dec 1 09:24:50 2014 +0000 - - sna: Do not post shadow updates in the middle of output reconfiguration - - Wait until the screens and framebuffers settle before we start updating. - - Signed-off-by: Chris Wilson - -commit faef6e5e1ab52819d4e9a19738ec7d8419841613 -Author: Chris Wilson -Date: Mon Dec 1 08:29:47 2014 +0000 - - sna: Clean up DBG compile warnings - - Including a potential crash due to using a unspecified string, oops. - - Signed-off-by: Chris Wilson - -commit 0bec625cc45eb8de85a5013506cce5f789dc8e45 -Author: Chris Wilson -Date: Mon Dec 1 08:11:18 2014 +0000 - - sna: Report when we disable TearFree due to an error in operation - - Signed-off-by: Chris Wilson - -commit 6059b51b59537682b3d9c64c69ea72616462c41c -Author: Chris Wilson -Date: Fri Nov 28 07:33:42 2014 +0000 - - sna: Reject attempts to set an invalid mode - - Let's be sure the mode has been established before we attempt to apply - it to a CRTC - just in case the kernel tries to use the invalid mode and - blows up. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=86679 - Signed-off-by: Chris Wilson - -commit 0f15b8b45bb6de10ce1926db303247a5bd3c1c08 -Author: Chris Wilson -Date: Wed Nov 19 18:42:32 2014 +0000 - - sna/transform: Correctly check for imprecise fractional translations - - Signed-off-by: Chris Wilson - -commit 7725c423cda217e0dbd95003bb7a80b4b3a73bb4 -Author: Chris Wilson -Date: Wed Nov 19 18:30:20 2014 +0000 - - sna/dri2: Improve precision of completion event for no-op swaps - - Signed-off-by: Chris Wilson - -commit f367f3dee5e2ecba265a8ff7e98e196189793613 -Author: Chris Wilson -Date: Wed Nov 19 18:19:13 2014 +0000 - - sna/dri2: Add more DBG to explain invalid frames - - Signed-off-by: Chris Wilson - -commit 05a1aba1ab5d288918d6689080170fc83a80db61 -Author: Chris Wilson -Date: Wed Nov 19 18:12:10 2014 +0000 - - sna: DBG compile fix - - Signed-off-by: Chris Wilson - -commit a90cc3b3889fafbd91c11c42d068a9d6474e218b -Author: Chris Wilson -Date: Tue Nov 18 08:37:25 2014 +0000 - - sna: Tweak alignment constraints on gen8 to allow BLT - - The previous commits prevent us from using the BLT if the destination - address is misaligned. Honour that restriction when creating buffers as - well, so that they are always usuable by the BLT. - - Signed-off-by: Chris Wilson - -commit 8dee52997891108eec8e4df12dd02f3a060d9cb8 -Author: Chris Wilson -Date: Wed Nov 19 13:38:20 2014 +0000 - - sna: Add more checks and asserts for BLT capable bo - - Before we use the BLT for core acceleration, double check that we can. - This should catch the case where we attempt to operate on SHM pixmaps - which do not meet the restrictions. - - Signed-off-by: Chris Wilson - -commit 3a22b6f6d55a5b1e0a1c0a3d597996268ed439ad -Author: Mika Kuoppala -Date: Wed Nov 19 15:10:05 2014 +0200 - - sna: gen8 BLT broken when address has bit 4 set - - With bit 4 set in address, the gen8 blitter fails and blits errorneously - into the cacheline preceeding the destination and similarly when reading from - the source, corrupting memory. - - v2: Update the destination base offset pattern as revealed - by igt/tests/gem_userptr_blits/destination-bo-align - - v3: Check base address as well - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79053 - Cc: Chris Wilson - Tested-by: xunx.fang@intel.com [v2] - Signed-off-by: Mika Kuoppala - -commit 29aab766f4b59c71181875880c8c943b93008bdf -Author: Chris Wilson -Date: Tue Nov 18 20:54:39 2014 +0000 - - sna/dri2: Remove unused function - - Signed-off-by: Chris Wilson - -commit b6eeb7a1f7efa591504070b606be655e27e6e9c2 -Author: Chris Wilson -Date: Wed Nov 5 13:03:41 2014 +0000 - - Disable DRI3 by default - - The external libraries, both in git, and especially shipping already - enabled in distributions, are buggy and lead to server crashes and - lockups. Caveat emptor. - - Signed-off-by: Chris Wilson - -commit 6c2707d7bbc0ebb422be66618b6f78887c46446e -Author: Chris Wilson -Date: Thu Nov 13 08:37:13 2014 +0000 - - sna: Unroll pwrite using our cached mmappings - - Signed-off-by: Chris Wilson - -commit f9f85b88032b2458d4d24ceca450fdaa65e6b94d -Author: Chris Wilson -Date: Wed Nov 12 11:50:33 2014 +0000 - - sna: Reorder PARAMs based on upstream inclusion - - Signed-off-by: Chris Wilson - -commit 13fa1f1a26aed83cd8fccafb9a0bdb096f69534b -Author: Chris Wilson -Date: Wed Nov 12 10:54:36 2014 +0000 - - sna/gen7: Be paranoid and force a pipecontrol stall at least every 4 flushes - - The documentation warns of potential GPU hangs if we emit more than 4 - pipecontrol flushes without a CS stall. This is highly unlikely given - how frequently we must inject stalls into the pipeline, but force a - stall just in case! - - Signed-off-by: Chris Wilson - -commit b2492fa45beaf3c676eea2d5d75e35d60b91d769 -Author: Chris Wilson -Date: Mon Nov 10 13:30:15 2014 +0000 - - sna: Only reshow unhidden cursors after modesetting - - Reported-by: Maarten Lankhorst - Signed-off-by: Chris Wilson - -commit 0267f5902ddaceced870dcd8451ef8729e33e5c2 -Author: Chris Wilson -Date: Mon Nov 10 07:42:42 2014 +0000 - - sna: Check after filtering points before submitting boxes to be drawn - - As we clip the points when converting them into GPU boxes, check that we - have something to draw before submitting the commands. - - Reported-by: Ian Gay - References: https://bugs.freedesktop.org/show_bug.cgi?id=86075 - Signed-off-by: Chris Wilson - -commit 9ea242c275a70351abcfbc0f8f3233c122abecbe -Author: Chris Wilson -Date: Sun Nov 9 08:59:08 2014 +0000 - - sna: Check picture format on destination before beginning a GPU operation - - This is more important in the multiple stage operations like glyph - rendering where we do not want to initiate an operation on the GPU only - then to fallback due to an incompatible destination. - - Signed-off-by: Chris Wilson - -commit e96520327bd2ef4fbc7b7b5169a17b966d9f85f3 -Author: Sedat Dilek -Date: Fri Nov 7 10:54:18 2014 +0100 - - sna: wc-mmap: Fix warning in configure - - This fixes the following warning due to a typo: - - configure: WARNING: unrecognized options: --enable-wc-map - Signed-off-by: Sedat Dilek - -commit ab6680375cc6d5efebe8e40816d1906b15678d6e -Author: Chris Wilson -Date: Fri Nov 7 09:54:35 2014 +0000 - - sna/xv: Give the illusion of hardware progress - - The number of ports we provide for Xv textured video is arbitrary. The - main cost is reservation of a number of XIDs and preallocation of a - block of memory. Whatever value we pick, someone will always want - more... - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85974 - Signed-off-by: Chris Wilson - -commit 0aa2edbd29c8dd26a5f3748e3875c445ea358a6d -Author: Chris Wilson -Date: Wed Nov 5 11:56:20 2014 +0000 - - Remove defunct glamor support - - It never was a stable or complete replacement, and now it is - incorporated in Xorg itself! - - Signed-off-by: Chris Wilson - -commit 4281bbdd5be1f846c217cdf6d09536779cd324ce -Author: Chris Wilson -Date: Fri Oct 24 08:50:55 2014 +0100 - - sna: Fix debug mmapping of active + released aux buffers - - The debug code wants to print the batch and the aux buffers. To do so, - it needs to bypass the assertions on the lifetime of the buffers. - - Signed-off-by: Chris Wilson - -commit 87802b3402ec4a829c6507b4b78fcd03e30b6fe1 -Author: Chris Wilson -Date: Thu Oct 23 10:34:44 2014 +0100 - - sna: Experimental support for write-combining mmaps - - If we have a linear buffer, we can request the kernel mmap it directly - with write-combining without having to pin it into the GTT. This allows - us to efficiently upload very large buffers, and can avoid the dreaded - aperture thrashing. - - Signed-off-by: Chris Wilson - -commit 33764685cbcd01548b6a23c217c7b511c1639694 -Author: Chris Wilson -Date: Thu Nov 6 12:40:20 2014 +0000 - - sna: Wrap prefaulting with sigtrap() - - Handle a potential SIGBUS due to kernel bugs when prefaulting the - scanout surface. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85959 - Signed-off-by: Chris Wilson - -commit 97fe3c1c860978c7a649cba93a55fa497010ccc1 -Author: Rodrigo Vivi -Date: Wed Nov 5 15:48:14 2014 -0800 - - sna: Use VMask in 3DSTATE_PS - - Using dispatch mask cause hangs waiting PS Done on some cases like bug #83207, - with larger screen or when scaling it. - - Also mesa uses VMask instead of Dmask for 3DSTATE_PS because in some cases - they were getting incorrect derivatives for subspans. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83207 - Cc: Timo Aaltonen - Cc: Gary Wang - Signed-off-by: Rodrigo Vivi - Tested-by: Timo Aaltonen - -commit 0532a3313ad9c76a6e1d28e8a1c2ea495583fead -Author: Chris Wilson -Date: Wed Nov 5 20:11:54 2014 +0000 - - sna/gen8: Clear instancing enabled bit between batches - - gen8 sets the instancing bit relative to the vertex element, but we were - clearing it for the vertex buffer. As the maximum number of vertex - elements is fixed, just clear them all when emitting our header. Note - that VF_SGVS is not sufficient by itself to disable all side-effects of - instancing. - - Thanks to Kenneth Graunke for pointing out the change from vertex buffer - to vertex element of the instancing enable bit. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84958 - Signed-off-by: Chris Wilson - -commit ba408bf21c4b65f19c7b581e4c88c92805184334 -Author: Chris Wilson -Date: Tue Nov 4 13:39:52 2014 +0000 - - sna: Correct units for videoRam - - The mappable aperture size is stored as a page count, videoRam expects - size in KiB. - - Signed-off-by: Chris Wilson - -commit 7ed5b1156cbf173a68f4fe007c51b911e7c5a1a2 -Author: Chris Wilson -Date: Tue Nov 4 12:54:00 2014 +0000 - - sna: Reuse the queried aperture size for videoRam determination - - Rather than repeat our derivation of how much RAM we can map, just reuse - the already determined value. - - Signed-off-by: Chris Wilson - -commit a972c9886edc1141ad3f8a0a33d2f7f18d0008bc -Author: Chris Wilson -Date: Fri Oct 24 12:16:11 2014 +0100 - - sna: Use v2 of get_tiling ioctl to check for bit17 swizzling - - With the new version of the get_tiling ioctl we can reliably detect if - we can use manual detiling (i.e. CPU mmaps) on older gen. - - Signed-off-by: Chris Wilson - -commit 7ecc778691c452285f754743a93a46fa1d3da52f -Author: Chris Wilson -Date: Tue Nov 4 10:36:26 2014 +0000 - - backlight: bl_power uses 0 for on and 4 for off - - The backlight/bl_power file didn't obey the obvious semantics, but - instead operates using some interesting framebuffer API. Oh well. - - Signed-off-by: Chris Wilson - -commit cc3b8a542ecb1ba873efefaeab630fa8f69b5b96 -Author: Chris Wilson -Date: Fri Oct 31 20:38:40 2014 +0000 - - sna: Treat external bo carefully when marking as idle - - When we flag a bo as being externally modified, we set a special flag on - its request pointer. This forces us to inspect whether the bo is busy - before accessing it the next, and if it is idle, we must be careful that - we then do not dereference the special request. - - Fixes regression from - commit 9115406b651eb11779f37c4b048d55188b9d6e02 - Author: Chris Wilson - Date: Thu Oct 30 19:21:02 2014 +0000 - - sna: Retire all requests when a bo is found to be not busy - - Signed-off-by: Chris Wilson - -commit 122f6065604480a57b86f04d5d09011ee6e8829b -Author: Chris Wilson -Date: Fri Oct 31 16:50:04 2014 +0000 - - sna: Fix forced fallbacks from init - - As we now override a few hooks when we mark the GPU as wedged, we also - need to preserve those overrides during initialisation. Fixes DBG_NO_HW. - - Signed-off-by: Chris Wilson - -commit d959014c10e2408ed2f073bd5fcb8c558a17da07 -Author: Chris Wilson -Date: Fri Oct 31 16:12:37 2014 +0000 - - sna: Modicum of extra DBG for transformed redisplay - - Signed-off-by: Chris Wilson - -commit 1040d92e31eea4556c2605c809d18ec4c864424a -Author: Chris Wilson -Date: Fri Oct 31 16:11:54 2014 +0000 - - sna/gen6+: Fix projective sample coordinates - - Reported-by: "Ding, Chi" - Signed-off-by: Chris Wilson - -commit 30fded8dfa77c74de165ad53f82412a2e7fa88ae -Author: Chris Wilson -Date: Fri Oct 31 16:11:28 2014 +0000 - - sna/brw: Fix EU tests to select the right gen - - Signed-off-by: Chris Wilson - -commit 71d79daf458c05f771441eb268693c34be0a97c3 -Author: Chris Wilson -Date: Thu Oct 30 19:20:13 2014 +0000 - - sna: Remove extraneous tab whitespace before parameter name - - Reported-by: Arthur Koziol - Signed-off-by: Chris Wilson - -commit 9115406b651eb11779f37c4b048d55188b9d6e02 -Author: Chris Wilson -Date: Thu Oct 30 19:21:02 2014 +0000 - - sna: Retire all requests when a bo is found to be not busy - - Signed-off-by: Chris Wilson - -commit 9d48d2817927bc2532953f09b6be2002c2086e1f -Author: Chris Wilson -Date: Fri Oct 24 09:12:49 2014 +0100 - - sna: Reuse the same fence until retired - - In order to reduce the number of breadcrumbs the kernel must emit to - track our batches, reuse the last query until it has retired. - - Signed-off-by: Chris Wilson - -commit 61436c2fabe117b85404eecb06158ba0a63a7741 -Author: Chris Wilson -Date: Wed Oct 29 16:52:44 2014 +0000 - - sna: Fix build for GC API changes in Xorg-1.16.99.901 - - The GC struct was changed in - - commit 73e2383b7350723256894c5076d0c731aec5cd1f - Author: Adam Jackson - Date: Fri Jun 20 13:31:20 2014 -0400 - - dix: Always store GC client clip as a region (v2) - - update to match. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85581 - Signed-off-by: Chris Wilson - -commit d08a5f555a0c47ae23c0f9a890b512cb23e74feb -Author: Chris Wilson -Date: Fri Oct 24 09:53:29 2014 +0100 - - sna/trapezoids: Prevent overflow of edge gradient in mono rasteriser - - References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c76 - Signed-off-by: Chris Wilson - -commit f611f9580469661e585f419a7dd033ddffd7e20d -Author: Chris Wilson -Date: Fri Oct 24 09:41:47 2014 +0100 - - sna/trapezoids: Difference between two 32-bit quantities is 33-bits in size - - When computing the edge distance, we subtract on 32-bit quantity from - another. This requires 33-bits to store the full result so promote the - subtraction to 64-bits (rather than the result of that subtraction as - done currently). - - Reported-by: Jiri Slaby - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c76 - Signed-off-by: Chris Wilson - -commit 4df0052a21efd744c4b8cb2409139ded6e45f5c8 -Author: Chris Wilson -Date: Fri Oct 24 08:08:23 2014 +0100 - - sna: Update the reloc->delta for the shrunk batch - - As well as actually updating the value in the batch for the relocation - address, we need to tell the kernel in case it has to update the - address. - - Another regression from - commit b4872f74c05a92c91d7b57146eb35ed2ecc86d97 - Author: Chris Wilson - Date: Tue Oct 21 10:38:22 2014 +0100 - - sna: Avoid pwriting large batches - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85389 - Signed-off-by: Chris Wilson - -commit 8df8618c62c0918416ca3e21b081299eacb9b054 -Author: Chris Wilson -Date: Fri Oct 24 08:02:50 2014 +0100 - - sna: Adapt to changes in internal render API in Xorg-1.17 - - Signed-off-by: Chris Wilson - -commit a8d1eaf6ee1fed0aeff681d33864e17cb904ddd3 -Author: Chris Wilson -Date: Wed Oct 22 21:12:56 2014 +0100 - - sna: Fix use of uninitialized value when handling migration for PRIME - - sna_accel.c: In function 'sna_pixmap_undo_cow': - sna_accel.c:1933:11: warning: 'create' may be used uninitialized in this function [-Wuninitialized] - - Signed-off-by: Chris Wilson - -commit e46f26b9e2671468e9accd2f69ffc22fb96b5849 -Author: Chris Wilson -Date: Wed Oct 22 19:37:42 2014 +0100 - - sna/gen8: Load the sampler result directly into the fb write message - - With the unified register file (from gen6+), we no longer need to copy - the sample results into the final write message. - - Signed-off-by: Chris Wilson - -commit dee9ea29917dd5ef4a7de6570cd091f08d334df9 -Author: Chris Wilson -Date: Wed Oct 22 19:40:14 2014 +0100 - - sna/gen8: Override the URB output from the VS - - Using the override seems to be marginally faster. - - Signed-off-by: Chris Wilson - -commit 7a9bdadd71730adc5266bc6758982abec5917b93 -Author: Chris Wilson -Date: Wed Oct 22 19:31:10 2014 +0100 - - sna/gen8: Clamp URB allocations for GT3 - - GT3 requires some reserved space in the URB allocation and so we must - reduce the amount we allocate to our vertices. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81583 - Signed-off-by: Chris Wilson - -commit de54a93217cc550c44ee138f0511ede6925d84e0 -Author: Chris Wilson -Date: Wed Oct 22 19:30:21 2014 +0100 - - sna/gen8: Annotate more 64bit pointer locations - - Signed-off-by: Chris Wilson - -commit 2114b54a0b8a561dd7db1a38a87654571b4aa853 -Author: Chris Wilson -Date: Wed Oct 22 18:51:39 2014 +0100 - - sna: Fix double application of batch shrinking to relocation targets - - Fixes regression from - - commit b4872f74c05a92c91d7b57146eb35ed2ecc86d97 - Author: Chris Wilson - Date: Tue Oct 21 10:38:22 2014 +0100 - - sna: Avoid pwriting large batches - - NB: Remember to check your tree before pushing a simple bug fix. - - Signed-off-by: root - -commit 6e486e11a53f93b628a3a82d5b086e63b7dc6c1e -Author: Chris Wilson -Date: Wed Oct 22 07:24:10 2014 +0100 - - sna/dri2: Fix interoperation with PRIME and older Xorg - - When using the fake triple buffer implementation with recent enough Xorg - to support both real triple buffering and PRIME, we have to disable use - of SwapLimit as that freezes the client when we are instead faking the - triple buffer. (We have to use the fake support on those Xservers to - workaround crashes inside the Xserver.) - - Reported-by: Paulo Dias - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85144#c12 - Signed-off-by: Chris Wilson - -commit de96fbf66cf9a0df85cfd1dad8cf786a1d6f8325 -Author: Chris Wilson -Date: Tue Oct 21 12:20:29 2014 +0100 - - sna/trapezoids: Prefer GPU for AddTraps() - - Signed-off-by: Chris Wilson - -commit b4872f74c05a92c91d7b57146eb35ed2ecc86d97 -Author: Chris Wilson -Date: Tue Oct 21 10:38:22 2014 +0100 - - sna: Avoid pwriting large batches - - Signed-off-by: Chris Wilson - -commit 83a3d9147308f4777324abdea859ac0c108f03c6 -Author: Chris Wilson -Date: Sun Oct 19 09:11:33 2014 +0100 - - sna: Prefer the GPU for wide lines and arcs - - Signed-off-by: Chris Wilson - -commit 316155db98aac4d5d0a7077e86453e4d41a3029d -Author: Chris Wilson -Date: Sat Oct 18 10:58:03 2014 +0100 - - sna/gen6: Apply gen7 flushing - - Clemens Eisserer noticed that glyphs would randomly disapper whilst - being rendered on his Sandybridge, a sign that the GPU is not flushing - its internal state on pipeline changes. As a precaution, adopt the - Ivybridge flush semantics (whilst preserving the required Sandybridge - workarounds). - - Reported-and-tested-by: Clemens Eisserer - Reported-and-tested-by: Ilia Mirkin - References: https://bugs.freedesktop.org/show_bug.cgi?id=85158 - Signed-off-by: Chris Wilson - -commit bf7b5a24bbfc8a3553be6baa457ec92559dd3d65 -Author: Chris Wilson -Date: Sat Oct 18 10:13:31 2014 +0100 - - sna/dri2: Exchange pitches as well - - When swapping over the names, we also need to swap the pitches exposed - through the protocol as well. - - Signed-off-by: Chris Wilson - -commit 6b98f16241c2a4788f3b5fe4c0d956a849d2ac05 -Author: Chris Wilson -Date: Thu Oct 16 08:26:03 2014 +0100 - - sna: Allow TearFree updates to continue even when the GPU is wedged - - Even if we cannot render using the GPU, we should still be able to - request that the outputs be flipped. So try, and only if that fails, - resort to writing directly into the scanout. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85058 - Signed-off-by: Chris Wilson - -commit c896f249c7b64683839665ff528920382f4fc58e -Author: Chris Wilson -Date: Thu Oct 16 08:17:09 2014 +0100 - - sna: Fixup a failed per-CRTC TearFree flip - - If we fail to flip onto a new per-CRTC bo, first try a normal modeset. - This catches instances where the pitch changes for example. - - Signed-off-by: Chris Wilson - -commit 3812dfce175eeaef7f41632d2df6a0d88c0ae19b -Author: Chris Wilson -Date: Thu Oct 16 07:46:26 2014 +0100 - - sna: Replace GPU render operations with CPU callbacks after wedged - - If we find the GPU is wedged, replace some of the lowlevel render - operations with CPU equivalents to simplify some fallbacks that still - need to operate on GPU bo (such as copying DRI buffers). - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85058 - Signed-off-by: Chris Wilson - -commit 9a5ca59d2b7b209e6f56dd3f94d4ae6f06e1ecdc -Author: Chris Wilson -Date: Wed Oct 15 16:51:42 2014 +0100 - - sna: Prevent recursion during last-gasp disabling of outputs - - If we fail an execbuffer, we disable outputs and try again. (In case we - have severe fragmentation issues and need to rearrange the scanouts in - GTT.) Afterwards we re-enable the outputs, but this causes us to flush - the pending rendering and so recurse into the execbuffer. Prevent this - with a slight hack during enabling of outputs. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=85058 - Signed-off-by: Chris Wilson - -commit 49cf2803d3bc3be12f6a59581631fdf5547bb0e3 -Author: Rodrigo Vivi -Date: Mon Oct 13 11:33:27 2014 -0700 - - sna: a bit of cleanup on gen8_render.h - - Removing bits that become reserved on bdw and organizing 3DSTATE_PS header. - - Signed-off-by: Rodrigo Vivi - -commit f5935aa4bb4fbd5cc16bd7a861e12becb3c1bcd2 -Author: Rodrigo Vivi -Date: Mon Oct 13 11:33:26 2014 -0700 - - sna: Fix URB offset shift on 3DSTATE_SBE - - Unfortunatelly this doesn't the bug I was hunting, but let's follow - the spec. - - Signed-off-by: Rodrigo Vivi - -commit 2c227f391a1727f7bcfd0f03c2c75e01bf893383 -Author: Chris Wilson -Date: Mon Oct 13 09:26:12 2014 +0100 - - sna: Drain all udev events before checking output status - - As libudev only pulls off events one by one and we may need to process - several for a MST topology change, keep polling until complete. - - Signed-off-by: Chris Wilson - -commit 49376ba3bddd15e62df55928198160d9970dc1c6 -Author: Chris Wilson -Date: Sat Oct 11 21:34:40 2014 +0100 - - backlight: Open bl_power using WRONLY for writing. - - Jan spotted that we open the bl_power file using O_RDONLY and then attempt - to write the new power state into it. This fails... - - Reported-by: Jan Steffens - Signed-off-by: Chris Wilson - -commit 70a1710e18f874f9efd8e97f0f873d65bf1b46ca -Author: Chris Wilson -Date: Fri Oct 10 11:42:09 2014 +0100 - - sna/trapezoids: Sacrifice precision to avoid 64bit overflow - - References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c71 - Signed-off-by: Chris Wilson - -commit 069f7878dc57dca39ad79b2f3ad5248244090b70 -Author: Chris Wilson -Date: Fri Oct 10 11:31:45 2014 +0100 - - sna/trapezoids: Treat mono-edges within a single column as vertical - - Signed-off-by: Chris Wilson - -commit 0c1b4f913c20370736327c44a9fa3b5c55c05d52 -Author: Chris Wilson -Date: Fri Oct 10 08:35:16 2014 +0100 - - sna: Log if we disable the backlight after failure to switch it on - - Signed-off-by: Chris Wilson - -commit f7f7383de0da0776cfbe98481578ab6680732a2a -Author: Chris Wilson -Date: Thu Oct 9 16:35:36 2014 +0100 - - compat: Hide changes in miHandleExposures() interface - - Signed-off-by: Chris Wilson - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84901 - -commit c139e2fb95f2db0b39aadcd58cc63b316a278951 -Author: Chris Wilson -Date: Wed Oct 8 13:59:55 2014 +0100 - - intel: Store pointer to struct intel_device - - Beware the barbarians at the gate, who invade and steal your ScrnInfoPtr - and its Entity from underneath you. In some configurations, we lose - access to the struct intel_device stored on the Entity after - initialisation, causing havoc. Workaround this by storing the - intel_device that we open in our driverPrivate. - - Signed-off-by: Chris Wilson - -commit 57c48e4973ac0dad09744eaa82315a5f023094e7 -Author: Chris Wilson -Date: Tue Oct 7 21:08:52 2014 +0100 - - sna: Fix the TearFree flip handler for the change in argument order - - From the last commit c481254c17316e6c8299705fd0a218484dd369fe, - we need to pass along the private pointer as the flip data as we no - longer pass it down from the caller. - - Signed-off-by: Chris Wilson - -commit c481254c17316e6c8299705fd0a218484dd369fe -Author: Chris Wilson -Date: Tue Oct 7 16:24:18 2014 +0100 - - sna: Retrieve private pointer from vblank cookie - - When using ZaphodHeads, we share the /dev/dri/card0 fd between both - screens. So when we read an event back from the fd, it could be for - either head and we cannot assume that our private pointer is valid for - the data passed along with the event. Instead, we need to retreive that - pointer from the event. - - Fixes regression from - - commit 8369166349c92a20d9a2e7d0256e63f66fe2682b [2.99.912] - Author: Chris Wilson - Date: Wed Jun 4 08:29:51 2014 +0100 - - sna/dri2: Enable immediate buffer exchanges - - although the design bug is actually older. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84744#c15 - Signed-off-by: Chris Wilson - -commit 9ed1ac8b506509be410c12870397417c7638886e -Author: Chris Wilson -Date: Mon Oct 6 21:37:14 2014 +0100 - - sna: Wrap rrGetInfo so that we can probe when udev is not active - - If the ddx is configured without udev support, we do not receive - notifications when the MST topology is changed. This leads us to query - the kernel for bad connectors, and so we end up reporting an unknown - connection status for them, which the user and client often find - confusing. However, we can not simply act upon the detection failure as - we are too deep inside the callback chain and cannot change the arrays of - known connectors whilst iterating over them. A neat compromise is to - hook into the rrGetInfo call chain and poll for MST changes before we - report back the current configuration. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=84718 - Signed-off-by: Chris Wilson - -commit dff59000d43c5449b3ed79ff144236c17b507bd6 -Author: Chris Wilson -Date: Tue Oct 7 07:18:47 2014 +0100 - - sna/trapezoids: Remove stale assert - - The variable changed meaning, but the assert did not. Fix that up. - - Reported-by: Matti Hämäläinen - Signed-off-by: Chris Wilson - -commit 11c7f2d2f485e75feadb15d388960c581a96154d -Author: Chris Wilson -Date: Tue Oct 7 07:18:22 2014 +0100 - - sna: Add pixmap id to DBG hints inside rende migration - - Signed-off-by: Chris Wilson - -commit ec2b9ac81aed0d2dda2948171ca1c260184bf221 -Author: Chris Wilson -Date: Mon Oct 6 08:18:24 2014 +0100 - - sna: Avoid the intermediate allocation for PRIME pixmaps - - If we attempt to share an unused Pixmap, we first create an ordinary GPU - bo when migrating onto the GPU. Add a flag here to cause the migration - to create a Pixmap suitable for PRIME instead. - - Signed-off-by: Chris Wilson - -commit 649b233f12bdf04c449a813c3a150ac3ccfcab72 -Author: Chris Wilson -Date: Sun Oct 5 11:06:36 2014 +0100 - - sna/trapezoids: Remove redundant coverage scaling - - Since we do not perform an analytical pass, we can count samples directly. - - Signed-off-by: Chris Wilson - -commit 191c6b6ca7b3d2a1040c2633929845117ba1f1af -Author: Chris Wilson -Date: Sun Oct 5 09:05:20 2014 +0100 - - sna/trapezoids: Improve sample locations for imprecise rasterisation - - We need to sample at the mid-point of each subrow rather than at the - top and preserve the full precision of the edge gradients. - - Signed-off-by: Chris Wilson - -commit aa89ef69ac413abc65268a3758979b0edd1f3000 -Author: Chris Wilson -Date: Sun Oct 5 09:20:12 2014 +0100 - - sna: Double check for no residual CPU damage along redisplay fast path - - If we are using a CRTC source pixmap, it is possible that it is on the - CPU with a GPU bo and so requires flushing prior to the copy. - - Signed-off-by: Chris Wilson - -commit e50e1bb3fd2fd20cce580841b20a3e47c7111ee9 -Author: Chris Wilson -Date: Sun Oct 5 08:12:52 2014 +0100 - - sna: Only use copy redisplay fast path if we have a source GPU bo - - Odd as it may seem, but we can end up attempting to copy from a source - CRTC pixmap that is not on the GPU. Here we need to use the heavyweight - path to handle its composition normally. - - Reported-by: Christoph Haag - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653 - Signed-off-by: Chris Wilson - -commit 7d60a9be3da1163866573d2ffda9635a914ac795 -Author: Chris Wilson -Date: Fri Oct 3 17:20:31 2014 +0100 - - sna: Update vblank interval after enabling outputs - - In a couple of cases we can re-enable CRTC. After doing so we should - recompute the minimum vblank interval. - - Signed-off-by: Chris Wilson - -commit a797c192adcc2b7aa9101089d3ee84b3e4f968ad -Author: Chris Wilson -Date: Thu Oct 2 07:22:39 2014 +0100 - - sna/dri2: Disable tracking stale back buffers without reuse-notifications - - If the Xorg does not support the ReuseNotify callback, and we use - double-bufferred pageflips, we set the stale flag on the backbuffer but - never clear it. This results in, for example, a compositor with Xorg-1.15 - and Prime active from updating the framebuffer. - - Reported-by: Dave Airlie - Signed-off-by: Chris Wilson - -commit de7185bbf48ca2f617466b98328d0fdae4df1b44 -Author: Chris Wilson -Date: Wed Oct 1 10:28:10 2014 +0100 - - sna/trapezoids: Fix comparison on right edge of trapezoids - - We need to compare the fixed ceiling rather the floor for accuracy. - - Signed-off-by: Chris Wilson - -commit c6d9303303a5ccb3ec6d072c510c09d6576cb398 -Author: Chris Wilson -Date: Wed Oct 1 10:25:16 2014 +0100 - - sna/trapezoids: Consistently use NO_GPU_THREADS to disable threading for DBG - - Signed-off-by: Chris Wilson - -commit bca08dc4155c0ee304c60340ccf95fe7b03ac11b -Author: Chris Wilson -Date: Mon Sep 29 19:30:03 2014 +0100 - - sna/trapezoids: Fix loss of precision through projection onto sample grid - - Preserve the original precision for the line vectors of the trapezoids, - and leave the final projection onto the x-cell until last. - - Finishes accidental wip commit in 8aff3898c35e3. - - Signed-off-by: Chris Wilson - -commit 6284ca5a7ebe9171abff6b41ad1644d7b7d0c7df -Author: Chris Wilson -Date: Mon Sep 29 16:32:30 2014 +0100 - - sna: Fix SHOW_BATCH_AFTER debugging aide - - Signed-off-by: Chris Wilson - -commit 8aff3898c35e348cec26db401047a562eb5ffa49 -Author: Chris Wilson -Date: Mon Sep 29 16:30:39 2014 +0100 - - sna: Clear padding in rotation properties for valgrind - - Signed-off-by: Chris Wilson - -commit 4a23d24db676dd7b535f226ff9624f892a53842a -Author: Chris Wilson -Date: Mon Sep 29 07:39:06 2014 +0100 - - sna; Markup that we are ignoring errors from early ScreenCreateResources - - In the early move-to-gpu in ScreenCreateResources we purposefully ignore - any errors from the move-to-gpu as they will be fixed up later when we - try to bind to the CRTCs. Mark it as ignored for future readers. - - Signed-off-by: Chris Wilson - -commit d036cdedf0913384b1e45bba80aa2c816be9c350 -Author: Chris Wilson -Date: Sun Sep 28 18:00:25 2014 +0100 - - sna: Use move-to-gpu for explicit handling of damage during fbcon copy - - Whilst it is unlikely that we do have any damage queued to the - frontbuffer prior to the copy, it is safer to use the migration tracking - machinery rather than guess. - - Signed-off-by: Chris Wilson - -commit ac492b9af99919d7c579ee4dd636ef6aab90c945 -Author: Chris Wilson -Date: Sat Sep 27 16:40:19 2014 +0100 - - man: Mention Option "AccelMethod" "none" - - Currently we only refer to "off" to disable the acceleration, but "none" - is probably more familar to users of other drivers. - - Signed-off-by: Chris Wilson - -commit 38e8c9104265440242dac2f0ef5b8c619a285be7 -Author: Chris Wilson -Date: Sat Sep 27 09:37:18 2014 +0100 - - man: Document the extended values supported by Option "DRI" - - Signed-off-by: Chris Wilson - -commit f785035d5bd42a778d4be0bf3ff8678bd7a7e503 -Author: Chris Wilson -Date: Fri Sep 26 21:01:43 2014 +0100 - - sna: Allow move-to-gpu to fail during ScreenCreateResources - - Before we attach the Screen Pixmap to the scanout, we will have to - create a GPU bo and apply any fixups as required. Therefore failing to - pre-emptively move it during ScreenCreateResource is not fatal and the - failure can be simply ignored. - - Suggested-by: Egbert Eich - Signed-off-by: Chris Wilson - -commit abc9b3f5753d602da296d50c8769cefb88ec473d -Author: Chris Wilson -Date: Fri Sep 26 09:22:50 2014 +0100 - - Add Skylake PCI IDs - - From kernel commit 72bbf0af0c76cbefe9cecbd2ed670b7555e03625 - Author: Damien Lespiau - Date: Wed Feb 13 15:27:37 2013 +0000 - - drm/i915/skl: Add the Skylake PCI ids - - Signed-off-by: Chris Wilson - -commit 7302f8a6482f4eed497536fc5a8a487c10da4d52 -Author: Chris Wilson -Date: Thu Sep 25 16:44:08 2014 +0100 - - sna: Pass scanout hints along to move-to-gpu - - Signed-off-by: Chris Wilson - -commit e9087f50bf6dafff87c566d3bdbe6cef29d71fde -Author: Chris Wilson -Date: Thu Sep 25 16:41:11 2014 +0100 - - sna: Check scanout Pixmaps are the correct pitch and convert if necessary - - As a final precaution, fixup the pitch on the bo to be used for - scanout by switching the bo on the Pixmap for a new correctly aligned - scanout bo. - - Reported-by: Egbert Eich - Signed-off-by: Chris Wilson - -commit 9f7c1a4c4f2a6352263c36e75a984ed4095adbc0 -Author: Chris Wilson -Date: Thu Sep 25 16:29:14 2014 +0100 - - sna: Check for scanout pitch restrictions on linear GPU bo - - When converting a linear cached CPU bo into an uncached GPU bo, we must - be careful to adhere to the scanout restrictions if they apply for this - transfer or this Pixmap. - - Reported-by: Egbert Eich - Signed-off-by: Chris Wilson - -commit 4827c518fe3323eedb56e7af7aef33801236d11f -Author: Chris Wilson -Date: Thu Sep 25 16:22:06 2014 +0100 - - sna: Use shadow CRTC bo if we fail to obtain an framebuffer for the Pixmap - - This should mask driver bugs whereby we ask the kernel to make a - framebuffer out of an improper bo. - - Signed-off-by: Chris Wilson - -commit f3d27eec52cac63378c0e466db971ae125c813a1 -Author: Chris Wilson -Date: Wed Sep 24 16:16:25 2014 +0100 - - sna/gen4+: Assert that the offset coordinate is within range if negative - - Invalid negative offsets could slip into the drawing rectangle - without triggering the assertion - the assertion being that they were - not greater than the maximum positive coordinate of the 3d engine. - - Signed-off-by: Chris Wilson - -commit a60ccd546e081f5b7bd7de762e1638927a4145a2 -Author: Chris Wilson -Date: Wed Sep 24 15:55:11 2014 +0100 - - sna: Relax constant numCrtcs assertion when ZaphodHeads is active - - If ZaphodHeads is active, each screen only has a subset of the CRTC - assigned to it, in fact just the single CRTC associated with the pipe of - that screen. In that case, we only expect to have the single CRTC and so - should not assert that we have a list of all CRTCS. - - It should still hold that we dynamically attach ZaphodHeads upon - hotplugging, so it is just the assert that is overzealous. - - Reported-by: Nick Bowler - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84281 - Signed-off-by: Chris Wilson - -commit 7637f547ca34668ef9d4f0c417de16e7126927b5 -Author: Chris Wilson -Date: Wed Sep 24 15:43:53 2014 +0100 - - sna: Tweak partial Picture extraction to prefer limiting to max 3D coordinates - - Where possible, keep the offset of the partial Picture within the 3D - coordinate limit so that we can use the DrawRectangle offset to - automatically adjust the coordinates. - - Signed-off-by: Chris Wilson - -commit 65a23ef90975f95444da103f45eb240b2895ef44 -Author: Chris Wilson -Date: Wed Sep 24 14:06:30 2014 +0100 - - sna: Reuse the same buffer when panning large CRTCs - - Rather than alternating between a pair of fb each time, we can reuse the - last shadow buffer so long as it remains the right size. - - Signed-off-by: Chris Wilson - -commit 911a0ad8d0520554dc55883997dd59dc3f5f9139 -Author: Chris Wilson -Date: Wed Sep 24 08:05:01 2014 +0100 - - sna/trapezoids: Flesh out alternate rasterisers for tristrips - - And undo the accidental commit of - - commit 4e00cbe35d1a409a02ee27d991213d9a0807e500 - Author: Chris Wilson - Date: Mon Sep 22 08:54:57 2014 +0100 - - traps - - Signed-off-by: Chris Wilson - -commit dbe6d105a60ff28419b549d439bbb29f50b28f08 -Author: Egbert Eich -Date: Wed Sep 24 08:18:32 2014 +0200 - - sna: Validate framebuffer tiling before creation - - In sna_pixmap_alloc_gpu() a different than the default tiling may be picked - by a usage hint. Before passing the tiling to kgem_create_2d() fix it up - by calling kgem_choose_tiling(). This avoids kgem_surface_size() not being able - to find a surface size for the tiling value. - - Fixes regression from - - commit a10781b70f222f3997928fa979f6292617f79316 [2.99.913] - Author: Chris Wilson - Date: Tue Jul 1 15:11:07 2014 +0100 - - sna: Enforce LinearFramebuffer option - - Signed-off-by: Egbert Eich - -commit b9dddc051d57b313fdc9f14ec388b060fdff3924 -Author: tobias.jakobi1@uni-bielefeld.de -Date: Tue Sep 23 20:13:11 2014 +0200 - - uxa/video: only call intel_xvmc_adaptor_init when xvmc is enabled - - Build regression from - - commit 616dea2c67847101fd43b5d89b556b3702c7f0bb - Author: Keith Packard - Date: Thu Jul 24 10:27:55 2014 -0700 - - Rename uxa-specific functions and structs - - Signed-off-by: Tobias Jakobi - -commit fe6ab444ad9d138aa011df6cee9f2cee65dbf493 -Author: Chris Wilson -Date: Wed Sep 24 07:54:39 2014 +0100 - - sna: Initialise the per-CRTC shadow bo on first use - - When we create the shadow pixmap for the CRTC, we should copy the - framebuffer contents into the shadow before we show it the first time. - This saves us from showing stale contents until the next redrawn in the - BlockHandler - with the proviso that we can do the copy on the GPU. - - Signed-off-by: Chris Wilson - -commit 1e403716d387be1d741537e02db207416080dbeb -Author: Chris Wilson -Date: Wed Sep 24 07:37:32 2014 +0100 - - sna/present: Make DBG statements uniform before present_event_notify() - - Signed-off-by: Chris Wilson - -commit 4e00cbe35d1a409a02ee27d991213d9a0807e500 -Author: Chris Wilson -Date: Mon Sep 22 08:54:57 2014 +0100 - - traps - -commit 376037e6336dfc3b32c51b774ab8a80f64390e02 -Author: Chris Wilson -Date: Sun Sep 21 19:51:47 2014 +0100 - - sna: Skip present unflip if the output is rotated - - With a rotated output and shadow buffers, we never perform the flip in - the first place and so can ignore the unflip request as well. - - Reported-by: Mihail Kasadjikov - References: https://bugs.freedesktop.org/show_bug.cgi?id=84105 - Signed-off-by: Chris Wilson - -commit 061785b1688de8dbf7ce9a423d16fb6d52518dc7 -Author: Chris Wilson -Date: Sun Sep 21 16:44:25 2014 +0100 - - sna/dri2: Decouple the Client event link on Drawable free - - We need to keep the two lists in check across asynchronous client/window - destruction. - - Signed-off-by: Chris Wilson - -commit cae4f4af2a0174ef36b9292eef7b9cf57afbfe83 -Author: Chris Wilson -Date: Sat Sep 20 19:24:33 2014 +0100 - - sna/trapezoids: Thread tristrip rasterisation - - Signed-off-by: Chris Wilson - -commit 12fc6687949c299d8c13751663217e7b37be7e43 -Author: Chris Wilson -Date: Fri Sep 19 11:00:39 2014 +0100 - - sna/gen8: Update DBG output of surface offset - - Signed-off-by: Chris Wilson - -commit 5ddd106e8f9b6a8176a7a5a82928067feaec0e03 -Author: Chris Wilson -Date: Thu Sep 18 10:34:11 2014 +0100 - - uxa/glamor: Silence compiler warnings - - Mark the stub intel_glamor_fd_from_pixmap() as inline to silence the - compiler warnings about unused function definitions. - - Signed-off-by: Chris Wilson - -commit 2a4855a633f42d90e11f5c51342c514c2dc24307 -Author: Chris Wilson -Date: Tue Sep 16 20:26:28 2014 +0100 - - sna: Constify argument to box_from_seg() - - Signed-off-by: Chris Wilson - -commit 1cc9762b08a127a2475a44da71ca07cb294562f2 -Author: Chris Wilson -Date: Tue Sep 16 12:14:31 2014 +0100 - - uxa: Fix conversion of Segments into Rectangles - - The trick is to make sure we consider the CapLast setting in the - direction the line is being drawn and adjust the inked pixels - accordingly. - - Testcase: DrawSegments/hv0 - Reported-by: Russell King - Signed-off-by: Chris Wilson - -commit db157b42aaa7880d98fed3e7493a19471e86e534 -Author: Chris Wilson -Date: Tue Sep 16 11:56:07 2014 +0100 - - test: Add DrawSegments - - Compare fb/ddx for many DrawSegments operations. - - Signed-off-by: Chris Wilson - -commit e453f276daa33a66a665e446a071d27e56ff15fe -Author: Chris Wilson -Date: Mon Sep 15 12:08:59 2014 +0100 - - sna/io: Initialise return code to catch early segfaults - - In case we are ever given an invalid buffer that we then attempt to read - past the end. - - Signed-off-by: Chris Wilson - -commit d470f0f520f6bd160ae4acef2b4b3c86afd8dbbd -Author: Chris Wilson -Date: Mon Sep 15 11:36:20 2014 +0100 - - sna: Last ditch attempt to make extra large batches fit - - If we have unfortunate fragmentation, e.g. a cursor is pinned in the - middle of an aperture, we can struggle to fit large objects, especially - fenced objects on gen2/gen3. We do have one last trick up our sleeves - that we can try: disable all of the outputs and cursors and try - submitting the batch in as pristine an aperture as we can arrange. We - can only hope that the subsequent restoration of the outputs is more - conducive to future batches (and so not lead us into continual flicker). - - Signed-off-by: Chris Wilson - -commit 435fe185e335a147f5edb803561509e1f0cb4e70 -Author: Chris Wilson -Date: Mon Sep 15 09:09:19 2014 +0100 - - sna: Update the list of outputs after a failed modeset - - In case we have a hotplug at just the wrong time, we can fail a modeset - with a stale connector. Before attempting to recover, probe the kernel - for the current state. - - Signed-off-by: Chris Wilson - -commit 067115a51b2646538a38ba603c688233c61e23cd -Author: Chris Wilson -Date: Mon Sep 15 08:44:41 2014 +0100 - - uxa: Stub out intel_sync_init|fini when not compiled in - - In order to fix the build without DRI3, we need to stub out the - functions not compiled in, such as intel_sync_fini(). - - Reported-by: Sedat Dilek - Signed-off-by: Chris Wilson - -commit 0d451ee3891d87268322dc3b72b487fdd2fbade6 -Author: Chris Wilson -Date: Mon Sep 15 08:15:04 2014 +0100 - - configure: Require the presence of xorg/glamor.h for --enable-glamor - - Check that we have the required Xorg headers for glamor if the user - requests --enable-glamor. There is a possiblity that the headers - mismatch as they don't have internal versioning, but this should catch - the majority of errors early on. - - Signed-off-by: Chris Wilson - -commit 11444619457aa8121efc937291f1d944ac42265d -Author: Keith Packard -Date: Sat Sep 13 01:09:48 2014 -0700 - - glamor: Do version check for fd <-> pixmap functions - - glamor_pixmap_from_fd and glamor_fd_from_pixmap were added before - version 1.15.99.902, so check for that version before trying to use them. - - Signed-off-by: Keith Packard - Tested-by: Fabio Pedretti - -commit 48f6406a62c06a09b173d82b8eb79761188ff717 -Author: Keith Packard -Date: Sat Aug 16 19:05:57 2014 -0700 - - Use intel_uxa.h in all uxa-specific files - - Instead of always including intel_uxa.h from intel.h, and including - uxa.h from some files directly, use intel_uxa.h directly from .c files - that have UXA-specific code in them. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 8b59a88c23c4795f6d829efb91a0d40e52d20014 -Author: Keith Packard -Date: Sat Aug 16 18:42:28 2014 -0700 - - intel_present.c does not need to include uxa.h - - There aren't any symbols from uxa.h used in this file, remove the #include. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit d83b30b7042dd0207116f4a059637794c4becb04 -Author: Keith Packard -Date: Sat Aug 16 18:40:40 2014 -0700 - - Move some UXA-specific code under #if USE_UXA. - - This makes the UXA-specific elements of intel_screen_private and a bit - of code in intel_driver covered under #if USE_UXA - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit e3c06746c7c22dcc2a862859c6f45dd1dfecdca7 -Author: Keith Packard -Date: Sat Aug 16 18:34:55 2014 -0700 - - Move UXA hardware initialization into intel_uxa_init - - Pull this uxa-specific step out of I830ScreenInit - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 876185cceeb9589ae395e0c2eedd163129f1e51b -Author: Keith Packard -Date: Thu Jul 24 11:02:35 2014 -0700 - - Add intel_flush to abstract flushing pending acceleration operations - - intel_flush flushes any pending acceleration operations to the - hardware, just like intel_uxa_batch_submit does today except that it is - not uxa-specific. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 616dea2c67847101fd43b5d89b556b3702c7f0bb -Author: Keith Packard -Date: Thu Jul 24 10:27:55 2014 -0700 - - Rename uxa-specific functions and structs - - This starts to separate uxa from the rest of the driver by renaming - uxa-specific functions and structs to make it clear which portions of - the driver are uxa-specific and which are common. - - Signed-off-by: Keith Packard - Acked-by: Eric Anholt - -commit 57c67199d043f3a653436769f1a69947a96d9d5b -Author: Keith Packard -Date: Sat Jul 19 19:54:39 2014 -0700 - - Move intel_alloc_framebuffer to intel_memory.c - - UXA and Glamor both share this function, so move it out of the UXA file. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit ff67a8d885d12d52693c33c52f3c551f69a8acf7 -Author: Keith Packard -Date: Sat Jul 19 19:59:43 2014 -0700 - - Do more checks for proposed flip pixmaps - - Make sure the pitch matches the current framebuffer. - Make sure there's a BO we can get at. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 61305740ef3dcd4ee10b335574d659d7c886d29a -Author: Keith Packard -Date: Sat Aug 16 17:05:35 2014 -0700 - - Eliminate pixmap private 'stride' field, which duplicates devKind - - The pixmap private stride field is an exact duplicate of the devKind - field present in the core pixmap; eliminate the duplicate value and - replace references by calls to intel_pixmap_pitch. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 1ac76b47b3dd8d14017271f5abd72664c71021c5 -Author: Keith Packard -Date: Tue Jul 22 00:54:16 2014 -0700 - - Don't use GetScratchPixmapHeader for shadow pixmaps - - GetScratchPixmapHeader should only be used for local memory pixmaps, - as used by PutImage and friends. That's because when you free the - scratch pixmap header, it doesn't actually free the pixmap; instead, - it gets stuffed in pScreen->pScratchPixmap and any private data stored - on it will be left hanging around forever. - - In the case of glamor, that private data includes all of the GL - state. Using that scratch pixmap later results in glamor getting - mightily confused as the pixmap and underlying objects do not match. - - Avoid this by allocating pixmap headers explicitly for this purpose. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 4f5a5683979bae2283775f3b94da32a05e24e0c0 -Author: Keith Packard -Date: Sat Aug 16 18:36:57 2014 -0700 - - Declare variable holding option value as 'const char *' - - This matches the type of xf86GetOptValString. - - Signed-off-by: Keith Packard - -commit 4e77993e9965ca65e66bd42b688f7f2e64dd3a7d -Author: Keith Packard -Date: Wed Jul 30 23:40:55 2014 -0700 - - Remove redundant calls to drm_intel_bo_disable_reuse - - intel_allocate_framebuffer has already made the call in each of these - code paths. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit c2f214fb549499fe2a1ab245e0438270b1a935ed -Author: Keith Packard -Date: Sat Jul 19 19:52:56 2014 -0700 - - Fix present debug output - - Was using 'low_msc', which isn't defined anymore. - - Signed-off-by: Keith Packard - Reviewed-by: Eric Anholt - -commit 9ca7b8771c7f5253fdcafafed751af31f1ad3828 -Author: Keith Packard -Date: Fri Sep 12 13:44:49 2014 -0700 - - glamor: Add DRI3 support to glamor code paths - - This creates wrappers to invoke glamor functions for pixmap_from_fd - and fd_from_pixmap when the driver is using glamor. - - Signed-off-by: Keith Packard - -commit fa6f6839dc7e23cdbeef4379ded31ead3ea3968c -Author: Keith Packard -Date: Tue Jun 17 18:12:42 2014 -0700 - - Correct BO allocation alignment - - BO allocations for pixmaps must be aligned to the tile height, but at - some point the code was changed to align them to twice the tile - height. This overallocates pixmaps, wasting memory, but more - importantly, for buffers allocated by DRM and shared through DRI3, the - stricter alignment check causes sharing to fail. - - From reading through the history of the code and related bugs, it - seems like this change was part of a set of changes trying to address - what turned out to be a kernel regression. Reverting this change - solves the DRI3 problem and saves a bit of memory for pixmap - allocations. - - Signed-off-by: Keith Packard - Tested-by: Kenneth Graunke - Reviewed-by: Eric Anholt - -commit c2a834689142a1b9d8bbe48a6cdc0f5286d8b7e5 -Author: Keith Packard -Date: Wed Sep 10 09:35:38 2014 -0700 - - Do not clear pending kernel events on mode switch - - Let the kernel send these back to us so that DIX hears about them in - the usual way. - - Mode setting while Present has a flip active will trigger an unflip - before the mode is changed. The event from that unflip will not get - processed before the mode switch is executed. Clearing the driver - queue at mode switch time will discard the connection between the - kernel event and the present callback so that DIX will never know that - the flip pixmap is idle. - - Signed-off-by: Keith Packard - Tested-by: Kenneth Graunke - -commit 7ed66ca0fd1160ede890c216c35d4ac42a98ab57 -Author: Chris Wilson -Date: Fri Sep 12 21:17:04 2014 +0100 - - sna: Remvoe unused code - - sna_trapezoids_precise.c:566:1: warning: unused function - 'polygon_add_line' [-Wunused-function] - - gen4_vertex.c:3093:1: warning: unused function - 'gen4_choose_spans_vertex_buffer' [-Wunused-function] - - Reported-by: Zdenek Kabelac - -commit f0d5dbe9bf0d507fd5b60bd7a90be09351f75249 -Author: Chris Wilson -Date: Fri Sep 12 21:16:12 2014 +0100 - - sna: Fix include guard - - ./xassert.h:24:9: warning: '__XASSERT_H___' is used as a header guard - here, followed by #define of a different macro [-Wheader-guard] - ^~~~~~~~~~~~~~ - ./xassert.h:25:9: note: '__XASSERT_H__' is defined here; did you mean - '__XASSERT_H___'? - ^~~~~~~~~~~~~ - __XASSERT_H___ - - Reported-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit 7548f77fff1832c038e624c655d534387619d825 -Author: Chris Wilson -Date: Fri Sep 12 21:15:18 2014 +0100 - - intel-virtual-output: Initialise width/height for a disabled output - - virtual.c:1081:6: warning: variable 'width' is used uninitialized - whenever 'if' condition is true [-Wsometimes-uninitialized] - if (clone->dst.mode.id == 0) { - ^~~~~~~~~~~~~~~~~~~~~~~ - virtual.c:1092:6: note: uninitialized use occurs here - if (width == clone->width && height == clone->height) - ^~~~~ - virtual.c:1081:2: note: remove the 'if' if its condition is always false - if (clone->dst.mode.id == 0) { - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - virtual.c:1079:11: note: initialize the variable 'width' to silence this warning - int width, height; - - Reported-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit a5a51b55ec07e03c87a9916eca6d023ccaf7d00b -Author: Chris Wilson -Date: Fri Sep 12 14:31:22 2014 +0100 - - sna: Mark the CRTC as disabled when hiding the plane - - Signed-off-by: Chris Wilson - -commit 5ce4b344e497364b16a507b39b7637a00daa957a -Author: Chris Wilson -Date: Fri Sep 12 14:29:12 2014 +0100 - - sna: Avoid stalls when promoting to the GPU before an operation - - In particular, the promotion of an active snooped bo into an uncached - linear GPU bo was being performed on a busy buffer and forcing a stall. - - Signed-off-by: Chris Wilson - -commit fc4bc3cde9e35ecde5b2c8eeecdbbb6ba29f32ae -Author: Chris Wilson -Date: Fri Sep 12 16:10:12 2014 +0100 - - sna: Initialise remaining batch space - - Another missed gcc warning resulting in a crash due to a missing - kgem_batch_space() initialisation. - - Reported-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit 9fb399aee99ad98996f872477c133f08795ec54c -Author: Chris Wilson -Date: Fri Sep 12 08:24:06 2014 +0100 - - sna/blt: Fix computation of remainaing boxes on gen8+ - - Signed-off-by: Chris Wilson - -commit e3edf2948467ad989590a347ffe687780192be16 -Author: Chris Wilson -Date: Fri Sep 12 07:53:12 2014 +0100 - - sna: DBG compile fix - - Dereference the right output for the name in the new backlight - functions. - - Signed-off-by: Chris Wilson - -commit 1aefd16964c30264c05d136cef3e1e7de5eb9c53 -Author: Chris Wilson -Date: Fri Sep 12 07:46:43 2014 +0100 - - sna: Use default monitor options on the first output - - commit 6554cf0a69f04710b64f3488384fe5cb2748dc35 - Author: Chris Wilson - Date: Mon Aug 11 12:22:17 2014 +0100 - - sna: Parse output options early during initialisation - - rearranged the monitor query to before the num_outputs increment. The - result was that it choose the second output as the default and not the - intended first. - - Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=522500 - Signed-off-by: Chris Wilson - -commit 9e397830f5ea56f2e43430666c78ffc574058d45 -Author: Chris Wilson -Date: Thu Sep 11 17:02:37 2014 +0100 - - sna/gen8: Re-enable userptr - - Current testing says that it is stable now... Let's see how long that - holds. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=79053 - Cc: Mika Kuoppala - Signed-off-by: Chris Wilson - -commit 797369449b87cbd578f9fb96f34b065e548755f6 -Author: Chris Wilson -Date: Thu Sep 11 09:37:11 2014 +0100 - - sna: Do not mark the pixmap as cleared in the middle of a miSpans decomposition - - As the miSpans will continue to overdraw the Pixmap, it's final state - will no longer be that clear value. We need to be much more careful when - allowing that optimisation. - - Reported-by: Tyler Foo - References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 - Signed-off-by: Chris Wilson - -commit fda1ffb07e17469771bba7a8d53fd44c43ee3333 -Author: Chris Wilson -Date: Thu Sep 11 08:11:34 2014 +0100 - - sna: Request the backlight to be disabled along with DPMS off - - When we turn off the screen, either at the user request or when - disabling an output, request that the associated backlight (which may - only be known to userspace) also be disabled. - - Signed-off-by: Chris Wilson - -commit 08921e4bda0114c66270e500090e4cfd29f74d39 -Author: Chris Wilson -Date: Thu Sep 11 08:03:41 2014 +0100 - - backlight: Expose interface to switch backlight on/off entirely - - A feature in recent kernels is to disambiguate between the meaning of - brightness=0, between disabling the the backlight entirely or setting - the lowest valid brightness. As such, we now have an extra knob in sysfs - to explicitly request that the backlight be turned off. - - Signed-off-by: Chris Wilson - -commit f2b62ab38f0f5970b2f868e10dc3499ff3118dbb -Author: Chris Wilson -Date: Wed Sep 10 16:52:36 2014 +0100 - - sna: Prune damage that covers the entire target Pixmap - - Reduce it early and mark it complete. - - Signed-off-by: Chris Wilson - -commit 9b25eeee85d32223841640c3a39901e4b63707ce -Author: Chris Wilson -Date: Wed Sep 10 16:37:16 2014 +0100 - - sna: Do apply damage twice for miSpans.PolyFillRect - - As the caller will apply the damage afterwards, we do not need to do the - accumulation in the miSpans callbacks and it presumes that its damage is - unaltered. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 - Signed-off-by: Chris Wilson - -commit 224af800f695b50ba5a65b5a2b9ca1e7a88d4e1a -Author: Chris Wilson -Date: Wed Sep 10 11:48:40 2014 +0100 - - sna: Emit assertions with FatalError - - The intention is to be able to capture the assertion in the Xorg.0.log - (journald equivalent). At the moment, it is emitted to stderr which is - difficult to capture and defeats the goal of only asking the reporter to - upload one log file. - - Signed-off-by: Chris Wilson - -commit 0d1df4762ffd7babb95a5f48f77487a6c7db83fe -Author: Chris Wilson -Date: Wed Sep 10 08:36:18 2014 +0100 - - sna: Relax early failure to set KMS modes - - Under the new world order, we may not have KMS rights until we are given - a VT. - - Signed-off-by: Chris Wilson - -commit f39e1d19c166a97a74974edf3fe79082d3a46d2b -Author: Chris Wilson -Date: Wed Sep 10 07:04:55 2014 +0100 - - sna: Fix use of GETBLOB ioctl for grabbing the MST path - - Unlike the other drm getters, GETBLOB insists on the exact length rather - than being told the buffer size. - - Reported-by: Dave Airlie - Signed-off-by: Chris Wilson - -commit 07fe45b84bdf0d236a5bfdc433cc1a908e0c161b -Author: Chris Wilson -Date: Tue Sep 9 08:12:45 2014 +0100 - - sna/glyphs: Prevent NULL vfunc deref with glyphs - - Requires running a PRIME setup with Intel loaded as the secondary GPU - and attempting to execute an empty glyph string. - - Signed-off-by: Chris Wilson - -commit faf0bdd477b9ec73f943c3101a3ae30fd6d579ea -Author: Chris Wilson -Date: Tue Sep 9 07:36:40 2014 +0100 - - sna: Add some DBG spam for BLT boxes - - References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 - Signed-off-by: Chris Wilson - -commit e0f7e9fc2f0b39b9e939ff48edea29950f125420 -Author: Chris Wilson -Date: Mon Sep 8 16:49:29 2014 +0100 - - sna: Initialise and check for batch space - - commit 30932a7b9d255c2037bee19e01aa3edc37b07386 - Author: Chris Wilson - Date: Mon Sep 8 12:41:06 2014 +0100 - - sna: Avoid u16 underflow when computing reserved batch space - - relied on gcc a little to much to warn me when I missed initialising 'rem' - - References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 - Signed-off-by: Chris Wilson - -commit 30932a7b9d255c2037bee19e01aa3edc37b07386 -Author: Chris Wilson -Date: Mon Sep 8 12:41:06 2014 +0100 - - sna: Avoid u16 underflow when computing reserved batch space - - If we filled the batch exactly, then subtract -1 for the reserved - BATCH_BUFFER_END, it would underflow to a large value - convincing us - that we had sufficient room to stuff many, many more commands in. - - However, all the callsites should be guarded by checking already that - they had sufficient space to emit at least one operation... - - References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 - Signed-off-by: Chris Wilson - -commit 692c14d405bb352697b67f36a034d4963e272b66 -Author: Chris Wilson -Date: Mon Sep 8 08:53:32 2014 +0100 - - 2.99.916 snapshot - -commit 84fb3bb65ff917b908a1036540432bfd5525481d -Author: Dave Airlie -Date: Mon Sep 8 17:46:18 2014 +1000 - - uxa: actually create the randr outputs for hotplug connectors - - I somehow lost this chunk in my mst patch I sent. - - Signed-off-by: Dave Airlie - -commit 001c542618aad25137029dcc28aa520766040964 -Author: Chris Wilson -Date: Mon Sep 8 07:54:25 2014 +0100 - - 2.99.915 snapshot - -commit db01c9d627412f05f5e5448b5f4c1d3814d522fa -Author: Chris Wilson -Date: Mon Sep 8 07:13:47 2014 +0100 - - sna: Fix backlight assertion after only hiding planes - - If we only hide the planes, we do not turn off any outputs and so can - skip resetting the backlight entirely. - - Signed-off-by: Chris Wilson - -commit da0c9638d7c54b12990531fc478b2dd523ed4db9 -Author: Chris Wilson -Date: Mon Sep 8 07:07:08 2014 +0100 - - sna: Fix an unreachable piece of code - - It doesn't do anything but the static analyzers at bay. - - Signed-off-by: Chris Wilson - -commit 908520a7dacade8b6716e7c30549847464a33a81 -Author: Dave Airlie -Date: Wed Sep 3 10:43:21 2014 +1000 - - uxa: add MST support. - - This adds MST support to the UXA paths in the driver. - - Signed-off-by: Dave Airlie - [ickle: Restore current output naming scheme] - -commit b64a8f0e3e850e698a66e93fde36f846b39ea8cb -Author: Dave Airlie -Date: Wed Sep 3 10:43:20 2014 +1000 - - uxa: drop mode_res caching. - - This will cause problems with MST displays which need to update the - connector list after topology changes. - - Signed-off-by: Dave Airlie - -commit aca0bf6387c159a3d54dbbe52dd65fd92df98216 -Author: Chris Wilson -Date: Sun Sep 7 13:32:12 2014 +0100 - - sna/gen2: Fallback to kernel batch w/a rather than incur a stall - - If we have no pinned batches available, use the kernel w/a if available - rather than stall waiting for an active batch. - - Signed-off-by: Chris Wilson - -commit 57bf3d5f0fb4429b0991ad6f22000348820f5bd1 -Author: Chris Wilson -Date: Sun Sep 7 17:22:31 2014 +0100 - - sna: Disable the fb on switching away from X - - Currently we turn off the CRTCs when switching away from X in order to - not leak our framebuffer. With the new drm_plane support, we can simply - unset the framebuffer, which should be a lighterweight operation than - disabling the CRTC. - - Signed-off-by: Chris Wilson - -commit c17d3b5d5cdbda510a2b6955c3a171457ecde7e5 -Author: Chris Wilson -Date: Sun Sep 7 17:20:29 2014 +0100 - - sna: Compute clones on final ordering - - The clones are indices into the output arrays, so recompute the clones - if we reorder the outputs. - - Signed-off-by: Chris Wilson - -commit aa10f480c566b8523cdd49b3e23f64b7b9625987 -Author: Chris Wilson -Date: Wed Sep 3 10:24:19 2014 +0100 - - sna: Drop false IGNORE_DAMAGE hint - - IGNORE_DAMAGE is used by sna_drawable_use_bo to ignore both CPU/GPU - damage. It used to only ignore CPU damage, but now is a more general - hint. However, here we were intending to only say ignore the cpu damage - that we explicitly discarded anyway. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=81973 - Signed-off-by: Chris Wilson - -commit 51e364ded28e9a8e02a380c041a2c5784381df35 -Author: Chris Wilson -Date: Wed Sep 3 10:23:18 2014 +0100 - - sna: Trace move-to-gpu overrides with extra DBG - - Signed-off-by: Chris Wilson - -commit ee7ed478a2bb81c923d29106b0b1dfd73161c2fc -Author: Chris Wilson -Date: Wed Sep 3 08:20:03 2014 +0100 - - sna: Skip over hotunplugged outputs during CRTC set - - These outputs are already marked as disconnected and so should be - excluded from the CRTC set, but to be safe skip over them. - - Signed-off-by: Chris Wilson - -commit 48a33fc379b17eed195875222ad773c911d9dff1 -Author: Chris Wilson -Date: Tue Sep 2 19:08:36 2014 +0100 - - sna/trapezoids: Use the corrected trapezoid origin for aligned boxes - - The rule for the origin of the CompositeTrapezoids routine is the - upper-left corner of the first trapezoid. Care must be taken in case the - trapezoid edge is upside down to consider the upper vertex. - - Reported-by: "Jasper St. Pierre" - Signed-off-by: Chris Wilson - -commit 84333f6213abb28838656d8352fd537ad68e4189 -Author: Chris Wilson -Date: Tue Sep 2 19:13:16 2014 +0100 - - sna: Leave more Pixmap breadcrumbs in DBG - - Add the Pixmap id to various DBG messages to make it easier to track - rendering. - - Signed-off-by: Chris Wilson - -commit 407817ebb9129f1b946c7ba68e3e05d9540f478c -Author: Chris Wilson -Date: Mon Sep 1 17:02:44 2014 +0100 - - sna: Reject invalid CopyArea based on source clipping earlier - - Given a ridiculous CopyArea, say copying from (-32000,-32000), the - region extents will wrap around when translated before the final clip - and reject test. To overcome this, do source based rejection earlier - before the potential underflow. - - Signed-off-by: Chris Wilson - -commit 92b37783eb2e9166efd82325f14d05de6a082081 -Author: Chris Wilson -Date: Mon Sep 1 15:05:05 2014 +0100 - - test/README: Add missing trailing characters from cut'n'paste - - When copying the command from the terminal I failed to highlight the - last character. - - Signed-off-by: Chris Wilson - -commit ab01c1211e40f788fb2970ad03930bbaa92e58d4 -Author: Chris Wilson -Date: Mon Sep 1 13:37:30 2014 +0100 - - sna: Fallback to normal composite if the blt redisplay fails - - Signed-off-by: Chris Wilson - -commit 21cc987ca8a531e399350564a5af7f551406b8d6 -Author: Chris Wilson -Date: Mon Sep 1 07:19:09 2014 +0100 - - sna: Only decouple the event once - - If the client and drawable destroys are racing, we may trigger the event - removal twice. - - References: https://bugs.freedesktop.org/show_bug.cgi?id=83183 - Signed-off-by: Chris Wilson - -commit 2c564c04bcde88d730ca111acfb6798bdf0d66da -Author: Jonathan Gray -Date: Sun Aug 31 18:48:56 2014 +1000 - - configure: check for cpuid.h - - Instead of checking for a particular version of GCC check for - a cpuid.h with __cpuid_count. This allows cpuid.h to be - provided for older/different compilers. - - Signed-off-by: Jonathan Gray - [ickle: Delete the bare and redundant config.h] - -commit e8ad453a0ae9d701b41cc026d5d40f55dd4590c5 -Author: Chris Wilson -Date: Sun Aug 31 11:45:57 2014 +0100 - - intel: Only include sys/mount.h on Linux - - We only automount debugfs for Linux, but sys/mount.h on BSD has unmet - dependencies breaking the build. - - Reported-by: Jonathan Gray - Signed-off-by: Chris Wilson - -commit 2086965e5c0781e0a3996de89e4dda03c5d42610 -Author: Chris Wilson -Date: Fri Aug 29 10:37:09 2014 +0100 - - gen8: Refresh video render programs - - Reported-by: Timo Aaltonen - References: https://bugs.freedesktop.org/show_bug.cgi?id=83207 - Signed-off-by: Chris Wilson - -commit b822bc8c2c0b47dfc391c86c3e5764f718898dce -Author: Chris Wilson -Date: Fri Aug 29 10:14:35 2014 +0100 - - sna/gen8: Check instead of asserting for a hang whilst setting up video state - - Signed-off-by: Chris Wilson - -commit 8f584f83dc8440f0cbec7db3ed8a071d4896c25a -Author: Chris Wilson -Date: Fri Aug 29 09:52:51 2014 +0100 - - tests: Add a couple of gstreamer pipeline hints - - Having worked out how to use gstreamer, record the pipelines for - posterity. - - Signed-off-by: Chris Wilson - -commit 69d584c6acdcd645ee4cc4892e56940d2d4074f6 -Author: Chris Wilson -Date: Fri Aug 29 07:26:32 2014 +0100 - - sna: Prepare fr changes in dirty tracking api (Prime) - - Future commit "pixmap: fix reverse optimus support with multiple heads" - will allow for tracking within pixmaps (i.e. break the presumption that - everything starts at offset 0,0 in the target pixmap). - - Signed-off-by: Chris Wilson - -commit f95d04b75b71ad523eb3e0e3fc9ad711c58ab43b -Author: Chris Wilson -Date: Wed Aug 27 10:05:07 2014 +0100 - - intel-virtual-output: Use snprintf() for simplicity - - Third one-line patch to fix copying from the tainted user argument into - the socket's path buffer. This time, give in and just use snprintf() as - it guarrantees that it will not write more than 'n' characters and that - the last is a NUL byte. - - Suggested-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit 011f04ff8e9aca696e26ecef0e68132a24a9b094 -Author: Chris Wilson -Date: Tue Aug 26 18:30:17 2014 +0100 - - intel-virtual-output: Fix invocation of strncpy() - - Somebody (me) confused it with snprintf() and put the string length in - the wrong location. Also note that strncpy() does not NUL terminate long - strings. - - Reported-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit 016599783cf3e1a3e2362c82c8767a7398048db7 -Author: Chris Wilson -Date: Tue Aug 26 12:44:58 2014 +0100 - - intel: Limit read to always fit in the buffer - - Reported-by: Zdenek Kabelac - Suggested-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit e827f80e5c07ac13802a24753b249e05e18a290e -Author: Chris Wilson -Date: Tue Aug 26 12:42:11 2014 +0100 - - intel-virtual-output: Sanity check length on user supplied socket path - - Reported-by: Zdenek Kabelac - Suggested-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit 51037706b068b52b7c8984527c209d295e1e3584 -Author: Chris Wilson -Date: Tue Aug 26 11:43:28 2014 +0100 - - sna: Fix attaching to a headless configuration - - ADDFB fails with a headless config (as any fb size is invalid). - Fortunately, with headless we can use any depth we like. - - Signed-off-by: Chris Wilson - -commit 8c5229cf8fc642f8b7e091c38bfd27032ee5e48c -Author: Chris Wilson -Date: Sun Aug 24 16:25:05 2014 +0100 - - sna: Make one last gasp at submitting the execbuffer before bailing - - Signed-off-by: Chris Wilson - -commit d209b03915e4d12ce445d72ac09bb4fe664ba664 -Author: Chris Wilson -Date: Sun Aug 24 07:05:35 2014 +0100 - - configure: Add guards for os.h redefines - - os.h redefines a few common libc functions, so check if the host - provides them first and inform os.h if that is the case. - - Suggested-by: Zdenek Kabelac - Signed-off-by: Chris Wilson - -commit 12c051d5c673d79c16a3a1478c0977799484ca95 -Author: Chris Wilson -Date: Sat Aug 23 15:33:13 2014 +0100 - - sna/dri2: Unhook event from draw list upon client destruction - - When the client goes away, we need to free its events. However, we - have to defer the freeing of any pending event (ones currently routed - through the kernel) for those we need to remember to decouple the event - from the Drawable's list before they are freed. - - Reported-by: John Lindgren - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82979 - Signed-off-by: Chris Wilson - -commit 1bbacf80a9c4e7a259f896064b5cb147c4523f12 -Author: Chris Wilson -Date: Sat Aug 23 15:32:39 2014 +0100 - - sna/dri2: Assert event is queued when marked as next pending flip - - Signed-off-by: Chris Wilson - -commit 48000371c9fba8dfa84ffd3228e8f74cc477ddce -Author: Chris Wilson -Date: Sat Aug 23 15:02:24 2014 +0100 - - sna/dri2: Remove the redundant parameter passed to free event - - draw is always the same as event->draw, so just use event->draw. - - Signed-off-by: Chris Wilson - -commit fef2f4dbaeb6e206786d63dafe4156f978a4422d -Author: Chris Wilson -Date: Fri Aug 22 18:57:32 2014 +0100 - - sna: DBG message fix for !xvmc - - Signed-off-by: Chris Wilson - -commit 9b2cf5c7ab6e1a4a9aa46b297fb2f90cb09124ec -Author: Chris Wilson -Date: Thu Aug 21 08:17:41 2014 +0100 - - sna: Propagate failure from changing backlight value - - Especially when we delete the output property halfway through and the - ChangeProperty routine then attempts to wire it back up... - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82833 - Signed-off-by: Chris Wilson - -commit 61ec162dc9f4204e26e7786ef26e7abf9ed37ed2 -Author: Chris Wilson -Date: Thu Aug 21 07:21:59 2014 +0100 - - backlight: Move the fd out of the select range - - Signed-off-by: Chris Wilson - -commit 726f1a38a572a8a6121e5194269fb549c363d9f6 -Author: Chris Wilson -Date: Thu Aug 21 07:04:01 2014 +0100 - - sna: Only send the bl change notification if the randr_output exists - - Signed-off-by: Chris Wilson - -commit f5469681b620d9d6ccaf53e92ed31f931cb03b0d -Author: Chris Wilson -Date: Mon Aug 18 14:37:44 2014 +0100 - - sna: Be defensive during FreeScreen() - - Signed-off-by: Chris Wilson - -commit bfacb9d8dcd0fd590af3cb9fddc81904ef1e273b -Author: Chris Wilson -Date: Mon Aug 18 14:37:19 2014 +0100 - - sna: Add some DBG warnings for early PreInit failures - - Signed-off-by: Chris Wilson - -commit 02f184e0ef428d9d80fecbaa438a7cbd87c18a91 -Author: Chris Wilson -Date: Mon Aug 18 07:43:21 2014 +0100 - - test: Make SHM tests in lowlevel-blt-bench optional - - A slightly more complex patch to disable the SHM based tests of - lowlevel-blt-bench when MIT-SHM support is not available at compile - time. - - Signed-off-by: Chris Wilson - -commit 9058dac3029b0e4f35eaa8ac101d38f3071f3c52 -Author: Chris Wilson -Date: Mon Aug 18 07:23:27 2014 +0100 - - test: Only compile lowlevel-blt-bench if we have shm - - Since 37ac34c4e4500bfc272222754949edc1dbb8c7e2, lowlevel-blt-bench - requires SHM support, so only compile it if we detect such during - configure. - - Signed-off-by: Chris Wilson - -commit 16b9447c5178611ce32e10620e62007ba5445918 -Author: Chris Wilson -Date: Mon Aug 18 07:00:48 2014 +0100 - - intel: Only dump debugfs on linux - - Other platforms are not going to have the same debug infrastructure, nor - even the same mount(2). - - Signed-off-by: Chris Wilson - -commit f8e632f396bf4b0473dca0516567d56a29954cf3 -Author: Chris Wilson -Date: Thu Aug 14 21:35:34 2014 +0100 - - sna: Select appropriate tiling mode for TearFree shadow buffer - - Signed-off-by: Chris Wilson - -commit c3b093b3c0676d6c9851af2b0c16806140c55258 -Author: Chris Wilson -Date: Thu Aug 14 21:32:48 2014 +0100 - - sna: DBG log invalid surface sizes - - Signed-off-by: Chris Wilson - -commit e59ea828f521e2f1963152a9211c36b8091bf655 -Author: Chris Wilson -Date: Thu Aug 14 21:31:32 2014 +0100 - - sna: DBG log all bo allocation failure paths - - Signed-off-by: Chris Wilson - -commit 9b8f7db5c93b4b687670ad9340fec6a857cd065e -Author: Chris Wilson -Date: Thu Aug 14 21:27:34 2014 +0100 - - sna: DBG Log all failure paths in allocating CRTC pixmaps - - Signed-off-by: Chris Wilson - -commit e461427ad3667554a01b5b74525a15d19538a8e5 -Author: Chris Wilson -Date: Thu Aug 14 21:19:10 2014 +0100 - - sna: Add error message to explain modesetting failures due to allocation - - Since this is an error path with a major user visible failure (the - modeset fails), make sure that we log the reason. - - Signed-off-by: Chris Wilson - -commit 72ed21c694aecba1e91089479b2cb5f957548fec -Author: Chris Wilson -Date: Thu Aug 14 21:09:12 2014 +0100 - - sna: Do not force creation of a linear GPU bo that we don't want - - Signed-off-by: Chris Wilson - -commit 3bb9311e5de8bb39423397213d3de0e0ec4fcbd5 -Author: Chris Wilson -Date: Thu Aug 14 17:38:49 2014 +0100 - - sna: Use a shadow buffer for linear framebuffer - - Signed-off-by: Chris Wilson - -commit 0f1280bab9c99b15ba835a0094d8b849846d13f6 -Author: Chris Wilson -Date: Thu Aug 14 07:37:06 2014 +0100 - - sna/dri2: Fix compilation with Xorg-1.12.4 - - In Xorg-1.12.4 we have DRI2 version 6 (and so triple buffering support - by Xorg) but we don't yet have Prime. Remove the check for the Prime bug - in the Xserver for that case. - - Reported-by: Axel Rohde - Signed-off-by: Chris Wilson - -commit d974dabc8ac06e76bffe5824caf86fd072c35ed3 -Author: Chris Wilson -Date: Wed Aug 13 07:58:57 2014 +0100 - - sna: Relax the square cursor assumption - - Internally only use a square cursor, but 845g/865g actually supports - rectangular cursors (as they have a relaxed cursor height restriction). - - Signed-off-by: Chris Wilson - -commit ec10cef592b7a3d1dc3c4949778e72e8cd156245 -Author: Chris Wilson -Date: Tue Aug 12 10:52:12 2014 +0100 - - sna: Only apply a DPMS change for an enabled CRTC - - Mostly paranoia, but we need to validate that the stored mode is valid - before applying the modeset. - - Signed-off-by: Chris Wilson - -commit 9cc72c2dc7130d3d5731f7e75f35f10302389f08 -Author: Chris Wilson -Date: Tue Aug 12 10:49:20 2014 +0100 - - sna: Suppress "switch to mode" messages for internal CRTC applies - - We only want to log a mode change when it is initiated by the user. For - internal updates, such as changing the frame or restoring a mode from - DPMS, we want to silently apply the current mode. - - Signed-off-by: Chris Wilson - -commit b3138bee8db7db6ebaa10ecdd09c47f899d24c8c -Author: Chris Wilson -Date: Tue Aug 12 09:00:04 2014 +0100 - - sna: Separate panel checks from adding default modes - - The flags are now separate, so treat them individually. - - Signed-off-by: Chris Wilson - -commit 6554cf0a69f04710b64f3488384fe5cb2748dc35 -Author: Chris Wilson -Date: Mon Aug 11 12:22:17 2014 +0100 - - sna: Parse output options early during initialisation - - Before we can query whether an option is set, we first need to generate - the options table. This is done through xf86OutputUseScreenMonitor() so - make sure it is called as early as possible in the proceedings. - - Signed-off-by: Chris Wilson - -commit 8e1961e7fc163f3103b2260cca965aefa61fed40 -Author: Chris Wilson -Date: Sun Aug 10 06:51:33 2014 +0100 - - sna: Respect monitor option "DefaultModes" - - The is a monitor option to allow the user to specify whether to add the - default modes, use it to determine adding the extra modes for panels. - - Signed-off-by: Chris Wilson - -commit f6e85048b0789162e389ad2b838d417d517d62d9 -Author: Chris Wilson -Date: Sat Aug 9 08:02:39 2014 +0100 - - sna: Reorder output array to match primary placement for InitialConfiguration - - xf86InitialConfiguration() depends upon the order of the outputs for its - mode selection and expects the Primary output to be listed first. - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82205 - Signed-off-by: Chris Wilson - -commit 5c7965f00f85fbe3af69029d3fd1e5e2e079f159 -Author: Chris Wilson -Date: Sat Aug 9 07:37:58 2014 +0100 - - intel: If need be, try mounting debugfs - - If we require debugging information from debugfs and we cannot find it, - silently mount it and dump the information we need. - - Signed-off-by: Chris Wilson - -commit dea65e8be73b79c50f7ee59c54c4c75cbcff67fb -Author: Chris Wilson -Date: Sat Aug 9 07:12:23 2014 +0100 - - intel: Log open clients on master takeover fail - - If we fail to claim the DRM device as master, dump /debugfs/.../clients - so that we can check to see who failed to drop master for us. - - Signed-off-by: Chris Wilson - -commit 8d135867c886e98fa0bc5a7a21a1b3d84851daaa -Author: Chris Wilson -Date: Fri Aug 8 14:04:14 2014 +0100 - - sna: Update check for static driver data on loading error - - Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1354424 - Signed-off-by: Chris Wilson - -commit 59f0374188e6d2eb2fd18e3dfb517087e09ae13f -Author: Chris Wilson -Date: Fri Aug 8 10:26:13 2014 +0100 - - sna: Restore the clear before pwriting the cursor - - Along the legacy phys cursor path, we use a common scratch buffer. As - this is global, we need to be careful not to trust the cursor local - dirty tracking and be sure to clear the image before uploading. - - Reported-by: Dirk Griesbach - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82337 - Signed-off-by: Chris Wilson - -commit afea9ba0790a951c6a00b57d0d71876dd1ce98c3 -Author: Chris Wilson -Date: Fri Aug 8 08:17:15 2014 +0100 - - Prepare for spurious Xv ABI changes - - Signed-off-by: Chris Wilson - -commit 6f69188cb2959abfb2fcd3f81cd4146aa3876bb5 -Author: Chris Wilson -Date: Fri Aug 8 07:25:03 2014 +0100 - - sna: Clear old cursors when resizing - - When changing the stride on a cursor, we have to clear the whole area - and not just the rectangle outside of our overwritten area. - - Reported-by: Jan Alexander Steffens - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82273 - Signed-off-by: Chris Wilson - -commit fab976cef80aad2c573cfc6febeec5ec8e3bab06 -Author: Chris Wilson -Date: Thu Aug 7 14:35:22 2014 +0100 - - uxa: Compile fix for Ubuntu 11.04 - - ../../../src/uxa/intel_uxa.c: In function 'intel_uxa_init': - ../../../src/uxa/intel_uxa.c:1557:27: error: 'true' undeclared (first use in this function) - ../../../src/uxa/intel_uxa.c:1557:27: note: each undeclared identifier is reported only once for each function it appears in - - Signed-off-by: Chris Wilson - -commit 52c1e64692e3e80826e526dd14aec4bee137a19b -Author: Chris Wilson -Date: Thu Aug 7 11:34:26 2014 +0100 - - sna: Flush cursor width changes - - The kernel only sees changes in the cursor width when the cursor handle - is updated. In the cases where we reuse larger bo for smaller cursors, - make sure we then reset the cursor handle (even though it has not - changed) so tht the kernel updates its width. - - Signed-off-by: Chris Wilson - -commit 7763a3da89fac7cbe571535eebd999d178c39e83 -Author: Chris Wilson -Date: Thu Aug 7 07:50:54 2014 +0100 - - test: Exercise different cursor sizes - - Signed-off-by: Chris Wilson - -commit 105d478cdd70ac3b38be51c9014b22b7233c241e -Author: Chris Wilson -Date: Wed Aug 6 09:10:30 2014 +0100 - - sna: Enable kernel rotation support by default - - The kernel API is now upstream and so we can rely on it not changing. - Time to use it. - - Signed-off-by: Chris Wilson - -commit f36b7a4aac86f5874c32d8f516ac1f00a6c8d8b3 -Author: Chris Wilson -Date: Tue Aug 5 16:38:42 2014 +0100 - - intel: Use NOACCEL to avoid a symbol clash on old Xorg - - Old Xorg xf86str.h defines NONE preventing us from using it within an - enum. Use NOACCEL instead. - - Signed-off-by: Chris Wilson - -commit c5e654cf2afcafbe3732548359771747dac1ce26 -Author: Chris Wilson -Date: Tue Aug 5 16:21:19 2014 +0100 - - sna: Set the RandR primary output from the option - - If the user specifies the Option "Primary" for a monitor, we need to set - it as the RandR primary output. - - Signed-off-by: Chris Wilson - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82193 - -commit 999c8dc700a0573859ec1aaae4500493d01d0c0c -Author: Chris Wilson -Date: Tue Aug 5 15:36:26 2014 +0100 - - sna: Add intermediate modes to any output with a scaler - - Signed-off-by: Chris Wilson - -commit cea47f8cfcd810c103740ec7ee9caeecba1e30f4 -Author: Chris Wilson -Date: Tue Aug 5 15:30:11 2014 +0100 - - sna: Add DSI to the list of recognised panel connectors. - - Signed-off-by: Chris Wilson - -commit 941ae4c868279c994756a2a476af2cd32afc6d35 -Author: Chris Wilson -Date: Tue Aug 5 10:19:05 2014 +0100 - - sna: Add some extra logging for hotplugging of outputs - - References: https://bugs.freedesktop.org/show_bug.cgi?id=82153 - Signed-off-by: Chris Wilson - -commit 5926da0ab3339bbfd55a27ac84a8306b8d931181 -Author: Chris Wilson -Date: Mon Aug 4 16:25:36 2014 +0100 - - sna: Mark the current mode as preferred if no other mode is - - Signed-off-by: Chris Wilson - -commit ab3f1526f19ec405dca8ab3094a626096dc30358 -Author: Chris Wilson -Date: Mon Aug 4 16:23:00 2014 +0100 - - sna: Add the current CRTC mode last - - We only want to add the current mode to the modelist if it is not - already present in the EDID. At the moment, we always add the current - mode first which causes the list to be reordered. If we add it after - checking the EDID, then we will not perturb the list. - - Signed-off-by: Chris Wilson - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82068 - -commit ebd1907304c538bcc27614bc8e2e29f317ffb390 -Author: Edward Sheldrake -Date: Mon Aug 4 18:53:38 2014 +0100 - - backlight: Fix regression - - The backlight xrandr property is missing unless the backlight level - was 0 on starting X, regression introduced in - - commit f9e7ac7db7b0331131aa1df3a90d4b2692949efa - Author: Chris Wilson - Date: Wed Jul 23 21:53:31 2014 +0100 - - backlight: Set structure to safe values when not initialised - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82146 - -commit 926631ee4148dbe2c53def01c98d568b80d46d53 -Author: Chris Wilson -Date: Sun Aug 3 18:23:31 2014 +0100 - - sna: Restore single CRTC flips - - CRTC flips depend upon having a proxy front buffer, so - - commit 33a0dd8f0b1e31e501825dc66f7ec2d85b55a7f4 - Author: Chris Wilson - Date: Tue Jul 29 09:11:01 2014 +0100 - - sna/dri2: Also check for stale buffers before exchanges - - was false and disabling every other CRTC flip. However, - - commit 70868c7aa881b15b7478f7ee4543fde0268a4ba6 - Author: Chris Wilson - Date: Wed Jul 23 08:37:46 2014 +0100 - - sna/dri2: Recreate buffer in reuse rather than force recreate - - was not the entire story and to prevent unnecessary confusion when - multiple clients share the same front buffer, we have to force the - recreation of the back. Do this inside the xchg routine to avoid the - confusion first fixed by 70868c7aa881b15b7478f7ee4543fde0268a4ba6. - - Signed-off-by: Chris Wilson - -commit 623fa61090fb288062d68257a5c72d8da1fbfc9c -Author: Chris Wilson -Date: Sun Aug 3 18:08:12 2014 +0100 - - sna: Rearrange showing cursors - - Just tidying and explaining why cursor show on a particular pipe may be - skipped. - - Signed-off-by: Chris Wilson - -commit 0b938573353aab70536d913b2d078181a3c9a1a4 -Author: Chris Wilson -Date: Sun Aug 3 18:08:02 2014 +0100 - - sna: Add some paranoid asserts around get_window_pixmap() - - Signed-off-by: Chris Wilson - -commit 4de3f9bd79d8e42f9767c9fe44d553cfb749ac65 -Author: Chris Wilson -Date: Sun Aug 3 07:33:35 2014 +0100 - - sna: Relax restriction on fenced aperture check - - This is done upfront based on the fenced size within the batch, so we do - not need to assume everything is fenced later on. - - Signed-off-by: Chris Wilson - -commit af60a104acfcc64a63987f93bb77ffa21be1ead1 -Author: Chris Wilson -Date: Sat Aug 2 19:18:29 2014 +0100 - - sna: Restrict fencing to only use the low 256MiB - - Somce early machines have 512MiB apertures, but we can still only use - the low 256MiB for fencing. Separate out the mappable restriction checks - from the fencing in order to further constrain those devices. - - Reported-by: Matti Hämäläinen - Signed-off-by: Chris Wilson - -commit d11512406daeaabf2549831505811725e1375e5e -Author: Chris Wilson -Date: Sat Aug 2 19:08:06 2014 +0100 - - sna: Remove dead assertion - - sna_display.c: In function 'sna_crtc_redisplay': - sna_display.c:6393:9: error: 'sna_crtc' undeclared (first use in this function) - assert(sna_crtc); - - Signed-off-by: Chris Wilson - -commit a1a0b9c2e49d03e373695df8828c8d4c6312e5ac -Author: Chris Wilson -Date: Fri Aug 1 12:02:58 2014 +0100 - - sna/glyphs: Eliminate an extra conditional from glyphs-to-dst - - Signed-off-by: Chris Wilson - -commit fc2de62496061b9d0bace02729765344bd939122 -Author: Chris Wilson -Date: Fri Aug 1 12:00:05 2014 +0100 - - sna/glyphs: Fallback to masked glyphs if rendering to a too wide dst - - Fixes regression from - - commit 79399ff9264ff23da0ab95131a67d2ac85651b3d - Author: Chris Wilson - Date: Mon Mar 24 10:46:57 2014 +0000 - - sna: Eliminate a few conditionals in glyph fast path - - for large pixmaps (such as extended desktops on gen2/gen3). - - Bugzilla: https://bugs.archlinux.org/task/40949 - Signed-off-by: Chris Wilson - -commit ce804875914f52dba5356f8aefec850d411b051a -Author: Chris Wilson -Date: Thu Jul 31 16:18:02 2014 +0100 - - i810: Fix startup after marking GPU screens in the module - - Fixes regression from - - commit d6830190bc9956f485db6c3420f7a4a79793a693 - Author: Chris Wilson - Date: Wed Jul 23 10:53:40 2014 +0100 - - sna: Disable all outputs when initializing as a slaved output provider - - Reported-by: Tobias Powalowski - Signed-off-by: Chris Wilson - -commit a6a60ec606e291323ee0b6e83679ff277a0bd84a -Author: Chris Wilson -Date: Wed Jul 30 07:42:04 2014 +0100 - - sna: Silence a compiler warning - - sna_display.c: In function 'sna_crtc_redisplay': - sna_display.c:6390:19: warning: unused variable 'sna_crtc' [-Wunused-variable] - struct sna_crtc *sna_crtc = to_sna_crtc(crtc); - - Signed-off-by: Chris Wilson - -commit 33a0dd8f0b1e31e501825dc66f7ec2d85b55a7f4 -Author: Chris Wilson -Date: Tue Jul 29 09:11:01 2014 +0100 - - sna/dri2: Also check for stale buffers before exchanges - - Not impossible after all - usually after a client error. - - Signed-off-by: Chris Wilson - -commit 376272be367c2712304a16da0f9362ffae5be0a7 -Author: Chris Wilson -Date: Tue Jul 29 09:02:36 2014 +0100 - - sna: Skip grabbing the main framebuffer id - - If we aren't using it, we can forgo obtaining the id. - - Signed-off-by: Chris Wilson - -commit 4c66ee5e9793785585d37622b9419fd25c046d14 -Author: Chris Wilson -Date: Tue Jul 29 08:59:44 2014 +0100 - - sna: Always clear CRTC overrides when adjusting the mode - - It is not necessary to resize before adjusting the CRTC, but if it - moves the window may no longer be obscuring the CRTC. - - Signed-off-by: Chris Wilson - -commit 7ceb4028f4d69f4ab2e800d6b98809a998918154 -Author: Chris Wilson -Date: Sun Jul 27 17:50:29 2014 +0100 - - sna: Select the panel native size of the unattached fb size - - When creating a framebuffer for an headless system, if there is a panel, - use its native size rather than 1024x768. - - Signed-off-by: Chris Wilson - -commit a88795c64123e4084044451d8861838ea904abd9 -Author: Chris Wilson -Date: Tue Jul 29 21:11:09 2014 +0100 - - sna: Clear cursor image after rotation - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81886 - Signed-off-by: Chris Wilson - -commit 02bb0c5bc56df2790ffcd90d47d667dfd63b5407 -Author: Chris Wilson -Date: Mon Jul 28 21:16:33 2014 +0100 - - sna: Fix clear shortcut for transformations - - The region needs to be transformed along the clear shortcut when - redisplaying the CRTC. - - Reported-by: Dirk Griesbach - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81820 - Signed-off-by: Chris Wilson - -commit 997a5d28021ece0e81845d0217a1b6feb765e6fa -Author: Chris Wilson -Date: Sun Jul 27 07:15:19 2014 +0100 - - configure: Expose no acceleration by default (--with-default-accel=none) - - Why? I am not sure, but it seems equally as valid as allowing the switch - to uxa/glamor as default. The runtime equivalent is Option "AccelMethod". - - Signed-off-by: Chris Wilson - -commit cac1548a9c48db4707fc3c885b1ea568ae2fbc54 -Author: Chris Wilson -Date: Thu Jul 24 06:29:54 2014 +0100 - - sna: Sort the outputs to provide a stable listing order - - Make xrandr look neater by grouping the outputs together by type and - then by port ordering. - - Signed-off-by: Chris Wilson - -commit f68d363a236a4bd424dff8a04d177bb5b79df1c9 -Author: Chris Wilson -Date: Wed Jul 23 22:12:33 2014 +0100 - - backlight: Remove unused 'original' member from structure - - This was accidentally added with no users. - - Signed-off-by: Chris Wilson - -commit 5935c93ce77a5da09aab9b45b1a5710d681c171e -Author: Chris Wilson -Date: Wed Jul 23 21:59:20 2014 +0100 - - sna: Keep the backlight at the same brightness when switching away - - Before VT switching, we disable all the outputs. This has the - side-effect of disabling the backlight, but commonly the console does - not set the backlight brightness itself and so we re-enable the - backlight on its behalf. Rather than set the backlight to max - brightness, reset it to the last user value, as maximum can be very - bright! - - Reported-by: Mark Kettenis - -commit f9e7ac7db7b0331131aa1df3a90d4b2692949efa -Author: Chris Wilson -Date: Wed Jul 23 21:53:31 2014 +0100 - - backlight: Set structure to safe values when not initialised - - Signed-off-by: Chris Wilson - -commit bc50dff844b97e655483c9eaf0effeec6a9ab4dd -Author: Chris Wilson -Date: Wed Jul 23 21:43:02 2014 +0100 - - sna: Disable rendering with the DRM device whilst away from VT - - As root, X gets away with many things, including submitting commands to - the DRM device whilst it is no longer authorised (i.e. when it has - relinquished master to another client across a VT switch). In the - non-root future, if we attempt to use the device whilst unauthorized the - rendering will be lost and we will mark the device as unusable. So flush - our render queue to the device around a VT switch. - - Signed-off-by: Chris Wilson - commit 8d95e90b7b4bf5d6bae5443f92d77d30f4443f24 Author: Chris Wilson Date: Wed Jul 23 15:45:31 2014 +0100 diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/watch xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/watch --- xserver-xorg-video-intel-2.99.917+git20170309/debian/watch 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/watch 2014-09-18 08:11:22.000000000 +0000 @@ -1,3 +1,3 @@ #git=git://anongit.freedesktop.org/xorg/driver/xf86-video-intel version=3 -https://xorg.freedesktop.org/releases/individual/driver/ xf86-video-intel-(.*)\.tar\.gz +http://xorg.freedesktop.org/releases/individual/driver/ xf86-video-intel-(.*)\.tar\.gz diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/xorg.conf xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xorg.conf --- xserver-xorg-video-intel-2.99.917+git20170309/debian/xorg.conf 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xorg.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -Section "Device" - Identifier "Intel" - Driver "intel" -# Option "AccelMethod" "uxa" -EndSection diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.docs xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.docs --- xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.docs 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.docs 2014-09-18 08:11:22.000000000 +0000 @@ -1,3 +1,2 @@ NEWS README -debian/xorg.conf diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.install xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.install --- xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.install 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.install 2016-01-05 00:54:58.000000000 +0000 @@ -1,8 +1,6 @@ -usr/bin/dri3info -usr/bin/intel-virtual-output usr/lib/xorg/modules/drivers/*.so -usr/lib/*/libI810XvMC.so* -usr/lib/*/libIntelXvMC.so* +usr/lib/libI810XvMC.so* +usr/lib/libIntelXvMC.so* usr/lib/xserver-xorg-video-intel/xf86-video-intel-backlight-helper usr/share/polkit-1/actions/org.x.xf86-video-intel.backlight-helper.policy usr/share/man diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.install.kfreebsd-amd64 xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.install.kfreebsd-amd64 --- xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.install.kfreebsd-amd64 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.install.kfreebsd-amd64 2014-09-18 08:11:22.000000000 +0000 @@ -1,4 +1,4 @@ usr/lib/xorg/modules/drivers/*.so -usr/lib/*/libI810XvMC.so* -usr/lib/*/libIntelXvMC.so* +usr/lib/libI810XvMC.so* +usr/lib/libIntelXvMC.so* usr/share/man diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.install.kfreebsd-i386 xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.install.kfreebsd-i386 --- xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.install.kfreebsd-i386 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.install.kfreebsd-i386 2014-09-18 08:11:22.000000000 +0000 @@ -1,4 +1,4 @@ usr/lib/xorg/modules/drivers/*.so -usr/lib/*/libI810XvMC.so* -usr/lib/*/libIntelXvMC.so* +usr/lib/libI810XvMC.so* +usr/lib/libIntelXvMC.so* usr/share/man diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.maintscript xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.maintscript --- xserver-xorg-video-intel-2.99.917+git20170309/debian/xserver-xorg-video-intel.maintscript 2017-10-18 20:09:36.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/debian/xserver-xorg-video-intel.maintscript 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -rm_conffile /etc/modprobe.d/i915-kms.conf 2:2.21.9-1~ diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/.gitignore xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/.gitignore --- xserver-xorg-video-intel-2.99.917+git20170309/.gitignore 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -# -# X.Org module default exclusion patterns -# The next section if for module specific patterns -# -# Do not edit the following section -# GNU Build System (Autotools) -aclocal.m4 -autom4te.cache/ -autoscan.log -ChangeLog -compile -config.guess -config.h -config.h.in -config.log -config-ml.in -config.py -config.status -config.status.lineno -config.sub -configure -configure.scan -depcomp -.deps/ -INSTALL -install-sh -.libs/ -libtool -libtool.m4 -ltmain.sh -lt~obsolete.m4 -ltoptions.m4 -ltsugar.m4 -ltversion.m4 -Makefile -Makefile.in -mdate-sh -missing -mkinstalldirs -*.pc -py-compile -stamp-h? -symlink-tree -texinfo.tex -ylwrap -src/sna/git_version.h -src/sna/brw/brw_test - -# Do not edit the following section -# Edit Compile Debug Document Distribute -*~ -*.[0-9] -*.[0-9]x -*.bak -*.bin -core -*.dll -*.exe -*-ISO*.bdf -*-JIS*.bdf -*-KOI8*.bdf -*.kld -*.ko -*.ko.cmd -*.lai -*.l[oa] -*.[oa] -*.obj -*.patch -*.so -*.pcf.gz -*.pdb -*.tar.bz2 -*.tar.gz -# -# Add & Override patterns for xf86-video-intel -# -# Edit the following section as needed -# For example, !report.pc overrides *.pc. See 'man gitignore' -# -cscope* diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/legacy/i810/i810.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/legacy/i810/i810.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/legacy/i810/i810.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/legacy/i810/i810.h 2017-08-08 00:50:46.000000000 +0000 @@ -218,7 +218,6 @@ int LockHeld; DRIInfoPtr pDRIInfo; int drmSubFD; - int numVisualConfigs; unsigned long dcacheHandle; unsigned long backHandle; unsigned long zHandle; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_sample_nv12.g4i xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_sample_nv12.g4i --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_sample_nv12.g4i 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_sample_nv12.g4i 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Wang Zhenyu + * Keith Packard + */ + +/* Sample the src surface in planar format */ + +/* prepare sampler read back gX register, which would be written back to output */ + +/* use simd16 sampler, param 0 is u, param 1 is v. */ +/* 'payload' loading, assuming tex coord start from g4 */ + +/* load rg */ +mov (1) g0.8<1>UD 0x0000c000UD { align1 mask_disable }; + +/* src_msg will be copied with g0, as it contains send desc */ +/* emit sampler 'send' cmd */ + +/* Sample CbCr */ +mov (8) src_msg<1>UD g0<8,8,1>UD { align1 }; /* copy to msg start reg*/ +send (16) src_msg_ind /* msg reg index */ + src_sample_b<1>UW /* readback */ + null + sampler (3,0,F) /* sampler message description, (binding_table,sampler_index,datatype) + /* here(src->dst) we should use src_sampler and src_surface */ + mlen 5 rlen 4 { align1 }; /* required message len 5, readback len 4 */ + +/* Move Cr to its proper place */ +mov (16) src_sample_r<1>UD src_sample_a<8,8,1>UD { align1 }; + +/* load r */ +mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; + +/* src_msg will be copied with g0, as it contains send desc */ +/* emit sampler 'send' cmd */ + +/* Sample Y */ +mov (8) src_msg<1>UD g0<8,8,1>UD { align1 }; /* copy to msg start reg*/ +send (16) src_msg_ind /* msg reg index */ + src_sample_g<1>UW /* readback */ + null + sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) + /* here(src->dst) we should use src_sampler and src_surface */ + mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 2 */ diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g4a xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g4a --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g4a 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g4a 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Wang Zhenyu + * Keith Packard + */ + +/* Sample the src surface in planar format */ + +include(`exa_wm.g4i') + +include(`exa_wm_sample_nv12.g4i') diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g4b xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g4b --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g4b 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g4b 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,7 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x01800031, 0x22401c09, 0x00000000, 0x02540003 }, + { 0x00802001, 0x21c00021, 0x008d0280, 0x00000000 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x01800031, 0x22001c09, 0x00000000, 0x02520001 }, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g4b.gen5 xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g4b.gen5 --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g4b.gen5 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g4b.gen5 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,7 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x01800031, 0x22401c09, 0x20000000, 0x0a4a0003 }, + { 0x00802001, 0x21c00021, 0x008d0280, 0x00000000 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x01800031, 0x22001c09, 0x20000000, 0x0a2a0001 }, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g5a xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g5a --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g5a 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g5a 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Wang Zhenyu + * Keith Packard + */ + +/* Sample the src surface in planar format */ + +include(`exa_wm.g4i') + +include(`exa_wm_sample_nv12.g4i') diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g5b xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g5b --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g5b 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g5b 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,7 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x01800031, 0x22401c09, 0x20000000, 0x0a4a0003 }, + { 0x00802001, 0x21c00021, 0x008d0280, 0x00000000 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x01800031, 0x22001c09, 0x20000000, 0x0a2a0001 }, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g6a xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g6a --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g6a 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g6a 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Wang Zhenyu + * Keith Packard + */ + +/* Sample the src surface in planar format */ + +include(`exa_wm.g4i') + +include(`exa_wm_sample_nv12.g4i') diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g6b xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g6b --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g6b 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g6b 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,7 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22401cc9, 0x00000020, 0x0a4a0003 }, + { 0x00800001, 0x21c00021, 0x008d0280, 0x00000000 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22001cc9, 0x00000020, 0x0a2a0001 }, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g7a xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g7a --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g7a 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g7a 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Wang Zhenyu + * Keith Packard + */ + +/* Sample the src surface in planar format */ + +include(`exa_wm.g4i') + +undefine(`src_msg') +undefine(`src_msg_ind') + +define(`src_msg', `g65') +define(`src_msg_ind', `65') + +include(`exa_wm_sample_nv12.g4i') diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g7b xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g7b --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g7b 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g7b 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,7 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x00600001, 0x28200021, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22401ca9, 0x00000820, 0x0a4c0003 }, + { 0x00800001, 0x21c00021, 0x008d0280, 0x00000000 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x28200021, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22001ca9, 0x00000820, 0x0a2c0001 }, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g8a xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g8a --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g8a 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g8a 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Wang Zhenyu + * Keith Packard + */ + +/* Sample the src surface in planar format */ + +include(`exa_wm.g4i') + +undefine(`src_msg') +undefine(`src_msg_ind') + +define(`src_msg', `g65') +define(`src_msg_ind', `65') + +include(`exa_wm_sample_nv12.g4i') diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g8b xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g8b --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/exa_wm_src_sample_nv12.g8b 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/exa_wm_src_sample_nv12.g8b 2017-09-28 23:16:36.000000000 +0000 @@ -0,0 +1,7 @@ + { 0x00000001, 0x2008060c, 0x00000000, 0x0000c000 }, + { 0x00600001, 0x28200208, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22400a48, 0x0e000820, 0x0a4c0003 }, + { 0x00800001, 0x21c00208, 0x008d0280, 0x00000000 }, + { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x28200208, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22000a48, 0x0e000820, 0x0a2c0001 }, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/Makefile.am xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/Makefile.am --- xserver-xorg-video-intel-2.99.917+git20170309/src/render_program/Makefile.am 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/render_program/Makefile.am 2017-09-28 23:16:36.000000000 +0000 @@ -5,6 +5,7 @@ exa_wm_src_projective.g4a \ exa_wm_src_sample_argb.g4a \ exa_wm_src_sample_a.g4a \ + exa_wm_src_sample_nv12.g4a \ exa_wm_src_sample_planar.g4a \ exa_wm_mask_affine.g4a \ exa_wm_mask_projective.g4a \ @@ -22,6 +23,7 @@ exa_wm.g4i \ exa_wm_affine.g4i \ exa_wm_projective.g4i \ + exa_wm_sample_nv12.g4i \ exa_wm_sample_planar.g4i \ exa_wm_src_sample_argb.g4i \ $(NULL) @@ -33,6 +35,7 @@ exa_wm_src_projective.g4b \ exa_wm_src_sample_argb.g4b \ exa_wm_src_sample_a.g4b \ + exa_wm_src_sample_nv12.g4b \ exa_wm_src_sample_planar.g4b \ exa_wm_mask_affine.g4b \ exa_wm_mask_projective.g4b \ @@ -54,6 +57,7 @@ exa_wm_src_projective.g4b.gen5 \ exa_wm_src_sample_argb.g4b.gen5 \ exa_wm_src_sample_a.g4b.gen5 \ + exa_wm_src_sample_nv12.g4b.gen5 \ exa_wm_src_sample_planar.g4b.gen5 \ exa_wm_mask_affine.g4b.gen5 \ exa_wm_mask_projective.g4b.gen5 \ @@ -74,6 +78,7 @@ exa_wm_src_projective.g5a \ exa_wm_src_sample_argb.g5a \ exa_wm_src_sample_a.g5a \ + exa_wm_src_sample_nv12.g5a \ exa_wm_src_sample_planar.g5a \ exa_wm_mask_affine.g5a \ exa_wm_mask_projective.g5a \ @@ -94,6 +99,7 @@ exa_wm_src_projective.g5b \ exa_wm_src_sample_argb.g5b \ exa_wm_src_sample_a.g5b \ + exa_wm_src_sample_nv12.g5b \ exa_wm_src_sample_planar.g5b \ exa_wm_mask_affine.g5b \ exa_wm_mask_projective.g5b \ @@ -116,6 +122,7 @@ exa_wm_src_affine.g6a \ exa_wm_src_projective.g6a \ exa_wm_src_sample_argb.g6a \ + exa_wm_src_sample_nv12.g6a \ exa_wm_src_sample_planar.g6a \ exa_wm_src_sample_a.g6a \ exa_wm_mask_affine.g6a \ @@ -133,6 +140,7 @@ exa_wm_src_affine.g6b \ exa_wm_src_projective.g6b \ exa_wm_src_sample_argb.g6b \ + exa_wm_src_sample_nv12.g6b \ exa_wm_src_sample_planar.g6b \ exa_wm_src_sample_a.g6b \ exa_wm_mask_affine.g6b \ @@ -155,6 +163,7 @@ exa_wm_src_projective.g7a \ exa_wm_src_sample_a.g7a \ exa_wm_src_sample_argb.g7a \ + exa_wm_src_sample_nv12.g7a \ exa_wm_src_sample_planar.g7a \ exa_wm_write.g7a \ exa_wm_yuv_rgb.g7a \ @@ -169,6 +178,7 @@ exa_wm_src_projective.g7b \ exa_wm_src_sample_a.g7b \ exa_wm_src_sample_argb.g7b \ + exa_wm_src_sample_nv12.g7b \ exa_wm_src_sample_planar.g7b \ exa_wm_write.g7b \ exa_wm_yuv_rgb.g7b \ @@ -177,6 +187,7 @@ INTEL_G8A = \ exa_wm_src_affine.g8a \ exa_wm_src_sample_argb.g8a \ + exa_wm_src_sample_nv12.g8a \ exa_wm_src_sample_planar.g8a \ exa_wm_write.g8a \ exa_wm_yuv_rgb.g8a \ @@ -185,6 +196,7 @@ INTEL_G8B = \ exa_wm_src_affine.g8b \ exa_wm_src_sample_argb.g8b \ + exa_wm_src_sample_nv12.g8b \ exa_wm_src_sample_planar.g8b \ exa_wm_write.g8b \ exa_wm_yuv_rgb.g8b \ diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen2_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen2_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen2_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen2_render.c 2017-10-18 20:02:52.000000000 +0000 @@ -52,6 +52,7 @@ #define MAX_INLINE (1 << 18) #define BATCH(v) batch_emit(sna, v) +#define BATCH_ALIGNED(v, a) batch_emit_aligned(sna, v, a) #define BATCH_F(v) batch_emit_float(sna, v) #define VERTEX(v) batch_emit_float(sna, v) @@ -568,7 +569,8 @@ { kgem_set_mode(&sna->kgem, KGEM_RENDER, op->dst.bo); - if (!kgem_check_batch(&sna->kgem, INVARIANT_SIZE+40)) { + /* +7 for i830 3DSTATE_BUFFER_INFO w/a */ + if (!kgem_check_batch(&sna->kgem, INVARIANT_SIZE+40+7)) { DBG(("%s: flushing batch: size %d > %d\n", __FUNCTION__, INVARIANT_SIZE+40, sna->kgem.surface-sna->kgem.nbatch)); @@ -614,7 +616,14 @@ return; } - BATCH(_3DSTATE_BUF_INFO_CMD); + /* + * i830 w/a: 3DSTATE_BUFFER_INFO + * must not straddle two cachelines. + */ + if (intel_get_device_id(sna->dev) == 0x3577) + BATCH_ALIGNED(_3DSTATE_BUF_INFO_CMD, 8); + else + BATCH(_3DSTATE_BUF_INFO_CMD); BATCH(BUF_3D_ID_COLOR_BACK | gen2_buf_tiling(bo->tiling) | BUF_3D_PITCH(bo->pitch)); diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen4_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen4_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen4_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen4_render.c 2017-09-28 23:16:36.000000000 +0000 @@ -115,6 +115,14 @@ #include "exa_wm_write.g4b" }; +static const uint32_t ps_kernel_nv12_static[][4] = { +#include "exa_wm_xy.g4b" +#include "exa_wm_src_affine.g4b" +#include "exa_wm_src_sample_nv12.g4b" +#include "exa_wm_yuv_rgb.g4b" +#include "exa_wm_write.g4b" +}; + #define NOKERNEL(kernel_enum, func, masked) \ [kernel_enum] = {func, 0, masked} #define KERNEL(kernel_enum, kernel, masked) \ @@ -140,6 +148,7 @@ NOKERNEL(WM_KERNEL_OPACITY_P, brw_wm_kernel__projective_opacity, true), KERNEL(WM_KERNEL_VIDEO_PLANAR, ps_kernel_planar_static, false), + KERNEL(WM_KERNEL_VIDEO_NV12, ps_kernel_nv12_static, false), KERNEL(WM_KERNEL_VIDEO_PACKED, ps_kernel_packed_static, false), }; #undef KERNEL @@ -1324,7 +1333,7 @@ const struct sna_composite_op *op) { struct sna_video_frame *frame = op->priv; - uint32_t src_surf_format; + uint32_t src_surf_format[6]; uint32_t src_surf_base[6]; int src_width[6]; int src_height[6]; @@ -1341,22 +1350,27 @@ src_surf_base[5] = frame->UBufOffset; if (is_planar_fourcc(frame->id)) { - src_surf_format = GEN4_SURFACEFORMAT_R8_UNORM; - src_width[1] = src_width[0] = frame->width; - src_height[1] = src_height[0] = frame->height; - src_pitch[1] = src_pitch[0] = frame->pitch[1]; - src_width[4] = src_width[5] = src_width[2] = src_width[3] = - frame->width / 2; - src_height[4] = src_height[5] = src_height[2] = src_height[3] = - frame->height / 2; - src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = - frame->pitch[0]; + for (n = 0; n < 2; n++) { + src_surf_format[n] = GEN4_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width; + src_height[n] = frame->height; + src_pitch[n] = frame->pitch[1]; + } + for (; n < 6; n++) { + if (is_nv12_fourcc(frame->id)) + src_surf_format[n] = GEN4_SURFACEFORMAT_R8G8_UNORM; + else + src_surf_format[n] = GEN4_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width / 2; + src_height[n] = frame->height / 2; + src_pitch[n] = frame->pitch[0]; + } n_src = 6; } else { if (frame->id == FOURCC_UYVY) - src_surf_format = GEN4_SURFACEFORMAT_YCRCB_SWAPY; + src_surf_format[0] = GEN4_SURFACEFORMAT_YCRCB_SWAPY; else - src_surf_format = GEN4_SURFACEFORMAT_YCRCB_NORMAL; + src_surf_format[0] = GEN4_SURFACEFORMAT_YCRCB_NORMAL; src_width[0] = frame->width; src_height[0] = frame->height; @@ -1381,7 +1395,7 @@ src_width[n], src_height[n], src_pitch[n], - src_surf_format); + src_surf_format[n]); } if (!ALWAYS_FLUSH && sna->kgem.batch[sna->render_state.gen4.surface_table] == binding_table[0]) @@ -1429,6 +1443,7 @@ tmp.src.bo = frame->bo; tmp.mask.bo = NULL; tmp.u.gen4.wm_kernel = + is_nv12_fourcc(frame->id) ? WM_KERNEL_VIDEO_NV12 : is_planar_fourcc(frame->id) ? WM_KERNEL_VIDEO_PLANAR : WM_KERNEL_VIDEO_PACKED; tmp.u.gen4.ve_id = 2; tmp.is_affine = true; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen4_render.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen4_render.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen4_render.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen4_render.h 2017-09-28 23:16:36.000000000 +0000 @@ -2686,6 +2686,7 @@ WM_KERNEL_OPACITY_P, WM_KERNEL_VIDEO_PLANAR, + WM_KERNEL_VIDEO_NV12, WM_KERNEL_VIDEO_PACKED, KERNEL_COUNT } wm_kernel_t; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen5_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen5_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen5_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen5_render.c 2017-09-28 23:16:36.000000000 +0000 @@ -105,6 +105,14 @@ #include "exa_wm_write.g5b" }; +static const uint32_t ps_kernel_nv12_static[][4] = { +#include "exa_wm_xy.g5b" +#include "exa_wm_src_affine.g5b" +#include "exa_wm_src_sample_nv12.g5b" +#include "exa_wm_yuv_rgb.g5b" +#include "exa_wm_write.g5b" +}; + #define NOKERNEL(kernel_enum, func, masked) \ [kernel_enum] = {func, 0, masked} #define KERNEL(kernel_enum, kernel, masked) \ @@ -130,6 +138,7 @@ NOKERNEL(WM_KERNEL_OPACITY_P, brw_wm_kernel__projective_opacity, true), KERNEL(WM_KERNEL_VIDEO_PLANAR, ps_kernel_planar_static, false), + KERNEL(WM_KERNEL_VIDEO_NV12, ps_kernel_nv12_static, false), KERNEL(WM_KERNEL_VIDEO_PACKED, ps_kernel_packed_static, false), }; #undef KERNEL @@ -1278,7 +1287,7 @@ { bool dirty = kgem_bo_is_dirty(op->dst.bo); struct sna_video_frame *frame = op->priv; - uint32_t src_surf_format; + uint32_t src_surf_format[6]; uint32_t src_surf_base[6]; int src_width[6]; int src_height[6]; @@ -1295,22 +1304,27 @@ src_surf_base[5] = frame->UBufOffset; if (is_planar_fourcc(frame->id)) { - src_surf_format = GEN5_SURFACEFORMAT_R8_UNORM; - src_width[1] = src_width[0] = frame->width; - src_height[1] = src_height[0] = frame->height; - src_pitch[1] = src_pitch[0] = frame->pitch[1]; - src_width[4] = src_width[5] = src_width[2] = src_width[3] = - frame->width / 2; - src_height[4] = src_height[5] = src_height[2] = src_height[3] = - frame->height / 2; - src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = - frame->pitch[0]; + for (n = 0; n < 2; n++) { + src_surf_format[n] = GEN5_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width; + src_height[n] = frame->height; + src_pitch[n] = frame->pitch[1]; + } + for (; n < 6; n++) { + if (is_nv12_fourcc(frame->id)) + src_surf_format[n] = GEN5_SURFACEFORMAT_R8G8_UNORM; + else + src_surf_format[n] = GEN5_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width / 2; + src_height[n] = frame->height / 2; + src_pitch[n] = frame->pitch[0]; + } n_src = 6; } else { if (frame->id == FOURCC_UYVY) - src_surf_format = GEN5_SURFACEFORMAT_YCRCB_SWAPY; + src_surf_format[0] = GEN5_SURFACEFORMAT_YCRCB_SWAPY; else - src_surf_format = GEN5_SURFACEFORMAT_YCRCB_NORMAL; + src_surf_format[0] = GEN5_SURFACEFORMAT_YCRCB_NORMAL; src_width[0] = frame->width; src_height[0] = frame->height; @@ -1334,7 +1348,7 @@ src_width[n], src_height[n], src_pitch[n], - src_surf_format); + src_surf_format[n]); } gen5_emit_state(sna, op, offset | dirty); @@ -1379,6 +1393,7 @@ tmp.src.bo = frame->bo; tmp.mask.bo = NULL; tmp.u.gen5.wm_kernel = + is_nv12_fourcc(frame->id) ? WM_KERNEL_VIDEO_NV12 : is_planar_fourcc(frame->id) ? WM_KERNEL_VIDEO_PLANAR : WM_KERNEL_VIDEO_PACKED; tmp.u.gen5.ve_id = 2; tmp.is_affine = true; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen5_render.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen5_render.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen5_render.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen5_render.h 2017-09-28 23:16:36.000000000 +0000 @@ -2766,6 +2766,7 @@ WM_KERNEL_OPACITY_P, WM_KERNEL_VIDEO_PLANAR, + WM_KERNEL_VIDEO_NV12, WM_KERNEL_VIDEO_PACKED, KERNEL_COUNT } wm_kernel_t; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen6_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen6_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen6_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen6_render.c 2017-09-28 23:16:36.000000000 +0000 @@ -115,6 +115,13 @@ #include "exa_wm_write.g6b" }; +static const uint32_t ps_kernel_nv12[][4] = { +#include "exa_wm_src_affine.g6b" +#include "exa_wm_src_sample_nv12.g6b" +#include "exa_wm_yuv_rgb.g6b" +#include "exa_wm_write.g6b" +}; + #define NOKERNEL(kernel_enum, func, ns) \ [GEN6_WM_KERNEL_##kernel_enum] = {#kernel_enum, func, 0, ns} #define KERNEL(kernel_enum, kernel, ns) \ @@ -142,6 +149,7 @@ NOKERNEL(OPACITY_P, brw_wm_kernel__projective_opacity, 2), KERNEL(VIDEO_PLANAR, ps_kernel_planar, 7), + KERNEL(VIDEO_NV12, ps_kernel_nv12, 7), KERNEL(VIDEO_PACKED, ps_kernel_packed, 2), }; #undef KERNEL @@ -1554,7 +1562,7 @@ const struct sna_composite_op *op) { struct sna_video_frame *frame = op->priv; - uint32_t src_surf_format; + uint32_t src_surf_format[6]; uint32_t src_surf_base[6]; int src_width[6]; int src_height[6]; @@ -1574,22 +1582,27 @@ src_surf_base[5] = frame->UBufOffset; if (is_planar_fourcc(frame->id)) { - src_surf_format = GEN6_SURFACEFORMAT_R8_UNORM; - src_width[1] = src_width[0] = frame->width; - src_height[1] = src_height[0] = frame->height; - src_pitch[1] = src_pitch[0] = frame->pitch[1]; - src_width[4] = src_width[5] = src_width[2] = src_width[3] = - frame->width / 2; - src_height[4] = src_height[5] = src_height[2] = src_height[3] = - frame->height / 2; - src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = - frame->pitch[0]; + for (n = 0; n < 2; n++) { + src_surf_format[n] = GEN6_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width; + src_height[n] = frame->height; + src_pitch[n] = frame->pitch[1]; + } + for (; n < 6; n++) { + if (is_nv12_fourcc(frame->id)) + src_surf_format[n] = GEN6_SURFACEFORMAT_R8G8_UNORM; + else + src_surf_format[n] = GEN6_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width / 2; + src_height[n] = frame->height / 2; + src_pitch[n] = frame->pitch[0]; + } n_src = 6; } else { if (frame->id == FOURCC_UYVY) - src_surf_format = GEN6_SURFACEFORMAT_YCRCB_SWAPY; + src_surf_format[0] = GEN6_SURFACEFORMAT_YCRCB_SWAPY; else - src_surf_format = GEN6_SURFACEFORMAT_YCRCB_NORMAL; + src_surf_format[0] = GEN6_SURFACEFORMAT_YCRCB_NORMAL; src_width[0] = frame->width; src_height[0] = frame->height; @@ -1612,7 +1625,7 @@ src_width[n], src_height[n], src_pitch[n], - src_surf_format); + src_surf_format[n]); } gen6_emit_state(sna, op, offset | dirty); @@ -1670,6 +1683,8 @@ GEN6_SET_FLAGS(SAMPLER_OFFSET(filter, SAMPLER_EXTEND_PAD, SAMPLER_FILTER_NEAREST, SAMPLER_EXTEND_NONE), NO_BLEND, + is_nv12_fourcc(frame->id) ? + GEN6_WM_KERNEL_VIDEO_NV12 : is_planar_fourcc(frame->id) ? GEN6_WM_KERNEL_VIDEO_PLANAR : GEN6_WM_KERNEL_VIDEO_PACKED, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen7_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen7_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen7_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen7_render.c 2017-09-28 23:16:36.000000000 +0000 @@ -207,6 +207,13 @@ #include "exa_wm_write.g7b" }; +static const uint32_t ps_kernel_nv12[][4] = { +#include "exa_wm_src_affine.g7b" +#include "exa_wm_src_sample_nv12.g7b" +#include "exa_wm_yuv_rgb.g7b" +#include "exa_wm_write.g7b" +}; + static const uint32_t ps_kernel_rgb[][4] = { #include "exa_wm_src_affine.g7b" #include "exa_wm_src_sample_argb.g7b" @@ -239,6 +246,7 @@ NOKERNEL(OPACITY_P, brw_wm_kernel__projective_opacity, 2), KERNEL(VIDEO_PLANAR, ps_kernel_planar, 7), + KERNEL(VIDEO_NV12, ps_kernel_nv12, 7), KERNEL(VIDEO_PACKED, ps_kernel_packed, 2), KERNEL(VIDEO_RGB, ps_kernel_rgb, 2), }; @@ -1766,7 +1774,7 @@ const struct sna_composite_op *op) { struct sna_video_frame *frame = op->priv; - uint32_t src_surf_format; + uint32_t src_surf_format[6]; uint32_t src_surf_base[6]; int src_width[6]; int src_height[6]; @@ -1785,24 +1793,29 @@ src_surf_base[5] = frame->UBufOffset; if (is_planar_fourcc(frame->id)) { - src_surf_format = GEN7_SURFACEFORMAT_R8_UNORM; - src_width[1] = src_width[0] = frame->width; - src_height[1] = src_height[0] = frame->height; - src_pitch[1] = src_pitch[0] = frame->pitch[1]; - src_width[4] = src_width[5] = src_width[2] = src_width[3] = - frame->width / 2; - src_height[4] = src_height[5] = src_height[2] = src_height[3] = - frame->height / 2; - src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = - frame->pitch[0]; + for (n = 0; n < 2; n++) { + src_surf_format[n] = GEN7_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width; + src_height[n] = frame->height; + src_pitch[n] = frame->pitch[1]; + } + for (; n < 6; n++) { + if (is_nv12_fourcc(frame->id)) + src_surf_format[n] = GEN7_SURFACEFORMAT_R8G8_UNORM; + else + src_surf_format[n] = GEN7_SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width / 2; + src_height[n] = frame->height / 2; + src_pitch[n] = frame->pitch[0]; + } n_src = 6; } else { if (frame->id == FOURCC_RGB888) - src_surf_format = GEN7_SURFACEFORMAT_B8G8R8X8_UNORM; + src_surf_format[0] = GEN7_SURFACEFORMAT_B8G8R8X8_UNORM; else if (frame->id == FOURCC_UYVY) - src_surf_format = GEN7_SURFACEFORMAT_YCRCB_SWAPY; + src_surf_format[0] = GEN7_SURFACEFORMAT_YCRCB_SWAPY; else - src_surf_format = GEN7_SURFACEFORMAT_YCRCB_NORMAL; + src_surf_format[0] = GEN7_SURFACEFORMAT_YCRCB_NORMAL; src_width[0] = frame->width; src_height[0] = frame->height; @@ -1827,7 +1840,7 @@ src_width[n], src_height[n], src_pitch[n], - src_surf_format); + src_surf_format[n]); } gen7_emit_state(sna, op, offset | dirty); @@ -1841,6 +1854,9 @@ case FOURCC_XVMC: return GEN7_WM_KERNEL_VIDEO_PLANAR; + case FOURCC_NV12: + return GEN7_WM_KERNEL_VIDEO_NV12; + case FOURCC_RGB888: case FOURCC_RGB565: return GEN7_WM_KERNEL_VIDEO_RGB; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen8_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen8_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen8_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen8_render.c 2017-09-28 23:16:36.000000000 +0000 @@ -107,6 +107,13 @@ #include "exa_wm_write.g8b" }; +static const uint32_t ps_kernel_nv12[][4] = { +#include "exa_wm_src_affine.g8b" +#include "exa_wm_src_sample_nv12.g8b" +#include "exa_wm_yuv_rgb.g8b" +#include "exa_wm_write.g8b" +}; + static const uint32_t ps_kernel_rgb[][4] = { #include "exa_wm_src_affine.g8b" #include "exa_wm_src_sample_argb.g8b" @@ -143,6 +150,7 @@ #if !NO_VIDEO KERNEL(VIDEO_PLANAR, ps_kernel_planar, 7), + KERNEL(VIDEO_NV12, ps_kernel_nv12, 7), KERNEL(VIDEO_PACKED, ps_kernel_packed, 2), KERNEL(VIDEO_RGB, ps_kernel_rgb, 2), #endif @@ -3710,7 +3718,7 @@ const struct sna_composite_op *op) { struct sna_video_frame *frame = op->priv; - uint32_t src_surf_format; + uint32_t src_surf_format[6]; uint32_t src_surf_base[6]; int src_width[6]; int src_height[6]; @@ -3731,24 +3739,29 @@ src_surf_base[5] = frame->UBufOffset; if (is_planar_fourcc(frame->id)) { - src_surf_format = SURFACEFORMAT_R8_UNORM; - src_width[1] = src_width[0] = frame->width; - src_height[1] = src_height[0] = frame->height; - src_pitch[1] = src_pitch[0] = frame->pitch[1]; - src_width[4] = src_width[5] = src_width[2] = src_width[3] = - frame->width / 2; - src_height[4] = src_height[5] = src_height[2] = src_height[3] = - frame->height / 2; - src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = - frame->pitch[0]; + for (n = 0; n < 2; n++) { + src_surf_format[n] = SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width; + src_height[n] = frame->height; + src_pitch[n] = frame->pitch[1]; + } + for (; n < 6; n++) { + if (is_nv12_fourcc(frame->id)) + src_surf_format[n] = SURFACEFORMAT_R8G8_UNORM; + else + src_surf_format[n] = SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width / 2; + src_height[n] = frame->height / 2; + src_pitch[n] = frame->pitch[0]; + } n_src = 6; } else { if (frame->id == FOURCC_RGB888) - src_surf_format = SURFACEFORMAT_B8G8R8X8_UNORM; + src_surf_format[0] = SURFACEFORMAT_B8G8R8X8_UNORM; else if (frame->id == FOURCC_UYVY) - src_surf_format = SURFACEFORMAT_YCRCB_SWAPY; + src_surf_format[0] = SURFACEFORMAT_YCRCB_SWAPY; else - src_surf_format = SURFACEFORMAT_YCRCB_NORMAL; + src_surf_format[0] = SURFACEFORMAT_YCRCB_NORMAL; src_width[0] = frame->width; src_height[0] = frame->height; @@ -3771,7 +3784,7 @@ src_width[n], src_height[n], src_pitch[n], - src_surf_format); + src_surf_format[n]); } gen8_emit_state(sna, op, offset); diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen9_render.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen9_render.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/gen9_render.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/gen9_render.c 2017-09-28 23:16:36.000000000 +0000 @@ -108,6 +108,13 @@ #include "exa_wm_write.g8b" }; +static const uint32_t ps_kernel_nv12[][4] = { +#include "exa_wm_src_affine.g8b" +#include "exa_wm_src_sample_nv12.g8b" +#include "exa_wm_yuv_rgb.g8b" +#include "exa_wm_write.g8b" +}; + static const uint32_t ps_kernel_rgb[][4] = { #include "exa_wm_src_affine.g8b" #include "exa_wm_src_sample_argb.g8b" @@ -144,6 +151,7 @@ #if !NO_VIDEO KERNEL(VIDEO_PLANAR, ps_kernel_planar, 7), + KERNEL(VIDEO_NV12, ps_kernel_nv12, 7), KERNEL(VIDEO_PACKED, ps_kernel_packed, 2), KERNEL(VIDEO_RGB, ps_kernel_rgb, 2), #endif @@ -3764,7 +3772,7 @@ const struct sna_composite_op *op) { struct sna_video_frame *frame = op->priv; - uint32_t src_surf_format; + uint32_t src_surf_format[6]; uint32_t src_surf_base[6]; int src_width[6]; int src_height[6]; @@ -3785,24 +3793,29 @@ src_surf_base[5] = frame->UBufOffset; if (is_planar_fourcc(frame->id)) { - src_surf_format = SURFACEFORMAT_R8_UNORM; - src_width[1] = src_width[0] = frame->width; - src_height[1] = src_height[0] = frame->height; - src_pitch[1] = src_pitch[0] = frame->pitch[1]; - src_width[4] = src_width[5] = src_width[2] = src_width[3] = - frame->width / 2; - src_height[4] = src_height[5] = src_height[2] = src_height[3] = - frame->height / 2; - src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = - frame->pitch[0]; + for (n = 0; n < 2; n++) { + src_surf_format[n] = SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width; + src_height[n] = frame->height; + src_pitch[n] = frame->pitch[1]; + } + for (; n < 6; n++) { + if (is_nv12_fourcc(frame->id)) + src_surf_format[n] = SURFACEFORMAT_R8G8_UNORM; + else + src_surf_format[n] = SURFACEFORMAT_R8_UNORM; + src_width[n] = frame->width / 2; + src_height[n] = frame->height / 2; + src_pitch[n] = frame->pitch[0]; + } n_src = 6; } else { if (frame->id == FOURCC_RGB888) - src_surf_format = SURFACEFORMAT_B8G8R8X8_UNORM; + src_surf_format[0] = SURFACEFORMAT_B8G8R8X8_UNORM; else if (frame->id == FOURCC_UYVY) - src_surf_format = SURFACEFORMAT_YCRCB_SWAPY; + src_surf_format[0] = SURFACEFORMAT_YCRCB_SWAPY; else - src_surf_format = SURFACEFORMAT_YCRCB_NORMAL; + src_surf_format[0] = SURFACEFORMAT_YCRCB_NORMAL; src_width[0] = frame->width; src_height[0] = frame->height; @@ -3825,7 +3838,7 @@ src_width[n], src_height[n], src_pitch[n], - src_surf_format); + src_surf_format[n]); } gen9_emit_state(sna, op, offset); @@ -3839,6 +3852,9 @@ case FOURCC_XVMC: return GEN9_WM_KERNEL_VIDEO_PLANAR; + case FOURCC_NV12: + return GEN9_WM_KERNEL_VIDEO_NV12; + case FOURCC_RGB888: case FOURCC_RGB565: return GEN9_WM_KERNEL_VIDEO_RGB; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/kgem.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/kgem.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/kgem.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/kgem.c 2017-10-18 20:02:52.000000000 +0000 @@ -488,7 +488,7 @@ bo->tiling, tiling, bo->pitch, stride, set_tiling.tiling_mode == tiling)); - return set_tiling.tiling_mode == tiling; + return set_tiling.tiling_mode == tiling && bo->pitch >= stride; } err = errno; @@ -2737,7 +2737,7 @@ gem_close(kgem->fd, info.handle); - if (width != info.width || height != info.height) { + if (width > info.width || height > info.height) { DBG(("%s: not using scanout %d (%dx%d), want (%dx%d)\n", __FUNCTION__, info.fb_id, info.width, info.height, @@ -5411,7 +5411,7 @@ continue; if (bo->delta && !check_scanout_size(kgem, bo, width, height)) - continue; + kgem_bo_rmfb(kgem, bo); if (flags & CREATE_INACTIVE && bo->rq) { last = bo; @@ -5536,9 +5536,16 @@ if (num_pages(bo) < size) continue; - if (!kgem_set_tiling(kgem, bo, tiling, pitch) && - !exact) + if (!kgem_set_tiling(kgem, bo, tiling, pitch)) { + if (exact) { + DBG(("tiled and pitch not exact: tiling=%d, (want %d), pitch=%d, need %d\n", + bo->tiling, tiling, + bo->pitch, pitch)); + continue; + } + set_gpu_tiling(kgem, bo, tiling, pitch); + } } kgem_bo_remove_from_active(kgem, bo); @@ -5712,9 +5719,16 @@ if (num_pages(bo) < size) continue; - if (!kgem_set_tiling(kgem, bo, tiling, pitch) && - !exact) + if (!kgem_set_tiling(kgem, bo, tiling, pitch)) { + if (exact) { + DBG(("tiled and pitch not exact: tiling=%d, (want %d), pitch=%d, need %d\n", + bo->tiling, tiling, + bo->pitch, pitch)); + continue; + } + set_gpu_tiling(kgem, bo, tiling, pitch); + } } assert(bo->tiling == tiling); assert(bo->pitch >= pitch); diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/kgem.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/kgem.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/kgem.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/kgem.h 2017-08-22 19:52:57.000000000 +0000 @@ -587,7 +587,7 @@ return false; } - if (kgem->gen >= 0100 && bo->proxy && bo->delta & (1 << 4)) { + if (kgem->gen >= 0100 && bo->proxy && bo->delta & 63) { DBG(("%s: can not blt to handle=%d, delta=%d\n", __FUNCTION__, bo->handle, bo->delta)); return false; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_accel.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_accel.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_accel.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_accel.c 2017-08-08 00:50:46.000000000 +0000 @@ -10164,7 +10164,7 @@ RegionUninit(&data.region); } -static inline void box_from_seg(BoxPtr b, const xSegment *seg, GCPtr gc) +static inline bool box_from_seg(BoxPtr b, const xSegment *seg, GCPtr gc) { if (seg->x1 == seg->x2) { if (seg->y1 > seg->y2) { @@ -10178,6 +10178,9 @@ if (gc->capStyle != CapNotLast) b->y2++; } + if (b->y1 >= b->y2) + return false; + b->x1 = seg->x1; b->x2 = seg->x1 + 1; } else { @@ -10192,6 +10195,9 @@ if (gc->capStyle != CapNotLast) b->x2++; } + if (b->x1 >= b->x2) + return false; + b->y1 = seg->y1; b->y2 = seg->y1 + 1; } @@ -10200,6 +10206,7 @@ __FUNCTION__, seg->x1, seg->y1, seg->x2, seg->y2, b->x1, b->y1, b->x2, b->y2)); + return true; } static bool @@ -10234,12 +10241,13 @@ nbox = ARRAY_SIZE(boxes); n -= nbox; do { - box_from_seg(b, seg++, gc); - if (b->y2 > b->y1 && b->x2 > b->x1) { + if (box_from_seg(b, seg++, gc)) { + assert(!box_empty(b)); b->x1 += dx; b->x2 += dx; b->y1 += dy; b->y2 += dy; + assert(!box_empty(b)); b++; } } while (--nbox); @@ -10258,7 +10266,10 @@ nbox = ARRAY_SIZE(boxes); n -= nbox; do { - box_from_seg(b++, seg++, gc); + if (box_from_seg(b, seg++, gc)) { + assert(!box_empty(b)); + b++; + } } while (--nbox); if (b != boxes) { @@ -10283,7 +10294,10 @@ do { BoxRec box; - box_from_seg(&box, seg++, gc); + if (!box_from_seg(&box, seg++, gc)) + continue; + + assert(!box_empty(&box)); box.x1 += drawable->x; box.x2 += drawable->x; box.y1 += drawable->y; @@ -10301,6 +10315,7 @@ b->x2 += dx; b->y1 += dy; b->y2 += dy; + assert(!box_empty(b)); if (++b == last_box) { fill.boxes(sna, &fill, boxes, last_box-boxes); if (damage) @@ -10312,7 +10327,10 @@ } while (--n); } else { do { - box_from_seg(b, seg++, gc); + if (!box_from_seg(b, seg++, gc)) + continue; + + assert(!box_empty(b)); b->x1 += drawable->x; b->x2 += drawable->x; b->y1 += drawable->y; @@ -10322,6 +10340,7 @@ b->x2 += dx; b->y1 += dy; b->y2 += dy; + assert(!box_empty(b)); if (++b == last_box) { fill.boxes(sna, &fill, boxes, last_box-boxes); if (damage) @@ -10446,8 +10465,11 @@ } b->x2++; b->y2++; - if (oc1 | oc2) - box_intersect(b, extents); + + if ((oc1 | oc2) && !box_intersect(b, extents)) + continue; + + assert(!box_empty(b)); if (++b == last_box) { ret = &&rectangle_continue; goto *jump; @@ -10510,6 +10532,7 @@ __FUNCTION__, x1, y1, b->x1, b->y1, b->x2, b->y2)); + assert(!box_empty(b)); if (++b == last_box) { ret = &&X_continue; goto *jump; @@ -10534,6 +10557,7 @@ b->x2 = x1 + 1; b->y2 = b->y1 + 1; + assert(!box_empty(b)); if (++b == last_box) { ret = &&X2_continue; goto *jump; @@ -10595,6 +10619,7 @@ b->y2 = y1 + 1; b->x2 = x1 + 1; + assert(!box_empty(b)); if (++b == last_box) { ret = &&Y_continue; goto *jump; @@ -10618,6 +10643,7 @@ b->y2 = y1 + 1; b->x2 = x1 + 1; + assert(!box_empty(b)); if (++b == last_box) { ret = &&Y2_continue; goto *jump; @@ -16936,7 +16962,9 @@ gc->freeCompClip = 0; gc->pCompositeClip = 0; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,99,1,0) gc->pRotatedPixmap = 0; +#endif fb_gc(gc)->bpp = bits_per_pixel(gc->depth); @@ -17618,8 +17646,6 @@ int16_t dx, dy; int n; - assert(dirty->src == sna->front); - damage = DamageRegion(dirty->damage); if (RegionNil(damage)) continue; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_display.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_display.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_display.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_display.c 2017-10-18 20:02:52.000000000 +0000 @@ -192,7 +192,7 @@ }; struct sna_crtc { - unsigned long flags; + struct sna_crtc_public public; uint32_t id; xf86CrtcPtr base; struct drm_mode_modeinfo kmode; @@ -420,7 +420,7 @@ static inline unsigned __sna_crtc_pipe(struct sna_crtc *crtc) { - return crtc->flags >> 8 & 0xff; + return crtc->public.flags >> 8 & 0xff; } static inline unsigned __sna_crtc_id(struct sna_crtc *crtc) @@ -565,7 +565,7 @@ assert(drmIoctl(kgem->fd, DRM_IOCTL_MODE_GETFB, &info) == 0); gem_close(kgem->fd, info.handle); - assert(width == info.width && height == info.height); + assert(width <= info.width && height <= info.height); } #else #define assert_scanout(k, b, w, h) @@ -1427,13 +1427,20 @@ static int kmsg_get_debug(void) { - FILE *file; int v = -1; + int fd; - file = fopen("/sys/module/drm/parameters/debug", "r"); - if (file) { - fscanf(file, "%d", &v); - fclose(file); + fd = open("/sys/module/drm/parameters/debug", O_RDONLY); + if (fd != -1) { + char buf[128]; + int len; + + len = read(fd, buf, sizeof(buf) - 1); + if (len != -1) { + buf[len] = '\0'; + v = atoi(buf); + } + close(fd); } return v; @@ -1441,12 +1448,16 @@ static void kmsg_set_debug(int v) { - FILE *file; + char buf[128]; + int len; + int fd; - file = fopen("/sys/module/drm/parameters/debug", "w"); - if (file) { - fprintf(file, "%d\n", v); - fclose(file); + len = snprintf(buf, sizeof(buf), "%d\n", v); + + fd = open("/sys/module/drm/parameters/debug", O_WRONLY); + if (fd != -1) { + write(fd, buf, len); + close(fd); } } @@ -1885,6 +1896,7 @@ sna_pixmap_unmap(pixmap, priv); DBG(("%s: setting front pixmap to handle=%d\n", __FUNCTION__, bo->handle)); + assert(sna->mode.shadow->active_scanout); sna->mode.shadow->active_scanout--; tmp = priv->gpu_bo; priv->gpu_bo = bo; @@ -1892,6 +1904,7 @@ kgem_bo_destroy(&sna->kgem, sna->mode.shadow); sna->mode.shadow = tmp; sna->mode.shadow->active_scanout++; + assert(sna->mode.shadow->active_scanout); sna_dri2_pixmap_update_bo(sna, pixmap, bo); @@ -1906,6 +1919,7 @@ assert(!sna->mode.shadow_wait); flush_events(sna); + assert(sna->mode.shadow->active_scanout); return ret; } @@ -2145,13 +2159,13 @@ if (sna_crtc->bo) { DBG(("%s: releasing handle=%d from scanout, active=%d\n", __FUNCTION__,sna_crtc->bo->handle, sna_crtc->bo->active_scanout-1)); - assert(sna_crtc->flags & CRTC_ON); + assert(sna_crtc->public.flags & CRTC_ON); assert(sna_crtc->bo->active_scanout); assert(sna_crtc->bo->refcnt >= sna_crtc->bo->active_scanout); sna_crtc->bo->active_scanout--; kgem_bo_destroy(&sna->kgem, sna_crtc->bo); sna_crtc->bo = NULL; - sna_crtc->flags &= ~CRTC_ON; + sna_crtc->public.flags &= ~CRTC_ON; if (sna->mode.hidden) { sna->mode.hidden--; @@ -2572,7 +2586,7 @@ if (!ok) { void *ptr = kgem_bo_map__gtt(&sna->kgem, bo); if (ptr) - memset(ptr, 0, bo->pitch * crtc->mode.HDisplay); + memset(ptr, 0, bo->pitch * crtc->mode.VDisplay); } sna->mode.shadow_dirty = true; } @@ -3086,7 +3100,7 @@ goto error; } - sna_crtc->flags |= CRTC_ON; + sna_crtc->public.flags |= CRTC_ON; bo->active_scanout++; DBG(("%s: marking handle=%d as active=%d (removing %d from scanout, active=%d)\n", __FUNCTION__, bo->handle, bo->active_scanout, @@ -3292,10 +3306,11 @@ static int plane_details(struct sna *sna, struct plane *p) { +#define N_STACK_PROPS 32 /* must be a multiple of 2 */ struct local_mode_obj_get_properties arg; - uint64_t stack_props[24]; - uint32_t *props = (uint32_t *)stack_props; - uint64_t *values = stack_props + 8; + uint64_t stack[N_STACK_PROPS + N_STACK_PROPS/2]; + uint64_t *values = stack; + uint32_t *props = (uint32_t *)(values + N_STACK_PROPS); int i, type = DRM_PLANE_TYPE_OVERLAY; memset(&arg, 0, sizeof(struct local_mode_obj_get_properties)); @@ -3304,7 +3319,7 @@ arg.props_ptr = (uintptr_t)props; arg.prop_values_ptr = (uintptr_t)values; - arg.count_props = 16; + arg.count_props = N_STACK_PROPS; if (drmIoctl(sna->kgem.fd, LOCAL_IOCTL_MODE_OBJ_GETPROPERTIES, &arg)) return -1; @@ -3312,12 +3327,12 @@ DBG(("%s: object %d (type %x) has %d props\n", __FUNCTION__, p->id, LOCAL_MODE_OBJECT_PLANE, arg.count_props)); - if (arg.count_props > 16) { - props = malloc(2*sizeof(uint64_t)*arg.count_props); - if (props == NULL) + if (arg.count_props > N_STACK_PROPS) { + values = malloc(2*sizeof(uint64_t)*arg.count_props); + if (values == NULL) return -1; - values = (uint64_t *)props + arg.count_props; + props = (uint32_t *)(values + arg.count_props); arg.props_ptr = (uintptr_t)props; arg.prop_values_ptr = (uintptr_t)values; @@ -3380,11 +3395,12 @@ if (!xf86ReturnOptValBool(sna->Options, OPTION_ROTATION, TRUE)) p->rotation.supported = RR_Rotate_0; - if (props != (uint32_t *)stack_props) - free(props); + if (values != stack) + free(values); DBG(("%s: plane=%d type=%d\n", __FUNCTION__, p->id, type)); return type; +#undef N_STACK_PROPS } static void add_sprite_plane(struct sna_crtc *crtc, @@ -3517,6 +3533,7 @@ if (sna_crtc == NULL) return false; + list_init(&sna_crtc->public.vblank_queue); sna_crtc->id = id; VG_CLEAR(get_pipe); @@ -3529,7 +3546,7 @@ return false; } assert((unsigned)get_pipe.pipe < 256); - sna_crtc->flags |= get_pipe.pipe << 8; + sna_crtc->public.flags |= get_pipe.pipe << 8; if (is_zaphod(scrn) && (get_zaphod_crtcs(sna) & (1 << get_pipe.pipe)) == 0) { @@ -3809,30 +3826,33 @@ } blob.data = (uintptr_t)raw; - if (drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETPROPBLOB, &blob)) { - DBG(("%s(%s): failed to read blob, reusing previous\n", - __FUNCTION__, output->name)); - goto skip_read; - } + do { + while (drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETPROPBLOB, &blob)) { + update_properties(sna, sna_output); + if (blob.blob_id == sna_output->prop_values[sna_output->edid_idx]) { + DBG(("%s(%s): failed to read blob, reusing previous\n", + __FUNCTION__, output->name)); + goto done; + } + blob.blob_id = sna_output->prop_values[sna_output->edid_idx]; + } - DBG(("%s(%s): retrieving blob id=%d, length=%d\n", - __FUNCTION__, output->name, blob.blob_id, blob.length)); + DBG(("%s(%s): retrieving blob id=%d, length=%d\n", + __FUNCTION__, output->name, blob.blob_id, blob.length)); - if (blob.length > sna_output->edid_len) { - raw = realloc(raw, blob.length); - if (raw == NULL) + if (blob.length < 128) goto done; - VG(memset(raw, 0, blob.length)); - blob.data = (uintptr_t)raw; - } + if (blob.length > sna_output->edid_len) { + raw = realloc(raw, blob.length); + if (raw == NULL) + goto done; - if (blob.length != sna_output->edid_len && - drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETPROPBLOB, &blob)) - goto done; - - if (blob.length < 128) - goto done; + VG(memset(raw, 0, blob.length)); + blob.data = (uintptr_t)raw; + } + } while (blob.length != sna_output->edid_len && + drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETPROPBLOB, &blob)); if (blob.length & 127) { /* Truncated EDID! Make sure no one reads too far */ @@ -7832,12 +7852,14 @@ __FUNCTION__, box->x1, box->y1, box->x2, box->y2)); if (desired == NULL) { - rrScrPrivPtr rr = rrGetScrPriv(xf86ScrnToScreen(sna->scrn)); - if (rr && rr->primaryOutput) { + ScreenPtr screen = xf86ScrnToScreen(sna->scrn); + rrScrPrivPtr rr = rrGetScrPriv(screen); + if (rr && rr->primaryOutput && rr->primaryOutput->pScreen == screen) { xf86OutputPtr output = rr->primaryOutput->devPrivate; DBG(("%s: have PrimaryOutput? %d marking as desired\n", __FUNCTION__, output->crtc != NULL)); desired = output->crtc; } + assert(!desired || desired->scrn == sna->scrn); } if (desired && to_sna_crtc(desired) && to_sna_crtc(desired)->bo) { BoxRec cover_box; @@ -7875,8 +7897,9 @@ return crtc; } - if (!sna_box_intersect(&cover_box, &crtc->bounds, box)) - continue; + coverage = 0; + if (sna_box_intersect(&cover_box, &crtc->bounds, box)) + coverage = sna_box_area(&cover_box); DBG(("%s: box instersects (%d, %d), (%d, %d) of crtc %d\n", __FUNCTION__, @@ -7884,7 +7907,6 @@ cover_box.x2, cover_box.y2, c)); - coverage = sna_box_area(&cover_box); DBG(("%s: box covers %d of crtc %d\n", __FUNCTION__, coverage, c)); if (coverage > best_coverage) { @@ -7897,19 +7919,36 @@ return best_crtc; } +static xf86CrtcPtr first_active_crtc(struct sna *sna) +{ + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(sna->scrn); + int n; + + for (n = 0; n < sna->mode.num_real_crtc; n++) { + xf86CrtcPtr crtc = config->crtc[n]; + if (to_sna_crtc(crtc)->bo) + return crtc; + } + + /* No active, use the first as a placeholder */ + if (sna->mode.num_real_crtc) + return config->crtc[0]; + + return NULL; +} + xf86CrtcPtr sna_primary_crtc(struct sna *sna) { rrScrPrivPtr rr = rrGetScrPriv(xf86ScrnToScreen(sna->scrn)); if (rr && rr->primaryOutput) { xf86OutputPtr output = rr->primaryOutput->devPrivate; - if (output->crtc && to_sna_crtc(output->crtc)) + if (output->crtc && + output->scrn == sna->scrn && + to_sna_crtc(output->crtc)) return output->crtc; } - if (sna->mode.num_real_crtc) - return XF86_CRTC_CONFIG_PTR(sna->scrn)->crtc[0]; - - return NULL; + return first_active_crtc(sna); } #define MI_LOAD_REGISTER_IMM (0x22<<23) diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_dri2.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_dri2.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_dri2.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_dri2.c 2017-08-22 19:52:57.000000000 +0000 @@ -198,7 +198,6 @@ int64_t msc_delta; struct list cache; uint32_t cache_size; - int scanout; }; static struct dri2_window *dri2_window(WindowPtr win) @@ -214,14 +213,10 @@ if (priv->front) return true; - if (priv->scanout < 0) - priv->scanout = - (sna->flags & (SNA_LINEAR_FB | SNA_NO_WAIT | SNA_NO_FLIP)) == 0 && - draw->width == sna->front->drawable.width && - draw->height == sna->front->drawable.height && - draw->bitsPerPixel == sna->front->drawable.bitsPerPixel; - - return priv->scanout; + return (sna->flags & (SNA_LINEAR_FB | SNA_NO_WAIT | SNA_NO_FLIP)) == 0 && + draw->width == sna->front->drawable.width && + draw->height == sna->front->drawable.height && + draw->bitsPerPixel == sna->front->drawable.bitsPerPixel; } static void @@ -300,7 +295,8 @@ DBG(("%s: allocating new backbuffer\n", __FUNCTION__)); flags = CREATE_EXACT; - if (use_scanout(sna, draw, priv)) { + if (get_private(back)->bo->scanout && + use_scanout(sna, draw, priv)) { DBG(("%s: requesting scanout compatible back\n", __FUNCTION__)); flags |= CREATE_SCANOUT; } @@ -619,6 +615,8 @@ size = (uint32_t)draw->height << 16 | draw->width; switch (attachment) { case DRI2BufferFrontLeft: + sna->needs_dri_flush = true; + pixmap = get_drawable_pixmap(draw); buffer = NULL; if (draw->type != DRAWABLE_PIXMAP) @@ -647,12 +645,6 @@ assert(private->bo->pitch == buffer->pitch); assert(private->bo->active_scanout); - sna_pixmap_move_to_gpu(pixmap, - MOVE_READ | - __MOVE_FORCE | - __MOVE_DRI); - kgem_bo_submit(&sna->kgem, private->bo); - private->refcnt++; return buffer; } @@ -1464,6 +1456,7 @@ * we can safely ignore the capability check - if we have more * than two pipes, we can assume that they are fully supported. */ + assert(pipe < _DRM_VBLANK_HIGH_CRTC_MASK); if (pipe > 1) return pipe << DRM_VBLANK_HIGH_CRTC_SHIFT; else if (pipe > 0) @@ -1548,7 +1541,6 @@ priv->crtc = crtc; priv->msc_delta = 0; priv->chain = NULL; - priv->scanout = -1; priv->cache_size = 0; list_init(&priv->cache); dri2_window_attach((WindowPtr)draw, priv); @@ -1902,8 +1894,6 @@ DBG(("%s: window=%ld\n", __FUNCTION__, win->drawable.id)); decouple_window(win, priv, to_sna_from_drawable(&win->drawable), true); - - priv->scanout = -1; } void sna_dri2_destroy_window(WindowPtr win) @@ -3294,7 +3284,7 @@ CARD64 current_msc; bool immediate; - DBG(("%s: draw=%lu %dx%d, pixmap=%ld %dx%d, back=%u (refs=%d/%d, flush=%d) , front=%u (refs=%d/%d, flush=%d)\n", + DBG(("%s: draw=%lu %dx%d, pixmap=%ld %dx%d, back=%u (refs=%d/%d, flush=%d, active=%d) , front=%u (refs=%d/%d, flush=%d, active=%d)\n", __FUNCTION__, (long)draw->id, draw->width, draw->height, get_drawable_pixmap(draw)->drawable.serialNumber, @@ -3304,10 +3294,12 @@ get_private(back)->refcnt, get_private(back)->bo->refcnt, get_private(back)->bo->flush, + get_private(back)->bo->active_scanout, get_private(front)->bo->handle, get_private(front)->refcnt, get_private(front)->bo->refcnt, - get_private(front)->bo->flush)); + get_private(front)->bo->flush, + get_private(front)->bo->active_scanout)); DBG(("%s(target_msc=%llu, divisor=%llu, remainder=%llu)\n", __FUNCTION__, @@ -3315,6 +3307,9 @@ (long long)divisor, (long long)remainder)); + assert(front != back); + assert(get_private(front) != get_private(back)); + assert(get_private(front)->refcnt); assert(get_private(back)->refcnt); @@ -3322,6 +3317,9 @@ assert(get_private(front)->bo->refcnt); assert(get_private(back)->bo->refcnt); + assert(get_private(front)->bo->active_scanout); + assert(!get_private(back)->bo->active_scanout); + if (get_private(front)->pixmap != get_drawable_pixmap(draw)) { DBG(("%s: decoupled DRI2 front pixmap=%ld, actual pixmap=%ld\n", __FUNCTION__, diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna.h 2017-10-18 20:02:52.000000000 +0000 @@ -633,16 +633,28 @@ extern uint32_t sna_crtc_to_sprite(xf86CrtcPtr crtc, unsigned idx); extern bool sna_crtc_is_transformed(xf86CrtcPtr crtc); -#define CRTC_VBLANK 0x3 +#define CRTC_VBLANK 0x7 #define CRTC_ON 0x80000000 uint32_t sna_crtc_id(xf86CrtcPtr crtc); +struct sna_crtc_public { + unsigned long flags; + struct list vblank_queue; +}; + static inline unsigned long *sna_crtc_flags(xf86CrtcPtr crtc) { - unsigned long *flags = crtc->driver_private; - assert(flags); - return flags; + struct sna_crtc_public *pub = crtc->driver_private; + assert(pub); + return &pub->flags; +} + +static inline struct list *sna_crtc_vblank_queue(xf86CrtcPtr crtc) +{ + struct sna_crtc_public *pub = crtc->driver_private; + assert(pub); + return &pub->vblank_queue; } static inline unsigned sna_crtc_pipe(xf86CrtcPtr crtc) @@ -657,12 +669,14 @@ static inline void sna_crtc_set_vblank(xf86CrtcPtr crtc) { - assert((*sna_crtc_flags(crtc) & CRTC_VBLANK) < 3); + DBG(("%s: current vblank count: %d\n", __FUNCTION__, *sna_crtc_flags(crtc) & CRTC_VBLANK)); + assert((*sna_crtc_flags(crtc) & CRTC_VBLANK) < CRTC_VBLANK); ++*sna_crtc_flags(crtc); } static inline void sna_crtc_clear_vblank(xf86CrtcPtr crtc) { + DBG(("%s: current vblank count: %d\n", __FUNCTION__, *sna_crtc_flags(crtc) & CRTC_VBLANK)); assert(*sna_crtc_flags(crtc) & CRTC_VBLANK); --*sna_crtc_flags(crtc); } diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_present.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_present.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_present.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_present.c 2017-10-18 20:02:52.000000000 +0000 @@ -197,6 +197,16 @@ return MIN(delay, INT32_MAX); } +static void add_to_crtc_vblank(struct sna_present_event *info, + int delta) +{ + info->queued = true; + if (delta == 1 && info->crtc) { + sna_crtc_set_vblank(info->crtc); + info->crtc = mark_crtc(info->crtc); + } +} + static CARD32 sna_fake_vblank_handler(OsTimerPtr timer, CARD32 now, void *data) { struct sna_present_event *info = data; @@ -225,11 +235,7 @@ vbl.request.signal = (uintptr_t)MARK_PRESENT(info); if (sna_wait_vblank(info->sna, &vbl, sna_crtc_pipe(info->crtc)) == 0) { DBG(("%s: scheduled new vblank event for %lld\n", __FUNCTION__, (long long)info->target_msc)); - info->queued = true; - if (delta == 1) { - sna_crtc_set_vblank(info->crtc); - info->crtc = mark_crtc(info->crtc); - } + add_to_crtc_vblank(info, delta); free(timer); return 0; } @@ -326,11 +332,7 @@ if (!sna_fake_vblank(info)) return false; } else { - info->queued = true; - if (delta == 1) { - sna_crtc_set_vblank(info->crtc); - info->crtc = mark_crtc(info->crtc); - } + add_to_crtc_vblank(info, delta); } return true; @@ -360,6 +362,47 @@ return NULL; } +static void add_keepalive(struct sna *sna, xf86CrtcPtr crtc, uint64_t msc) +{ + struct sna_present_event *info, *tmp; + union drm_wait_vblank vbl; + + list_for_each_entry(tmp, sna_crtc_vblank_queue(crtc), link) { + if (tmp->target_msc == msc) { + DBG(("%s: vblank already queued for target_msc=%lld\n", + __FUNCTION__, (long long)msc)); + return; + } + + if ((int64_t)(tmp->target_msc - msc) > 0) + break; + } + + DBG(("%s: adding keepalive for target_msc=%lld\n", + __FUNCTION__, (long long)msc)); + + info = info_alloc(sna); + if (!info) + return; + + info->crtc = crtc; + info->sna = sna; + info->target_msc = msc; + info->event_id = (uint64_t *)(info + 1); + info->n_event_id = 0; + + VG_CLEAR(vbl); + vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; + vbl.request.sequence = msc; + vbl.request.signal = (uintptr_t)MARK_PRESENT(info); + + if (sna_wait_vblank(info->sna, &vbl, sna_crtc_pipe(info->crtc)) == 0) { + list_add_tail(&info->link, &tmp->link); + add_to_crtc_vblank(info, 1); + } else + info_free(info); +} + static int sna_present_get_ust_msc(RRCrtcPtr crtc, CARD64 *ust, CARD64 *msc) { @@ -377,34 +420,10 @@ vbl.request.type = DRM_VBLANK_RELATIVE; vbl.request.sequence = 0; if (sna_wait_vblank(sna, &vbl, sna_crtc_pipe(crtc->devPrivate)) == 0) { - struct sna_present_event *info; - *ust = ust64(vbl.reply.tval_sec, vbl.reply.tval_usec); *msc = sna_crtc_record_vblank(crtc->devPrivate, &vbl); - info = info_alloc(sna); - if (info) { - info->crtc = crtc->devPrivate; - info->sna = sna; - info->target_msc = *msc + 1; - info->event_id = (uint64_t *)(info + 1); - info->n_event_id = 0; - - vbl.request.type = - DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; - vbl.request.sequence = info->target_msc; - vbl.request.signal = (uintptr_t)MARK_PRESENT(info); - - if (sna_wait_vblank(info->sna, &vbl, - sna_crtc_pipe(info->crtc)) == 0) { - list_add(&info->link, - &sna->present.vblank_queue); - info->queued = true; - sna_crtc_set_vblank(info->crtc); - info->crtc = mark_crtc(info->crtc); - } else - info_free(info); - } + add_keepalive(sna, crtc->devPrivate, *msc + 1); } else { const struct ust_msc *swap; last: @@ -477,9 +496,8 @@ if (warn_unless(msc - swap->msc < 1ull<<31)) return BadValue; - list_for_each_entry(tmp, &sna->present.vblank_queue, link) { - if (tmp->target_msc == msc && - unmask_crtc(tmp->crtc) == crtc->devPrivate) { + list_for_each_entry(tmp, sna_crtc_vblank_queue(crtc->devPrivate), link) { + if (tmp->target_msc == msc) { uint64_t *events = tmp->event_id; if (tmp->n_event_id && @@ -692,8 +710,10 @@ swap.tv_sec = event->tv_sec; swap.tv_usec = event->tv_usec; swap.msc = event->sequence; - } else + } else { + info->crtc = unmask_crtc(info->crtc); swap = *sna_crtc_last_swap(info->crtc); + } DBG(("%s: pipe=%d, tv=%d.%06d msc=%lld (target %lld), event=%lld complete%s\n", __FUNCTION__, info->crtc ? sna_crtc_pipe(info->crtc) : -1, @@ -702,8 +722,11 @@ (long long)info->event_id[0], info->target_msc && info->target_msc == swap.msc ? "" : ": MISS")); present_event_notify(info->event_id[0], swap_ust(&swap), swap.msc); - if (info->crtc) + if (info->crtc) { sna_crtc_clear_vblank(info->crtc); + if (!sna_crtc_has_vblank(info->crtc)) + add_keepalive(info->sna, info->crtc, swap.msc + 1); + } if (info->sna->present.unflip) { DBG(("%s: executing queued unflip (event=%lld)\n", __FUNCTION__, (long long)info->sna->present.unflip)); @@ -747,9 +770,7 @@ return FALSE; } - info->queued = true; - if (info->crtc) - sna_crtc_set_vblank(info->crtc); + add_to_crtc_vblank(info, 1); return TRUE; } @@ -862,12 +883,10 @@ DBG(("%s: flips still pending, stalling\n", __FUNCTION__)); pfd.fd = sna->kgem.fd; pfd.events = POLLIN; - do { - if (poll(&pfd, 1, -1) != 1) - return FALSE; - + while (poll(&pfd, 1, 0) == 1) sna_mode_wakeup(sna); - } while (sna->mode.flip_active); + if (sna->mode.flip_active) + return FALSE; } bo = get_flip_bo(pixmap); @@ -904,7 +923,6 @@ return; } - assert(!sna->mode.shadow_enabled); if (sna->mode.flip_active) { DBG(("%s: %d outstanding flips, queueing unflip\n", __FUNCTION__, sna->mode.flip_active)); assert(sna->present.unflip == 0); @@ -912,13 +930,19 @@ return; } + bo = get_flip_bo(screen->GetScreenPixmap(screen)); + + /* Are we unflipping after a failure that left our ScreenP in place? */ + if (!sna_needs_page_flip(sna, bo)) + goto notify; + + assert(!sna->mode.shadow_enabled); if (sna->flags & SNA_TEAR_FREE) { DBG(("%s: %s TearFree after Present flips\n", __FUNCTION__, sna->mode.shadow_damage != NULL ? "enabling" : "disabling")); sna->mode.shadow_enabled = sna->mode.shadow_damage != NULL; } - bo = get_flip_bo(screen->GetScreenPixmap(screen)); if (bo == NULL) { reset_mode: DBG(("%s: failed, trying to restore original mode\n", __FUNCTION__)); @@ -926,10 +950,6 @@ goto notify; } - /* Are we unflipping after a failure that left our ScreenP in place? */ - if (!sna_needs_page_flip(sna, bo)) - goto notify; - assert(sna_pixmap(screen->GetScreenPixmap(screen))->pinned & PIN_SCANOUT); if (sna->flags & SNA_HAS_ASYNC_FLIP) { diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_render.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_render.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_render.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_render.h 2017-09-28 23:16:36.000000000 +0000 @@ -437,6 +437,7 @@ GEN6_WM_KERNEL_OPACITY_P, GEN6_WM_KERNEL_VIDEO_PLANAR, + GEN6_WM_KERNEL_VIDEO_NV12, GEN6_WM_KERNEL_VIDEO_PACKED, GEN6_KERNEL_COUNT }; @@ -487,6 +488,7 @@ GEN7_WM_KERNEL_OPACITY_P, GEN7_WM_KERNEL_VIDEO_PLANAR, + GEN7_WM_KERNEL_VIDEO_NV12, GEN7_WM_KERNEL_VIDEO_PACKED, GEN7_WM_KERNEL_VIDEO_RGB, GEN7_WM_KERNEL_COUNT @@ -540,6 +542,7 @@ GEN8_WM_KERNEL_OPACITY_P, GEN8_WM_KERNEL_VIDEO_PLANAR, + GEN8_WM_KERNEL_VIDEO_NV12, GEN8_WM_KERNEL_VIDEO_PACKED, GEN8_WM_KERNEL_VIDEO_RGB, GEN8_WM_KERNEL_COUNT @@ -591,6 +594,7 @@ GEN9_WM_KERNEL_OPACITY_P, GEN9_WM_KERNEL_VIDEO_PLANAR, + GEN9_WM_KERNEL_VIDEO_NV12, GEN9_WM_KERNEL_VIDEO_PACKED, GEN9_WM_KERNEL_VIDEO_RGB, GEN9_WM_KERNEL_COUNT diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_render_inline.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_render_inline.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_render_inline.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_render_inline.h 2017-10-18 20:02:52.000000000 +0000 @@ -56,6 +56,15 @@ sna->kgem.batch[sna->kgem.nbatch++] = dword; } +static force_inline void batch_emit_aligned(struct sna *sna, uint32_t dword, unsigned align) +{ + assert(sna->kgem.mode != KGEM_NONE); + assert(sna->kgem.nbatch + KGEM_BATCH_RESERVED < sna->kgem.surface); + while (sna->kgem.nbatch & (align-1)) + sna->kgem.batch[sna->kgem.nbatch++] = 0; + sna->kgem.batch[sna->kgem.nbatch++] = dword; +} + static force_inline void batch_emit64(struct sna *sna, uint64_t qword) { assert(sna->kgem.mode != KGEM_NONE); diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video.c 2017-09-28 23:16:36.000000000 +0000 @@ -233,7 +233,29 @@ /* Determine the desired destination pitch (representing the * chroma's pitch in the planar case). */ - if (is_planar_fourcc(frame->id)) { + if (is_nv12_fourcc(frame->id)) { + assert((width & 1) == 0); + assert((height & 1) == 0); + if (rotation & (RR_Rotate_90 | RR_Rotate_270)) { + frame->pitch[0] = ALIGN(height, align); + frame->pitch[1] = ALIGN(height, align); + frame->size = width * frame->pitch[1] + + width / 2 * frame->pitch[0]; + } else { + frame->pitch[0] = ALIGN(width, align); + frame->pitch[1] = ALIGN(width, align); + frame->size = height * frame->pitch[1] + + height / 2 * frame->pitch[0]; + } + + if (rotation & (RR_Rotate_90 | RR_Rotate_270)) { + frame->UBufOffset = (int)frame->pitch[1] * width; + frame->VBufOffset = frame->UBufOffset; + } else { + frame->UBufOffset = (int)frame->pitch[1] * height; + frame->VBufOffset = frame->UBufOffset; + } + } else if (is_planar_fourcc(frame->id)) { assert((width & 1) == 0); assert((height & 1) == 0); if (rotation & (RR_Rotate_90 | RR_Rotate_270)) { @@ -297,6 +319,78 @@ assert(frame->size); } +static void plane_dims(const struct sna_video_frame *frame, int sub, + int *x, int *y, int *w, int *h) +{ + *x = frame->image.x1; + *y = frame->image.y1; + *w = frame->image.x2 - frame->image.x1; + *h = frame->image.y2 - frame->image.y1; + + if (sub) { + *x >>= 1; *w >>= 1; + *y >>= 1; *h >>= 1; + } +} + +static void sna_memcpy_cbcr_plane(struct sna_video *video, + uint16_t *dst, const uint16_t *src, + const struct sna_video_frame *frame) +{ + int dstPitch = frame->pitch[0] >> 1, srcPitch; + const uint16_t *s; + int i, j = 0; + int x, y, w, h; + + plane_dims(frame, 1, &x, &y, &w, &h); + + srcPitch = ALIGN((frame->width >> 1), 2); + + src += y * srcPitch + x; + if (!video->textured) + x = y = 0; + + switch (frame->rotation) { + case RR_Rotate_0: + dst += y * dstPitch + x; + if (srcPitch == dstPitch && srcPitch == w) + memcpy(dst, src, (srcPitch * h) << 1); + else while (h--) { + memcpy(dst, src, w << 1); + src += srcPitch; + dst += dstPitch; + } + break; + case RR_Rotate_90: + for (i = 0; i < h; i++) { + s = src; + for (j = 0; j < w; j++) + dst[i + ((x + w - j - 1) * dstPitch)] = *s++; + src += srcPitch; + } + break; + case RR_Rotate_180: + for (i = 0; i < h; i++) { + s = src; + for (j = 0; j < w; j++) { + dst[(x + w - j - 1) + + ((h - i - 1) * dstPitch)] = *s++; + } + src += srcPitch; + } + break; + case RR_Rotate_270: + for (i = 0; i < h; i++) { + s = src; + for (j = 0; j < w; j++) { + dst[(h - i - 1) + (x + j * dstPitch)] = *s++; + } + src += srcPitch; + } + break; + } +} + static void sna_memcpy_plane(struct sna_video *video, uint8_t *dst, const uint8_t *src, const struct sna_video_frame *frame, int sub) @@ -306,15 +400,11 @@ int i, j = 0; int x, y, w, h; - x = frame->image.x1; - y = frame->image.y1; - w = frame->image.x2 - frame->image.x1; - h = frame->image.y2 - frame->image.y1; - if (sub) { - x >>= 1; w >>= 1; - y >>= 1; h >>= 1; + plane_dims(frame, sub, &x, &y, &w, &h); + + if (sub) srcPitch = ALIGN((frame->width >> 1), 4); - } else + else srcPitch = ALIGN(frame->width, 4); src += y * srcPitch + x; @@ -363,6 +453,17 @@ } static void +sna_copy_nv12_data(struct sna_video *video, + const struct sna_video_frame *frame, + const uint8_t *src, uint8_t *dst) +{ + sna_memcpy_plane(video, dst, src, frame, 0); + src += frame->height * ALIGN(frame->width, 4); + dst += frame->UBufOffset; + sna_memcpy_cbcr_plane(video, (void*)dst, (void*)src, frame); +} + +static void sna_copy_planar_data(struct sna_video *video, const struct sna_video_frame *frame, const uint8_t *src, uint8_t *dst) @@ -506,7 +607,28 @@ if (frame->rotation == RR_Rotate_0 && !video->tiled) { DBG(("%s: unrotated, untiled fast paths: is-planar?=%d\n", __FUNCTION__, is_planar_fourcc(frame->id))); - if (is_planar_fourcc(frame->id)) { + if (is_nv12_fourcc(frame->id)) { + int w = frame->image.x2 - frame->image.x1; + int h = frame->image.y2 - frame->image.y1; + if (ALIGN(h, 2) == frame->height && + ALIGN(w, 4) == frame->pitch[0] && + ALIGN(w, 4) == frame->pitch[1]) { + if (frame->bo) { + if (!kgem_bo_write(&video->sna->kgem, frame->bo, + buf, frame->size)) + goto use_gtt; + } else { + frame->bo = kgem_create_buffer(&video->sna->kgem, frame->size, + KGEM_BUFFER_WRITE | KGEM_BUFFER_WRITE_INPLACE, + (void **)&dst); + if (frame->bo == NULL) + return false; + + memcpy(dst, buf, frame->size); + } + return true; + } + } else if (is_planar_fourcc(frame->id)) { int w = frame->image.x2 - frame->image.x1; int h = frame->image.y2 - frame->image.y1; if (ALIGN(h, 2) == frame->height && @@ -583,7 +705,9 @@ return false; } - if (is_planar_fourcc(frame->id)) + if (is_nv12_fourcc(frame->id)) + sna_copy_nv12_data(video, frame, buf, dst); + else if (is_planar_fourcc(frame->id)) sna_copy_planar_data(video, frame, buf, dst); else sna_copy_packed_data(video, frame, buf, dst); diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video.h xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video.h --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video.h 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video.h 2017-09-28 23:16:36.000000000 +0000 @@ -38,6 +38,7 @@ #define FOURCC_XVMC (('C' << 24) + ('M' << 16) + ('V' << 8) + 'X') #define FOURCC_RGB565 ((16 << 24) + ('B' << 16) + ('G' << 8) + 'R') #define FOURCC_RGB888 ((24 << 24) + ('B' << 16) + ('G' << 8) + 'R') +#define FOURCC_NV12 (('2' << 24) + ('1' << 16) + ('V' << 8) + 'N') /* * Below, a dummy picture type that is used in XvPutImage @@ -69,6 +70,15 @@ XvTopToBottom \ } +/* no standard define for this */ +#define XVIMAGE_NV12 { \ + FOURCC_NV12, XvYUV, LSBFirst, \ + {'N','V','1','2', 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ + 12, XvPlanar, 2, 0, 0, 0, 0, 8, 8, 8, 1, 2, 2, 1, 2, 2, \ + {'Y','U','V', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \ + XvTopToBottom \ +} + struct sna_video { struct sna *sna; @@ -160,6 +170,17 @@ case FOURCC_YV12: case FOURCC_I420: case FOURCC_XVMC: + case FOURCC_NV12: + return 1; + default: + return 0; + } +} + +static inline int is_nv12_fourcc(int id) +{ + switch (id) { + case FOURCC_NV12: return 1; default: return 0; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video_sprite.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video_sprite.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video_sprite.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video_sprite.c 2017-08-08 00:50:46.000000000 +0000 @@ -47,6 +47,8 @@ #define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ #define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */ +#define has_hw_scaling(sna) ((sna)->kgem.gen < 071) + #define LOCAL_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct local_mode_set_plane) struct local_mode_set_plane { uint32_t plane_id; @@ -151,7 +153,7 @@ struct sna_video *video = port->devPriv.ptr; struct sna *sna = video->sna; - if (sna->kgem.gen >= 075 && !sna->render.video) { + if (!has_hw_scaling(sna) && !sna->render.video) { *p_w = vid_w; *p_h = vid_h; } else { @@ -522,7 +524,7 @@ cache_bo = true; } - if (sna->kgem.gen >= 075 && sna->render.video && + if (!has_hw_scaling(sna) && sna->render.video && !((frame.src.x2 - frame.src.x1) == (dst.x2 - dst.x1) && (frame.src.y2 - frame.src.y1) == (dst.y2 - dst.y1))) { ScreenPtr screen = to_screen_from_sna(sna); diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video_textured.c xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video_textured.c --- xserver-xorg-video-intel-2.99.917+git20170309/src/sna/sna_video_textured.c 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/src/sna/sna_video_textured.c 2017-09-28 23:16:36.000000000 +0000 @@ -61,6 +61,15 @@ XVMC_YUV, }; +static const XvImageRec gen4_Images[] = { + XVIMAGE_YUY2, + XVIMAGE_YV12, + XVIMAGE_I420, + XVIMAGE_NV12, + XVIMAGE_UYVY, + XVMC_YUV, +}; + static int sna_video_textured_stop(ddStopVideo_ARGS) { struct sna_video *video = port->devPriv.ptr; @@ -298,6 +307,20 @@ offsets[2] = size; size += tmp; break; + case FOURCC_NV12: + *h = (*h + 1) & ~1; + size = (*w + 3) & ~3; + if (pitches) + pitches[0] = size; + size *= *h; + if (offsets) + offsets[1] = size; + tmp = (*w + 3) & ~3; + if (pitches) + pitches[1] = tmp; + tmp *= (*h >> 1); + size += tmp; + break; case FOURCC_UYVY: case FOURCC_YUY2: default: @@ -374,9 +397,12 @@ if (sna->kgem.gen < 030) { adaptor->nImages = ARRAY_SIZE(gen2_Images); adaptor->pImages = (XvImageRec *)gen2_Images; - } else { + } else if (sna->kgem.gen < 040) { adaptor->nImages = ARRAY_SIZE(gen3_Images); adaptor->pImages = (XvImageRec *)gen3_Images; + } else { + adaptor->nImages = ARRAY_SIZE(gen4_Images); + adaptor->pImages = (XvImageRec *)gen4_Images; } #if XORG_XV_VERSION < 2 adaptor->ddAllocatePort = sna_xv_alloc_port; diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/test/.gitignore xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/test/.gitignore --- xserver-xorg-video-intel-2.99.917+git20170309/test/.gitignore 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/test/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -basic-copyarea -basic-copyarea-size -basic-copyplane -basic-fillrect -basic-putimage -basic-lines -basic-stress -basic-stippledrect -basic-tiledrect -DrawSegments -cursor-test -render-fill -render-trapezoid -render-trapezoid-image -render-triangle -render-fill-copy -render-composite-solid -render-composite-solid-mask -render-copyarea -render-copyarea-mask -render-copyarea-size -render-copy-alphaless -render-glyphs -mixed-stress -lowlevel-blt-bench -vsync.avi -dri2-race -dri2-speed -dri2-swap -dri2-test -dri3-test -present-race -present-speed -present-test -shm-test diff -Nru xserver-xorg-video-intel-2.99.917+git20170309/tools/.gitignore xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/tools/.gitignore --- xserver-xorg-video-intel-2.99.917+git20170309/tools/.gitignore 2017-02-28 20:52:19.000000000 +0000 +++ xserver-xorg-video-intel-2.99.917+git1710181804.4798e18~a~padoka0/tools/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -cursor -dri3info -intel-virtual-output -org.x.xf86-video-intel.backlight-helper.policy -xf86-video-intel-backlight-helper