Since the upload buffer is special in that it simultaneously exists on
both the CPU and GPU, we need to be extremely careful in marking the cpu
hint flag and asserting it. In particular, the new stricter assert was
firing in the CompositeTrapezoids fallback path.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The clear hint is correctly updated when performing the move-to-gpu and
so it is being superfluously repeated by the callers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tracking to track down where the CPU hint may be set to true but the
pixmap remain entirely damaged on the GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise the sampler on Haswell will just read all zeros when trying to
playback a video.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65699
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the target bo is not bound when we start to emit the composite state
for the operation, we are screwed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We enlarge the read back into to minimise the number of times we have to
migrate pixmap data. However, if we then enlarge the read so that it
overwrites CPU dirty data, then we can introduce corruption.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than completely starve X from handling input events and raising
the spectre of miEQ overflow, stop throttling upon SIGINT. We will have
waited a small period of time (~100ms) for the GPU to catch up, and will
do so again in the near future. This also preserves the hang detection.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Similar to 7d91051c, but along the render path rather than CopyArea.
Makes the presumption that for the upload path the region is stored on
the CPU explicit.
References: https://bugs.freedesktop.org/show_bug.cgi?id=61628
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The code was being careful in making sure that only a BO with an
outstanding GPU write was being flushed. We need to relax that
assertion to allow us to call busy_ioctl after only GTT writes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Makes the presumption that for the upload path the region is stored on
the CPU explicit.
References: https://bugs.freedesktop.org/show_bug.cgi?id=61628
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A few places we were redundantly submitting the same bo, and in others
doing more work than necessary.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This allows us to more accurately track when the GTT is dirty. However,
the only danger is that we may prematurely flush the scanout and clear
the dirty bit and not preserve the flush timer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Better would be to start passing in the sna_pixmap so that we can mark
the GTT as dirty in a single location, and only if we do indeed then do
a GTT update or pwrite.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than reparsing the EDID each time we probe the modes, if the
property hasn't changed keep it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This is a tidy up in preparation for a more controversial patch. In the
meantime, take advantage of information that remains static over the
lifetime of our connectors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since the call to the busy_ioctl is predicated on whether the bo needs
to be flushed by us, therefore when forcing the call to the busy_ioctl
to flush the GTT we need to mark it as requiring needs_flush.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In the future, we may need to explicitly flush GTT writes to the
scanout, so add the infrastructure to do so now.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The DRI2 midlayer may, or may not, recreate the back buffer after a
pixmap change. The result is that the back buffer may or may not be
flagged as unsuitable for flipping, so be paranoid and double check.
(This behaviour was first introduced in 1.9.0 and looks to be removed
again in 1.15.0)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reversed a predicate causing it to fail to blit when it had a
drawable (and worse dereferencing a NULL pointer) instead of terminating
when the Drawable was gone.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes regression from
commit 195a51353c [2.21.8]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Apr 9 19:13:46 2013 +0100
sna/video: Convert to a pure Xv backend
Reported-by: Edward Sheldrake <ejsheldrake@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65479
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Previously it was async, and is likely to be anyway as the pageflip
failed due to the change in output. To be safe, once again request that
the copy does not stall the GPU upon the scanline window.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The tricky nature of the double flip is that there is no SwapComplete
pending and so we must avoid calling it under such circumstances.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we repeat the mmap, keep quiet. Only emit the ErrorF in case even the
repeated attempts to mmap the bo fail.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we find out more of the final product names for Haswell chipsets, we
need to update the user visible identification strings.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
If the user explicitly ignores an output through xorg.conf, then
xf86OutputCreate returns NULL. This is not to be confused with an
allocation error that also returns NULL. The latter is terminal, the
former is desired.
Fixes regression from commit a9acc8dbb4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu May 30 12:09:52 2013 +0100
sna: Cleanup up error reporting after failure to init KMS interface
Reported-by: David Rosca <nowrep@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65381
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Keep the bookkeeping straight after propagating the source clear colour:
commit 810a0ce2f8 [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri May 10 12:02:10 2013 +0100
sna: Propagate clear color when replacing by a CopyArea
Reported-by: Roman Jarosz <kedgedev@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
sna_display.c: In function 'get_fb':
sna_display.c:181:3: warning: implicit declaration of function 'assert_scanout' [-Wimplicit-function-declaration]
sna_display.c:181:3: warning: nested extern declaration of 'assert_scanout' [-Wnested-externs]
* sigh
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fix another regression from
commit ef9dc6fae5 [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon May 20 11:08:51 2013 +0100
sna: Undo a few more overwritten operations upon a bo
The REPLACES predicate was meant to complement the existing tests, not
be compulsory.
Found whilst investigating why performance seemed to have dropped off in
Phoronix's benchmarks.
Reported-by: Michael Larabel <michael@phoronix.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Just abort instead of trying to limp on if we fail to even allocate
memory during initialisation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We need to be a notch more careful with remapping the possible clones
mask from the kernel:
- SDVO and Haswell DDI have multiple connectors mapping to the same encoder.
- The connector list can be reordered compared to the encoder list.
This is used to move eDP/LVDS to the front.
Also add even more debug output.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Start filling in the names for the parts that have been announced, the
Iris branded Haswell GT3 parts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>