Commit Graph

6465 Commits

Author SHA1 Message Date
Chris Wilson feeff6fcef sna: Force GTT readback if the GPU is wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 13:36:03 +00:00
Chris Wilson 8a272971d5 sna: Allow inplace uploads to utilise GTT on LLC machines
Rather than arbitrarily disable the fallback paths for LLC, allow it to
utilise any available GTT buffers for inplace uploads. The best
explanation so far is that with the streaming is that we are trashing
the LLC. On other machines, the difference is in the noise.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 12:04:35 +00:00
Chris Wilson bc8a2c30c4 sna: Only try the SRC fixup into the buffer if it is CPU mapped
On one particular machine, this operation is behaving as if it is
reading back UC memory during the explicit write-only composite.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 10:45:29 +00:00
Chris Wilson 889ed28f52 sna: Correctly align used buffers to the following page boundary
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 10:45:29 +00:00
Chris Wilson 974b6a97d7 sna: Fallback to non-LLC paths after an allocation failure for an LLC buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson 5c8084ef04 intel: Becareful not to match UMS against future generations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson be241fb25e sna: Free the handle after pwrite buffer allocation failure
Having just allocated the handle, we need to free it if we then fail to
allocate memory for the buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson 4b3b25f0be sna: Flush our caches if we fail to mmap an object
The likely cause for a mmap failure is that we hold too many objects
open or have exhausted our address space. In both cases, we need to trim
our caches before continuing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson daba1ae3e7 sna: Correctly handle failure to CPU map a new allocation
If we fail to CPU map, we want to fallback to just using pwrite with
normal memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson 0adb0b5e1e sna: Handle mapped buffer allocation failure for LLC
The presumption was that if we had LLC we would have allocated the
buffer by that point - however, it was remotely possible to have fallen
through and so we need to handle those cases.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson f4cff22afa sna: Relax the buffer size assertion to only be larger than required
Not all paths request alloc pages, a few just request sufficient pages
for the original size. So we can only assert that condition is
satisfied.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 15:35:57 +00:00
Chris Wilson 8bc593c732 sna: Make sure we always replace io buffers before inserting into the cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 15:35:57 +00:00
Chris Wilson 5f72158919 configure: XvMC support is optional, so make failure to find xcb non-fatal 2013-02-06 15:10:23 +00:00
Chris Wilson cd6d8f9b9d xvmc: Add the complementary XCB_CFLAGS
After splitting the xvmc dependences into xcb and non-xcb, we then also
have to add the xcb CFLAGS to build libIntelXVmc.la

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 10:37:50 +00:00
Paul Menzel b96ee47ad9 configure.ac: Split out XCB libraries from `XVMCLIB` into `XCB`
Building the package under Debian Sid/unstable, `dh_shlibdeps` informs
that `libI810XvMC.so.1.0.0` does not need to be linked against
`libX11-xcb.so.1`, `libxcb-dri2.so.0`, `libxcb-util.so.0` or
`libxcb.so.1` [1].

        $ debuild -b -us -uc
        […]
        make[1]: Entering directory `/src/xserver-xorg-video-intel'
        dh_shlibdeps -- --warnings=6
        dpkg-shlibdeps: Warnung: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 sollte nicht gegen libX11-xcb.so.1 gelinkt werden (es verwendet keines der Bibliotheks-Symbole)
        dpkg-shlibdeps: Warnung: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 sollte nicht gegen libxcb-dri2.so.0 gelinkt werden (es verwendet keines der Bibliotheks-Symbole)
        dpkg-shlibdeps: Warnung: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 sollte nicht gegen libxcb-util.so.0 gelinkt werden (es verwendet keines der Bibliotheks-Symbole)
        dpkg-shlibdeps: Warnung: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 sollte nicht gegen libxcb.so.1 gelinkt werden (es verwendet keines der Bibliotheks-Symbole)
        make[1]: Leaving directory `/src/xserver-xorg-video-intel'
        […]

