platform/upstream/xf86-video-intel.git
10 years agosna/gen4: Add an ALWAYS_FLUSH debugging option
Chris Wilson [Fri, 17 Jan 2014 14:33:26 +0000 (14:33 +0000)]
sna/gen4: Add an ALWAYS_FLUSH debugging option

Still gen4 is cursed. This should restore the plateau we reached with
2.99.907 by forcing a full GPU flush between every operation.

References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Drop bogus assert added in recent patches
Chris Wilson [Tue, 21 Jan 2014 10:35:30 +0000 (10:35 +0000)]
sna: Drop bogus assert added in recent patches

The intention was to detect if the gc->pCompositeClip still pointed to
the temporary region. However, the assert failed to accomplish that
goal.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Reduce zeal of new gc->pCompositeClip
Chris Wilson [Tue, 21 Jan 2014 10:00:07 +0000 (10:00 +0000)]
sna: Reduce zeal of new gc->pCompositeClip

gc->pCompositeClip starts off NULL, just like sna_gc->priv.

Reported-by: Arkadiusz Miskiewicz
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix typo in assertion from previous commit
Chris Wilson [Tue, 21 Jan 2014 09:25:45 +0000 (09:25 +0000)]
sna: Fix typo in assertion from previous commit

Sigh. It helps to remember to do compile testing with the right
configuration.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: More assertions for tracking gc->pCompositeClip
Chris Wilson [Tue, 21 Jan 2014 09:05:54 +0000 (09:05 +0000)]
sna: More assertions for tracking gc->pCompositeClip

Tracking down who leaves it modified...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: build fix for OpenBSD
Mark Kettenis [Mon, 20 Jan 2014 22:33:16 +0000 (22:33 +0000)]
sna: build fix for OpenBSD

Commit 50a45a1cdd4d8319ba9358974d241069689591c5 introduced the use of
"struct stat" but doesn't include <sys/stat.h>.  Presumably that leaks
in trough some other header on Linux, but on OpenBSD compilation fails
because the struct isn't known.

10 years agosna: Include serial numbers in ValidateGC DBG
Chris Wilson [Mon, 20 Jan 2014 20:47:15 +0000 (20:47 +0000)]
sna: Include serial numbers in ValidateGC DBG

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Short-cut the fallback for XCopyArea with depth < 8
Chris Wilson [Mon, 20 Jan 2014 14:35:55 +0000 (14:35 +0000)]
sna: Short-cut the fallback for XCopyArea with depth < 8

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Add some more DBG output around the clipping in sna_do_copy()
Chris Wilson [Mon, 20 Jan 2014 14:35:35 +0000 (14:35 +0000)]
sna: Add some more DBG output around the clipping in sna_do_copy()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Tidy some DBG for copying new modes
Chris Wilson [Mon, 20 Jan 2014 13:29:22 +0000 (13:29 +0000)]
intel-virtual-output: Tidy some DBG for copying new modes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Increase limit on number of possible outputs
Chris Wilson [Mon, 20 Jan 2014 12:19:25 +0000 (12:19 +0000)]
sna: Increase limit on number of possible outputs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Print error events for debugging
Chris Wilson [Mon, 20 Jan 2014 12:33:19 +0000 (12:33 +0000)]
intel-virtual-output: Print error events for debugging

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Disable remote display if SetCrtcConfig fails
Chris Wilson [Mon, 20 Jan 2014 12:25:34 +0000 (12:25 +0000)]
intel-virtual-output: Disable remote display if SetCrtcConfig fails

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Clone modes onto remote display
Chris Wilson [Mon, 20 Jan 2014 10:38:23 +0000 (10:38 +0000)]
intel-virtual-output: Clone modes onto remote display

If the user adds a mode to the VIRTUAL display and then attempts to use
it, add that mode to the remote display.

Reported-by: Christoph Bessei <admin@schwarzwald-falke.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73816
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Yield the processor if the kernel reports EAGAIN
Chris Wilson [Mon, 20 Jan 2014 09:32:50 +0000 (09:32 +0000)]
sna: Yield the processor if the kernel reports EAGAIN

