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 <gay@sfu.ca>
References: https://bugs.freedesktop.org/show_bug.cgi?id=86075
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
This fixes the following warning due to a typo:
configure: WARNING: unrecognized options: --enable-wc-map
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <tjaalton@ubuntu.com>
Cc: Gary Wang <gary.c.wang@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
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 <chris@chris-wilson.co.uk>
Rather than repeat our derivation of how much RAM we can map, just reuse
the already determined value.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 9115406b65
Author: Chris Wilson <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
The GC struct was changed in
commit 73e2383b7350723256894c5076d0c731aec5cd1f
Author: Adam Jackson <ajax@redhat.com>
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 <chris@chris-wilson.co.uk>
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 <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c76
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 b4872f74c0
Author: Chris Wilson <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
Fixes regression from
commit b4872f74c0
Author: Chris Wilson <chris@chris-wilson.co.uk>
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 <root@huronriver.alporthouse.com>
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 <paulo.miguel.dias@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85144#c12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 <linuxhippy@gmail.com>
Reported-and-tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
References: https://bugs.freedesktop.org/show_bug.cgi?id=85158
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When swapping over the names, we also need to swap the pitches exposed
through the protocol as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>