Moving `x11-xcb`, `xcb-dri2` and `xcb-aux` from `XVMCLIBS` into `XCB`
and adding `XCB_LIBS` only to the `LIBADD` variables of `libIntelXvMC`
makes the warnings go away and the libraries are still built without any
issues.

        make[1]: Entering directory `/src/xserver-xorg-video-intel'
        dh_shlibdeps -- --warnings=6
        make[1]: Leaving directory `/src/xserver-xorg-video-intel'
           dh_installdeb -O--builddirectory=build/
           dh_xsf_substvars -O--builddirectory=build/
           dh_gencontrol -O--builddirectory=build/
        dpkg-gencontrol: Warnung: Feld Depends von Paket xserver-xorg-video-intel-dbg: unbekannte Substitutionsvariable ${shlibs:Depends}
           dh_md5sums -O--builddirectory=build/
           dh_builddeb -O--builddirectory=build/
        dpkg-deb: Paket »xserver-xorg-video-intel« wird in »../xserver-xorg-video-intel_2.19.0-6.1_i386.deb« gebaut.
        dpkg-deb: Paket »xserver-xorg-video-intel-dbg« wird in »../xserver-xorg-video-intel-dbg_2.19.0-6.1_i386.deb« gebaut.
         dpkg-genchanges -b >../xserver-xorg-video-intel_2.19.0-6.1_i386.changes
        dpkg-genchanges: rein binärer Upload - es ist kein Quellcode hinzugefügt
         dpkg-source --after-build xserver-xorg-video-intel
        dpkg-buildpackage: Binärpaket(e) hochzuladen (keine Quellen enthalten)
        Now running lintian...
        W: xserver-xorg-video-intel: hardening-no-relro usr/lib/libI810XvMC.so.1.0.0
        W: xserver-xorg-video-intel: hardening-no-fortify-functions usr/lib/libI810XvMC.so.1.0.0
        W: xserver-xorg-video-intel: hardening-no-relro usr/lib/libIntelXvMC.so.1.0.0
        W: xserver-xorg-video-intel: hardening-no-fortify-functions usr/lib/libIntelXvMC.so.1.0.0
        W: xserver-xorg-video-intel: hardening-no-relro usr/lib/xorg/modules/drivers/intel_drv.so
        W: xserver-xorg-video-intel: hardening-no-fortify-functions usr/lib/xorg/modules/drivers/intel_drv.so
        N: 1 tag overridden (1 warning)
        Finished running lintian.

The modules were originally added with the following commit present
since tag 2.10.0.

        commit 3e8f2eae3a
        Author: Eric Anholt <eric@anholt.net>
        Date:   Thu Oct 15 13:48:56 2009 -0700

            XVMC: Use XCB DRI2 instead of cargo-culting our own copy of Xlib stuff. (v2)

[1] https://buildd.debian.org/status/fetch.php?pkg=xserver-xorg-video-intel&arch=i386&ver=2%3A2.19.0-6&stamp=1347825458

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2013-02-06 10:19:44 +00:00
Paul Menzel 93770c709a NEWS: Fix a typo: a*n* inadvertent 2013-02-06 10:19:42 +00:00
Chris Wilson a8cfddd280 sna: Tidy buffer allocation size assertions
Rather than perilously update a local variable with the allocated size,
just use the size of the bo in the assertion that is large enough to
satisfy the allocation request.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 22:07:46 +00:00
Chris Wilson 82dc91e8c2 test: Add a very basic blt benchmark
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 22:07:46 +00:00
Chris Wilson 9c80a0337e sna: ValleyView uses the same scanline registers as SandyBridge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 14:56:10 +00:00
Chris Wilson 4c45e3fe45 intel: add more ValleyView PCI IDs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 14:45:39 +00:00
Chris Wilson c6101d9d71 man: Fix a typo s/debuging/debugging/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 11:02:30 +00:00
Chris Wilson f33c90f7ad NEWS: Trivial typo s/utilile/utilise/ 2013-02-05 10:20:30 +00:00
Chris Wilson 6346c84452 sna/gen4: Remove old single-thread SF w/a
The alternative of disabling GPU spans seems to be far more effective.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 10:17:45 +00:00
Chris Wilson 1565917f10 sna/gen4: Disable non-rectilinear GPU span compositing
This seems to be the primary victim of the render corruption, so disable
until the root cause is fixed.