An artifact of our kernel/userspace interaction is that under certain
circumstances the kernel will report EAGAIN in order for it to have CPU
time to run its own workqueues before it can process the userspace
request. We can be cooperative and yield ourselves rather than busy-spin
waiting for the scheduler to demote us.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Use device minor to narrow search for debugfs files
Chris Wilson [Sun, 19 Jan 2014 15:59:42 +0000 (15:59 +0000)]
sna: Use device minor to narrow search for debugfs files

Also vital in case we ever have two Intel GPUs!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Always emit an error message when an execbuffer fails
Chris Wilson [Sun, 19 Jan 2014 15:18:44 +0000 (15:18 +0000)]
sna: Always emit an error message when an execbuffer fails

So that we are not left with a puzzled user with a mysteriously slow
machine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Discard pending wait_for_shadow updates before the TearFree flip
Chris Wilson [Sun, 19 Jan 2014 12:52:20 +0000 (12:52 +0000)]
sna: Discard pending wait_for_shadow updates before the TearFree flip

Rather than just assert that we have used the pending update in
wait_for_shadow, discard it first.

Reported-by: Joe Peterson <joe@wildlava.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70905
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Refactor common routines for debugfs file dumping
Chris Wilson [Sat, 18 Jan 2014 22:38:40 +0000 (22:38 +0000)]
sna: Refactor common routines for debugfs file dumping

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix typo in debugfs paths
Chris Wilson [Sat, 18 Jan 2014 22:21:35 +0000 (22:21 +0000)]
sna: Fix typo in debugfs paths

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Dump fence registers upon starvation
Chris Wilson [Sat, 18 Jan 2014 21:38:59 +0000 (21:38 +0000)]
sna: Dump fence registers upon starvation

References: https://bugs.freedesktop.org/show_bug.cgi?id=73696
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Silence a compiler warning (-Wshadow)
Chris Wilson [Fri, 17 Jan 2014 12:55:33 +0000 (12:55 +0000)]
intel: Silence a compiler warning (-Wshadow)

intel_device.c: In function 'intel_entity_get_devid':
intel_device.c:82:32: warning: declaration of 'index' shadows a global declaration [-Wshadow]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoProvide DRI2DriverVDPAU for future compatibility
Rinat [Fri, 17 Jan 2014 10:47:44 +0000 (10:47 +0000)]
Provide DRI2DriverVDPAU for future compatibility

Since 2010, DRI2 supports multiple driver names. That was added to ease
selection of appropriate driver by libvdpau. As for today, intel driver
support only DRI2DriverDRI (== 0), but not DRI2DriverVDPAU (== 1).

Although there is no any hardware-specific VDPAU driver for intel video
adapters at the moment, it would be easier to use generic drivers like
libvdpau-va-gl by creating symlink named libvdpau_i965.so.1. That way
appropriate driver will be selected in run time automatically:
libvdpau_i965.so.1 on i965 equipped machines, and libvdpau_nvidia.so.1
on nvidia equipped ones.

[ickle: Whilst I think this is a workaround for a brainfart in libvdpau
that it defaults to libvdpau_nvidia.so rather than first to
libdvpau_${DRI2DriverDRI} and then to a hardcoded libvdpau_backend.so,
I have no better solution, and this does seem in accordance with the
spec.]

Signed-off-by: Rinat <ibragimovrinat@mail.ru>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73507

10 years agosna: Nullify pixmap->devPrivate.ptr after promoting CPU bo to GPU
Chris Wilson [Fri, 17 Jan 2014 08:40:34 +0000 (08:40 +0000)]
sna: Nullify pixmap->devPrivate.ptr after promoting CPU bo to GPU

When we convert a CPU bo into a GPU bo, we need to remove any dangling
shadow pointers we use for devPrivate.ptr. Whilst the bo remains alive
these are incoherent, but if we ever replace the GPU bo (for example to
change tiling for DRI2) then the dangling pointer becomes invalid and
will explode on next use.

Reported-by: Mike Aury <mike.auty@gmail.com>
Reported-by: Marti Raudsepp <marti@juffo.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73351
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Intensify the move-to-cpu pointer paranoia
Chris Wilson [Fri, 17 Jan 2014 09:02:55 +0000 (09:02 +0000)]
sna: Intensify the move-to-cpu pointer paranoia

Rather than just state that the final pixmap->devPrivate.ptr is
non-NULL, we can assert that it matches the shadow value.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Cull the DBG spew to stderr
Chris Wilson [Thu, 16 Jan 2014 22:37:41 +0000 (22:37 +0000)]
sna: Cull the DBG spew to stderr

Reduce the logging verbosity of DBG so that it only appears in the
logfile by default - makes debugging much more pleasant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Regularly check that the devPrivate.ptr is valid
Chris Wilson [Thu, 16 Jan 2014 11:20:30 +0000 (11:20 +0000)]
sna: Regularly check that the devPrivate.ptr is valid

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Avoid allocating temporary storage for TearFree rotations
Chris Wilson [Thu, 16 Jan 2014 11:08:05 +0000 (11:08 +0000)]
sna: Avoid allocating temporary storage for TearFree rotations

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Make the temporary upload pixmap as having a statically allocated pointer
Chris Wilson [Thu, 16 Jan 2014 10:27:50 +0000 (10:27 +0000)]
sna: Make the temporary upload pixmap as having a statically allocated pointer

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Add some more paranoia around dangling pointers
Chris Wilson [Wed, 15 Jan 2014 10:07:32 +0000 (10:07 +0000)]
sna: Add some more paranoia around dangling pointers

References: https://bugs.freedesktop.org/show_bug.cgi?id=73351
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Handle release of active stolen scanouts
Chris Wilson [Fri, 10 Jan 2014 21:08:28 +0000 (21:08 +0000)]
sna: Handle release of active stolen scanouts

If the scanout is still active we want to defer our release until the
request is retired.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri: Handle TearFree vblanks whilst the pipe is off
Chris Wilson [Fri, 10 Jan 2014 12:01:29 +0000 (12:01 +0000)]
sna/dri: Handle TearFree vblanks whilst the pipe is off

As an extra complication for handling TearFree is that if we attempt to
requeue a swap whilst the pipe is off, that fails. As we have recursed
from the pixmap migration path, we have to abort the blit but still send
the event back to the client so that they unblock.

Reported-by: Harald Judt <h.judt@gmx.at>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73469
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Include the deferred hotplug uevent propagation in DBG
Chris Wilson [Thu, 9 Jan 2014 15:53:42 +0000 (15:53 +0000)]
sna: Include the deferred hotplug uevent propagation in DBG

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Add regular refcnt checks on pixmap bo
Chris Wilson [Thu, 9 Jan 2014 12:34:58 +0000 (12:34 +0000)]
sna: Add regular refcnt checks on pixmap bo

References: https://bugs.freedesktop.org/show_bug.cgi?id=73406
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoRevert "sna: Remove spurious SAMPLER writemask for gen4"
Chris Wilson [Wed, 8 Jan 2014 11:08:47 +0000 (11:08 +0000)]
Revert "sna: Remove spurious SAMPLER writemask for gen4"

This reverts commit 4966f8374a068ca2a533e30594bfd333551ffd37.

Not so spurious after all!

Reported-by: Michal Suchanek
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen4: Tidy URB_FENCE command
Chris Wilson [Tue, 7 Jan 2014 14:42:41 +0000 (14:42 +0000)]
sna/gen4: Tidy URB_FENCE command

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen4: Use PIPE_CONTROL for a smaller hammer
Chris Wilson [Tue, 7 Jan 2014 14:05:09 +0000 (14:05 +0000)]
sna/gen4: Use PIPE_CONTROL for a smaller hammer

Using MI_FLUSH to break up primitive is overkill when a top-of-pipe
PIPE_CONTROL will suffice.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen4: Check for available batch space before restoring state after CA pass
Chris Wilson [Tue, 7 Jan 2014 13:43:35 +0000 (13:43 +0000)]
sna/gen4: Check for available batch space before restoring state after CA pass

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73348
References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen4: Reduce flushes between primitive continuations
Chris Wilson [Wed, 20 Nov 2013 14:22:05 +0000 (14:22 +0000)]
sna/gen4: Reduce flushes between primitive continuations

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Remove spurious SAMPLER writemask for gen4
Chris Wilson [Wed, 20 Nov 2013 14:20:54 +0000 (14:20 +0000)]
sna: Remove spurious SAMPLER writemask for gen4

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agouxa: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff
Chris Wilson [Mon, 6 Jan 2014 14:30:56 +0000 (14:30 +0000)]
uxa: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff

As we assume that Suspend, Standby alias to Off and disable the crtc
when switching to any mode other than On, we need to also perform the
backlight updates for Suspend,Standby prior to passing the DPMS value
onto the kernel.