References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05 10:16:10 +00:00
Damien Lespiau 37bc822190 build: Make generation of gen code depend on intel-gen4asm
This way, when a new intel-gen4asm is available (because one just hacked
on it and has installed a new version for instance) the shaders will be
recompiled. This helps catching regressions, testing the latest changes
in the assembler haven't broken too many things.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-04 20:38:08 +00:00
Damien Lespiau 18f8d2291f build: Use $(AM_V_GEN) to silence the assembly of gen programs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-04 20:36:52 +00:00
Damien Lespiau eea535b7e2 build: Make autoreconf honour ACLOCAL_FLAGS
When running autoreconf, it's possible to give flags to the underlying
aclocal by declaring a ACLOCAL_AMFLAGS variable in the top level
Makefile.am.

Putting ${ACLOCAL_FLAGS} there allows the user to set an environment
variable up before running autogen.sh and pull in the right directories
to look for m4 macros, say an up-to-date version of the xorg-util macros.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-04 20:36:24 +00:00
Paul Menzel 9640640ab0 configure.ac: Do not include `xext` and `xfixes` in `XVMCLIB`
Building the package under Debian Sid/unstable, `dh_shlibdeps` informs
that `libIntelXvMC.so.1.0.0` does not need to be linked against
`libXext.so.6` or `libXfixes.so.3` [1].

        $ debuild -b -us -uc
        […]
        make[1]: Entering directory `/build/buildd-xserver-xorg-video-intel_2.19.0-6-i386-9thLfo/xserver-xorg-video-intel-2.19.0'
        dh_shlibdeps -- --warnings=6
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libIntelXvMC.so.1.0.0 should not be linked against libXext.so.6 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libIntelXvMC.so.1.0.0 should not be linked against libXfixes.so.3 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 should not be linked against libXext.so.6 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 should not be linked against libXfixes.so.3 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 should not be linked against libX11-xcb.so.1 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 should not be linked against libxcb-dri2.so.0 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 should not be linked against libxcb-util.so.0 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 should not be linked against libxcb.so.1 (it uses none of the library's symbols)
        dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/xserver-xorg-video-intel/usr/lib/libIntelXvMC.so.1.0.0 debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 were not linked against libXext.so.6 (they use none of the library's symbols)
        dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/xserver-xorg-video-intel/usr/lib/libIntelXvMC.so.1.0.0 debian/xserver-xorg-video-intel/usr/lib/libI810XvMC.so.1.0.0 were not linked against libXfixes.so.3 (they use none of the library's symbols)
        make[1]: Leaving directory `/build/buildd-xserver-xorg-video-intel_2.19.0-6-i386-9thLfo/xserver-xorg-video-intel-2.19.0'
           dh_installdeb -a -O--builddirectory=build/
        […]

Not populating `XVMCLIB` with `xext` and `xfixes` makes the warning go
away and the libraries are still built without any issues.