Suggested-by: Alexander Monakov <amonakov@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agouxa: Disable updating properties upon reading their values
Chris Wilson [Mon, 6 Jan 2014 14:37:09 +0000 (14:37 +0000)]
uxa: Disable updating properties upon reading their values

Backport commit e76b08cad2770015346fd4cd757de3bb3b6ff37c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 15 12:46:09 2013 +0100

    sna: Disable updating properties upon reading their values

in order to prevent random screen blanking upon return from DPMS.

Reported-by: Alexander Monakov <amonakov@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73181
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff
Chris Wilson [Mon, 6 Jan 2014 14:30:56 +0000 (14:30 +0000)]
sna: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff

As we assume that Suspend, Standby alias to Off and disable the crtc
when switching to any mode other than On, we need to also perform the
backlight updates for Suspend,Standby prior to passing the DPMS value
onto the kernel.

Suggested-by: Alexander Monakov <amonakov@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agouxa/dri: Pixmap are offscreen and not attached to any display
Chris Wilson [Mon, 6 Jan 2014 14:26:38 +0000 (14:26 +0000)]
uxa/dri: Pixmap are offscreen and not attached to any display

As the code current assumes that pixmaps are located at screen origin
(0,0), it assumes that they are all on the first CRTC. However, since
they are offscreen, this leads to such complications as attempting to
emit vsync swapbuffers, and even worse attempting to swap a GLXPixmap
onto the scanout following a DRI2SwapBuffers.

Reported-by: Alexander Monakov <amonakov@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73282
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen7+: Emit invalidate between operations if rendering to source/mask
Chris Wilson [Thu, 2 Jan 2014 15:01:38 +0000 (15:01 +0000)]
sna/gen7+: Emit invalidate between operations if rendering to source/mask

Fixes regression from
commit c79cb18407273dc7798618390bd0b7d69b0f80d6 [2.99.907]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Nov 20 11:17:20 2013 +0000

    sna/gen7: Try to reduce flushes between primitive continuations

Reported-by: Simon Munton <simon.j.munton@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73208
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years ago2.99.907 snapshot 2.99.907
Chris Wilson [Wed, 18 Dec 2013 10:33:52 +0000 (10:33 +0000)]
2.99.907 snapshot

10 years agosna/gen4: Sacrifice performance to workaround render corruption
Chris Wilson [Mon, 16 Dec 2013 11:39:20 +0000 (11:39 +0000)]
sna/gen4: Sacrifice performance to workaround render corruption

The long running saga of trying to find an acceptable workaround for the
gen4 rendering corruption (seems to be a read-write hazard failure inside
the gpu) is failing, the only w/a found so far is to send a single
rectangle through the GPU at a time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Remove stale assertion
Chris Wilson [Sun, 15 Dec 2013 10:41:22 +0000 (10:41 +0000)]
sna: Remove stale assertion

Now that we do not remove the move-to-gpu for a plain read from the
TearFree buffer, it is viable to use that buffer as source for cloning.
So we need to kill the stale assertion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Disable build if timerfd is not present
Chris Wilson [Sun, 15 Dec 2013 09:45:24 +0000 (09:45 +0000)]
intel-virtual-output: Disable build if timerfd is not present

Otherwise the build breaks on *BSD.

Reported-by: Yuta SATOH <nigoro.gentoo@0x100.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72707
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Avoid recursive out-of-order operations in the middle of TearFree
Chris Wilson [Sun, 15 Dec 2013 09:39:54 +0000 (09:39 +0000)]
sna: Avoid recursive out-of-order operations in the middle of TearFree

During TearFree, if we have to wait for the shadow flip to complete, we
run the event handler for the device. This can then cause us to evaluate
pending completed vblank events, which may in turn then attempt to use
the shadow bo and recurse into the TearFree handler. Try to prevent this
and requeue the vblank event.

Reported-by: Pascal de Bruijn <pmjdebruijn@pcode.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72690
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen4+: Drop new assertion that we only finish a vbo after use in this batch
Chris Wilson [Thu, 12 Dec 2013 16:49:02 +0000 (16:49 +0000)]
sna/gen4+: Drop new assertion that we only finish a vbo after use in this batch

A full vbo might not be discarded and so upon first use in the following
batch we decided to finish the old vbo and allocate a new. This can
happen before we even emit any relocations and so the assert is bogus.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Remove unused variable
Chris Wilson [Wed, 11 Dec 2013 21:30:06 +0000 (21:30 +0000)]
sna: Remove unused variable

sna_display.c: In function 'sna_crtc_redisplay__fallback':
sna_display.c:4104:19: warning: unused variable 'sna_crtc' [-Wunused-variable]
  struct sna_crtc *sna_crtc = to_sna_crtc(crtc);

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Recognise gen8
Chris Wilson [Mon, 22 Jul 2013 17:56:03 +0000 (18:56 +0100)]
intel: Recognise gen8

Assign gen=8 to the Broadwell PCI IDs, no marketing names are known at
this point in time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Enable scanline waits for Broadwell
Chris Wilson [Tue, 23 Jul 2013 07:17:58 +0000 (08:17 +0100)]
sna: Enable scanline waits for Broadwell

Broadwell uses the same mechanism as Haswell for vsync.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen8: Initial backend for Broadwell
Chris Wilson [Thu, 6 Dec 2012 22:11:32 +0000 (22:11 +0000)]
sna/gen8: Initial backend for Broadwell

Should match the functionality of the earlier generations, but untuned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoUpdate i915_pciids.h
Chris Wilson [Wed, 13 Nov 2013 11:50:52 +0000 (11:50 +0000)]
Update i915_pciids.h

Pulling in changes from:

kernel commit 4d4dead67a4ab1d5de393f15ed5e4e2aa63d3bcf
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Sun Nov 3 16:47:33 2013 -0800

    drm/i915/bdw: Add device IDs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen2,3: Replace stale bo replacement with simple asserts
Chris Wilson [Tue, 10 Dec 2013 10:25:56 +0000 (10:25 +0000)]
sna/gen2,3: Replace stale bo replacement with simple asserts

The surface creation routines should ensure that the minimum pitch
alignments are met. However, when rendering to a CPU bo, the pitch is
not under our control so we need to be more careful.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Set minimum pitch alignment to 8 bytes
Chris Wilson [Tue, 10 Dec 2013 12:37:44 +0000 (12:37 +0000)]
sna: Set minimum pitch alignment to 8 bytes

This prevents render corruption on gen3 and should not adversely affect
BLT pitch requirements or other GPUs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Only discard READ hint for TearFree copy iff it subsumes the pixmap
Chris Wilson [Mon, 9 Dec 2013 10:49:56 +0000 (10:49 +0000)]
sna: Only discard READ hint for TearFree copy iff it subsumes the pixmap

Remembering that the target window may be smaller than its backing
pixmap.

Reported-by: Andreas Klauer <Andreas.Klauer@metamorpher.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72430
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fallback gracefully when redisplaying after a GPU hang
Chris Wilson [Mon, 9 Dec 2013 10:32:05 +0000 (10:32 +0000)]
sna: Fallback gracefully when redisplaying after a GPU hang

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Simplify kgem_bo_can_map()
Chris Wilson [Sun, 8 Dec 2013 16:35:27 +0000 (16:35 +0000)]
sna: Simplify kgem_bo_can_map()

Remove the attempt to trick us into mapping large bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Pass MOVE_READ for partial TearFree move-to-gpu
Chris Wilson [Thu, 5 Dec 2013 16:12:22 +0000 (16:12 +0000)]
sna: Pass MOVE_READ for partial TearFree move-to-gpu

When fixing up a pending shadow pageflip for TearFree, we must tell it
that it needs to flush the damage for a partial move-to-gpu. Even though
the current area does not read from the destination, the move-to-gpu
callback is a global pass, and we need to assume the worst for the
region outside of the target.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72343
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: OsRegisterSigWrapper was only introduced in 1.6.99.900
Chris Wilson [Thu, 5 Dec 2013 11:09:39 +0000 (11:09 +0000)]
sna: OsRegisterSigWrapper was only introduced in 1.6.99.900

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoconfigure: Correct closing ']'
Chris Wilson [Thu, 5 Dec 2013 11:06:59 +0000 (11:06 +0000)]
configure: Correct closing ']'

Too many closed, too few opened.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Compilation fixes for squeeze
Chris Wilson [Thu, 5 Dec 2013 11:00:44 +0000 (11:00 +0000)]
sna: Compilation fixes for squeeze