[1] https://buildd.debian.org/status/fetch.php?pkg=xserver-xorg-video-intel&arch=i386&ver=2%3A2.19.0-6&stamp=1347825458

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2013-02-03 09:26:08 +00:00
Chris Wilson 9807bba950 sna: Drop bogus refcnt assertion during kgem_bo_retire()
As we may call it kgem_bo_sync(), during preparation of the upload
buffer which in turn may operate on an object straight out of the snoop
cache and hence not yet referenced (or in some cases, ever).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-01 18:25:48 +00:00
Chris Wilson a5561f1349 sna: Do not add the INPLACE hint if we have the ASYNC hint set
If the caller is preparing to use the GPU to rendering into the CPU bo,
it will request an ASYNC migration. In those cases, we do not want to
substitute it with an INPLACE operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-01 18:05:35 +00:00
Chris Wilson d3ff1cb9d7 2.21.0 release 2013-02-01 13:46:33 +00:00
Chris Wilson 008f8230a7 sna: Assert that if we have GPU damage we have a GPU bo
Scatter the asserts around the migration points to catch where this
invariant may be untrue.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-01 02:07:11 +00:00
Chris Wilson cf0576f871 sna/video: Correct computation of planar frame size
The total frame size is less than 3 times the subsampled chroma planes
due to the additional alignment bytes.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1104180
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-01 00:22:57 +00:00
Chris Wilson 268285d9a6 sna/gen3+: Flush vertex threads before touching global state
We need to be careful not just when finishing the current vbo to
synchronize with the sharing threads, but also before we emit the batch
state that no other thread will try and do the same.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 22:51:31 +00:00
Chris Wilson 1239e012ae sna: Make sure the needs_flush is always accompanied by a tracking request
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 22:51:31 +00:00
Chris Wilson 9712f49fdd sna: Remove stale assertion
Now the reset is meant to restablish 'rq' if the bo was busy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 18:08:05 +00:00
Chris Wilson cd7df0004c sna: Pass width/height to composite for rotated displays
This is essential to handle displays that are too large to be rendered
normally via the 3D pipeline and so that the bounds of the fixup region
are known.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60124
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 17:32:57 +00:00
Chris Wilson 38376b56cf sna: Remember to move scanouts to the scanout cache after retiring
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 17:30:09 +00:00
Chris Wilson 0a08de1f02 sna: After removing the bo from a batch, check whether it is still busy
If we transfer a bo to the current batch, then subsequently discard it,
we lose the information about its current active state. Try to recover
this information, by querying the kernel and adding it to the flushing
list if necessary.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 16:41:31 +00:00
Chris Wilson fff0686342 sna/traps: Thread the fallback rectilinear compositor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 14:26:27 +00:00
Chris Wilson 839542d219 sna/traps: Allow inplace compositing for non-GPU buffers and rectilinear traps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 12:08:52 +00:00
Chris Wilson e329e04b10 sna/traps: Translate the extents for the rasterization threads
The single-threaded code used the pre-computed width/height and only
required the origin from the bounds. However, the threads need to
allocate memory for themselves based on the computed bounds, and so it
helps if those bounds are then correct (rather than only the top-left
being in local space with the bottom-right in global coordinates).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 11:33:37 +00:00
Chris Wilson 033f75e5bd sna: Stage retirement through the flushing list
If the kernel replies that a bo is still busy, stage its retirement
through the flushing list to be certain that we never stall on a
subsequent write.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 01:43:00 +00:00
Chris Wilson 5f5711e62c sna: Disable dangerous assertions that depend upon external state
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 01:27:44 +00:00
Chris Wilson 42529336fd sna: Prevent falling back to swrast if source is on the GPU
Currently if the dst is wholly contained within the CPU, then we try to
continue to operate on the GPU. However, if we have FORCE_GPU set, it
means that one of the sources for the operation resides on the GPU, and
that would require a readback in order to perform the operation on the
CPU. Hence, if we try to use a CPU bo and fail, convert back to using
the GPU bo if forced.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31 00:58:51 +00:00
Chris Wilson c2d06c407e sna: Improve DBG output for damaged slave outputs
After computing the intersection of the damage with the slave, give the
region extents.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-30 21:17:42 +00:00
Chris Wilson 8867aa6a46 sna/dri: Handle change of BackBuffer across a pending flip
If we encounter a delayed flip with a different back buffer than the
current, simply update the info rather than bug out.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-30 21:17:32 +00:00
Chris Wilson a31fd03bd4 sna: Add a bunch of assertions to make sure we do not misplace scanouts
As scanouts are uncached, they need to be treated carefully and
decontaminated before being placed in the general cache. So double check
that no bo in those caches are still marked as a scanout.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-30 17:28:19 +00:00
Chris Wilson 6f1b862282 sna: Pass the correct WRITE hint when migrating for rendering into the CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-30 16:47:02 +00:00
Chris Wilson 5011ed2e72 sna: Only discard the clear hint when writing inplace to the GPU pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-30 16:47:02 +00:00