Older version of glibc and valgrind require a slight massage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Update Baytrail VSync logic
Chris Wilson [Thu, 7 Nov 2013 22:27:50 +0000 (22:27 +0000)]
sna: Update Baytrail VSync logic

My current best guess at the glaring hole in the spec that is
synchronisation to vertical refresh.

Note that this leaves VSync disabled for BYT for now as it is
ineffective - but at least it now doesn't hang!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69869
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Print detected GPU first
Chris Wilson [Wed, 4 Dec 2013 11:55:54 +0000 (11:55 +0000)]
sna: Print detected GPU first

This should make the GPU identification easier to find in future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel: Tidy up driver identification string
Chris Wilson [Wed, 4 Dec 2013 11:06:08 +0000 (11:06 +0000)]
intel: Tidy up driver identification string

Split the identification strings between the older integrated graphic
chipsets and the more recent integrated processor graphics. This helps
to emphasis the recent branding and should reduce confusion about which
processors are supported by the driver.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/dri: Always clear the clear hint after pageflipping
Chris Wilson [Tue, 3 Dec 2013 15:06:10 +0000 (15:06 +0000)]
sna/dri: Always clear the clear hint after pageflipping

commit 3fd116782bb1c05a140f4783e92a8ee6a57143cd
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Sep 23 21:03:07 2013 +0100

    sna/dri: Clear the clear hint upon applying DRI damage

missed the short-circuit path for an already all-damaged pixmap - which
is quite common for the clear pixmaps...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72194
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/gen2,3: Unmap the old GPU bo when replacing due to render target constaints
Chris Wilson [Tue, 3 Dec 2013 12:10:23 +0000 (12:10 +0000)]
sna/gen2,3: Unmap the old GPU bo when replacing due to render target constaints

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Mark up an ordinary pixmap for reuse
Chris Wilson [Tue, 3 Dec 2013 12:10:01 +0000 (12:10 +0000)]
sna: Mark up an ordinary pixmap for reuse

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: More assertions around tracking mapped state
Chris Wilson [Tue, 3 Dec 2013 11:14:53 +0000 (11:14 +0000)]
sna: More assertions around tracking mapped state

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Clear the clear hint after performing a userptr upload
Chris Wilson [Tue, 3 Dec 2013 11:03:39 +0000 (11:03 +0000)]
sna: Clear the clear hint after performing a userptr upload

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Include Pineview in fence over-allocation checks
Chris Wilson [Tue, 3 Dec 2013 09:37:37 +0000 (09:37 +0000)]
sna: Include Pineview in fence over-allocation checks

When creating the object, we need to take account that fenced regions
in the aperture are in power-of-two sizes and so can be much larger than
the actual object. This includes Pineview, which although is more
relaxed with regards to fence alignment of GPU operations, still imposes
the same restrictions on the fence registers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix stipple offset for drawing into child windows
Chris Wilson [Mon, 2 Dec 2013 15:48:50 +0000 (15:48 +0000)]
sna: Fix stipple offset for drawing into child windows

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests: Exercise stippled fills
Chris Wilson [Mon, 2 Dec 2013 10:43:51 +0000 (10:43 +0000)]
tests: Exercise stippled fills

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix tile origin for pattern blits
Chris Wilson [Mon, 2 Dec 2013 11:08:05 +0000 (11:08 +0000)]
sna: Fix tile origin for pattern blits

References: https://bugs.freedesktop.org/show_bug.cgi?id=71260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Drop forced alignment to 64 on pre-gen4 devices
Chris Wilson [Mon, 2 Dec 2013 14:20:51 +0000 (14:20 +0000)]
sna: Drop forced alignment to 64 on pre-gen4 devices

Some linear GPU bo that we create must be naturally aligned, and the
extra alignment imposed for pure paranoia is counter productive.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests: Exercise tiled fills
Chris Wilson [Mon, 2 Dec 2013 10:43:51 +0000 (10:43 +0000)]
tests: Exercise tiled fills

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Dump GTT info if we fail to execute a batch due to ENOSPC
Chris Wilson [Fri, 29 Nov 2013 14:46:54 +0000 (14:46 +0000)]
sna: Dump GTT info if we fail to execute a batch due to ENOSPC

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fix typo inside DBG message
Chris Wilson [Thu, 28 Nov 2013 22:03:39 +0000 (22:03 +0000)]
sna: Fix typo inside DBG message

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna/video: Correct handling of cropped images along packed fast path
Chris Wilson [Thu, 28 Nov 2013 21:13:33 +0000 (21:13 +0000)]
sna/video: Correct handling of cropped images along packed fast path

In particular, it was offseting the read from the source image, but not
correcting the length to read - causing a read from beyond the end of
the source and a segfault.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Fallback from partial to full move-to-cpu
Chris Wilson [Thu, 28 Nov 2013 16:25:52 +0000 (16:25 +0000)]
sna: Fallback from partial to full move-to-cpu

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Tidy up an assertion on an uninitialised variable
Chris Wilson [Thu, 28 Nov 2013 14:12:56 +0000 (14:12 +0000)]
sna: Tidy up an assertion on an uninitialised variable

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Harden GetImage for use with very large buffers
Chris Wilson [Thu, 28 Nov 2013 14:02:18 +0000 (14:02 +0000)]
sna: Harden GetImage for use with very large buffers

That risk causing SIGBUS due to oom.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Wrap glyph composition with sigtrap handling
Chris Wilson [Thu, 28 Nov 2013 13:14:27 +0000 (13:14 +0000)]
sna: Wrap glyph composition with sigtrap handling

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Prefer using userptr for PutImage into large GPU bo
Chris Wilson [Thu, 28 Nov 2013 13:03:54 +0000 (13:03 +0000)]
sna: Prefer using userptr for PutImage into large GPU bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Tidy a split conditional in an picture upload
Chris Wilson [Thu, 28 Nov 2013 13:03:29 +0000 (13:03 +0000)]
sna: Tidy a split conditional in an picture upload

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Wrap image upload with sigtrap
Chris Wilson [Thu, 28 Nov 2013 13:03:06 +0000 (13:03 +0000)]
sna: Wrap image upload with sigtrap

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Add a few more refcnt asserts
Chris Wilson [Wed, 27 Nov 2013 22:06:27 +0000 (22:06 +0000)]
sna: Add a few more refcnt asserts

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Trim remote framebuffer to fit
Chris Wilson [Wed, 27 Nov 2013 12:59:25 +0000 (12:59 +0000)]
intel-virtual-output: Trim remote framebuffer to fit

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Workaround mutter always using the same timestamp
Chris Wilson [Wed, 27 Nov 2013 12:57:09 +0000 (12:57 +0000)]
intel-virtual-output: Workaround mutter always using the same timestamp

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Update connector-type-to-string mapping
Chris Wilson [Tue, 26 Nov 2013 16:13:23 +0000 (16:13 +0000)]
sna: Update connector-type-to-string mapping

Add in a couple of newcomers to the connector type and make it easier to
track updates in future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: mute spurious warnings
Kirill Müller [Tue, 26 Nov 2013 10:36:54 +0000 (11:36 +0100)]
intel-virtual-output: mute spurious warnings

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72027

10 years agointel-virtual-output: Clone remote EDID for virtual outputs
Chris Wilson [Tue, 26 Nov 2013 09:41:42 +0000 (09:41 +0000)]
intel-virtual-output: Clone remote EDID for virtual outputs

References: https://bugs.freedesktop.org/show_bug.cgi?id=72020
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Correct clip region of rotated outputs in source framebuffer
Chris Wilson [Tue, 26 Nov 2013 08:52:39 +0000 (08:52 +0000)]
intel-virtual-output: Correct clip region of rotated outputs in source framebuffer

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Correct plurization of axis for modesetting log message
Chris Wilson [Mon, 25 Nov 2013 18:56:49 +0000 (18:56 +0000)]
sna: Correct plurization of axis for modesetting log message

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Include transforms when computing required fb size
Chris Wilson [Mon, 25 Nov 2013 16:55:47 +0000 (16:55 +0000)]
intel-virtual-output: Include transforms when computing required fb size

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agosna: Include reflections when logging mode changes
Chris Wilson [Mon, 25 Nov 2013 16:49:58 +0000 (16:49 +0000)]
sna: Include reflections when logging mode changes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-virtual-output: Tweak DBG messages for copying rotation
Chris Wilson [Mon, 25 Nov 2013 16:13:45 +0000 (16:13 +0000)]
intel-virtual-output: Tweak DBG messages for copying rotation

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>