Commit Graph

4951 Commits

Author SHA1 Message Date
Chris Wilson 6142232fa0 sna: Add video sprite support for ILK+
Based on the work by Jesse Barnes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-28 22:53:17 +01:00
Chris Wilson ae8aa172a7 sna: Fix up 32-bit overflow for maximum object size calculation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-28 22:07:10 +01:00
Chris Wilson 2e7b5f7eaf sna/traps: Prefer to try mono spans on the GPU before trying inplace CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-27 11:26:08 +01:00
Chris Wilson 522b41b393 sna/traps: Fix the width of the left-hand edge of an unaligned box
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-27 11:26:08 +01:00
Chris Wilson 008ad39b72 sna/gen6: Reduce opaque solid OVER to SRC for render composite
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-27 11:26:08 +01:00
Chris Wilson a9e9041934 sna: Remove bogus assertion of no references to in-flight upload buffers
As we may hold a cached reference to an upload buffer whilst it is
in-flight, the assertion that there are no such references to a buffer
being reused is no longer true. Those cached references will be released
as soon as we retire the buffer during the readback and so we are free
to reuse such an upload buffer for immediate readback.

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>
2012-03-26 16:08:14 +01:00
Paulo Zanoni 89091dd8a3 Avoid duplicated code with intel_output_create_ranged_atom
Same change for intel_display.c and sna_display.c.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-26 14:12:56 +01:00
Chris Wilson 62f9833298 sna/gen2+: Approximate expensive gradients when using imprecise rendering
If we lack the ability to use a shader to compute the gradients
per-pixel, we need to use pixman to render a fallback texture. We can
reduce the size of this texture and upsample to reduce the cost with
hopefully imperceptible loss of quality.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-25 23:04:58 +01:00
Chris Wilson 25807f472d uxa: Remove hook for CompositeRectangles
It was broken and not flushing damage correctly. With the
improvements made to the kernel, it is no longer a significant advantage
per se and not worth its additional complexity.

Reported-by: Tilman Sauerbeck <tilman@code-monkey.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32547
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-23 15:00:53 +00:00
Chris Wilson 4460c6d0d3 configure: Stop the debug build erroring out if it cannot find valgrind
Another case where I passed an empty string believing that would be
sufficient to replace the error path...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-23 11:05:55 +00:00
Chris Wilson 168ecd96f2 sna: Make the fallback debugging messages more consistent
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 23:48:58 +00:00
Chris Wilson 8693005b54 sna: Update the target bo after changing from Y tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 23:45:42 +00:00
Chris Wilson 83f98d6e5c sna: Correctly test for clear glyphs when searching for ones to skip
With xterm, it is quite common for it to redraw itself by using lots of
spaces and so it is efficient for us if we ellide those clear glyphs and
only draw the backing boxes. However, we were only checking the first 8
pixels in each line because of a missing pointer increment.

Fixes absent '=' characters when using a compositor and ImageText.

Reported-by: Jiri Slaby <jirislaby@gmail.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47735
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 21:57:14 +00:00
Chris Wilson 86121a3af9 sna: Adjust the damage region for the composite offset
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 11:23:02 +00:00
Chris Wilson a6b48dd7f1 sna: Force fallbacks if the destination is unattached
Since the removal of the ability to create a backing pixmap after the
creation of its parent, it no longer becomes practical to attempt
rendering with the GPU to unattached pixmaps. So having made the
decision never to render to that pixmap, perform the test explicitly
along the render paths.

This fixes a segmentation fault introduced in 8a303f195 (sna: Remove
existing damage before overwriting with a composite op) which assumed
the existence of a backing pixmap along a render path.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47700
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22 09:22:52 +00:00
Chris Wilson 52f39ae169 sna: Assert that the bo created is large enough
Double check that the maximum access size computed from the bo
parameters is within the allocated size for the bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 13:31:03 +00:00
Chris Wilson 2f23c660f5 sna: Assert that the tiled blt is correctly clipped
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 13:31:00 +00:00
Chris Wilson e0cd13e2af sna: Fallback to inplace upload if forced to tile the indirect replacement
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47629
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 09:06:10 +00:00
Chris Wilson 1db1eced54 sna: Tidy an assertion when handling tiled copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 09:05:58 +00:00
Chris Wilson 38b0cc24b4 sna: Remove the short-circuiting of move-to-cpu for read if no damage
The danger now is that we may have either discarded the shadow pixels or
have replaced them with a GTT mapping, either way undesirable and so we
should reconstruct the shadow mapping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-21 01:03:05 +00:00
Chris Wilson f49a6b1fd7 sna: Decouple the private data after UnrealizeFont
As the font is kept around and reused after UnrealizeFont, we need to
nullify the pointer to our private data in order to prevent the later
use-after-free.

Reported-by: Peter Jordan
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-20 21:36:26 +00:00
Chris Wilson 1bdd6461de sna/traps: Remove bogus assertion
As we only enter that path for singular unbounded boxes, we are
guaranteed to fill the entire trapezoid extents and so do not need the
unbounded fixup the assertion was fretting about.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-20 11:08:44 +00:00
Chris Wilson 1c2932e9cb uxa: Defer the call to EnterVT till after outputs are initialised
We need to do this apparently or else we never perform the VT switch.
However, we can not do it too early, especially not before we have
finished intialising the outputs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47395
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 16:12:37 +00:00
Chris Wilson 972e1108a5 sna: Declare videoRam correctly on gen2 devices
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 14:38:28 +00:00
Chris Wilson c0bab1df50 sna/dri: Make the drawable as damaged for the off-screen immediate exchange
In some cases off-screen is stil visible, for example under a rotation.
As such xrandr -o left; glxgears -fullscreen was broken.

Reported-by: Phillip Haddad <phillip.haddad@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 08:28:07 +00:00
Chris Wilson 17c19ea8e2 sna/traps: Remove separate edge->vertical flag
Mark vertical edges with dy==0 to reduce structure size and reduce
memory load during edge walking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:31 +00:00
Chris Wilson 82023397cd sna/gen3: Improve clear-to-solid reduction
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:31 +00:00
Chris Wilson 7ce5f4a113 sna/gen3: Do not force tiling for large pixmaps
As the extraction routine is now smarter and can construction
subsurfaces without copying we do not need to force tiling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:31 +00:00
Chris Wilson 342dda3fe3 sna/gen3: Prevent copy-fallback if we cannot blit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:31 +00:00
Chris Wilson 28c089781f sna: Fixup the cpu shadow mappings before uploading the box
On the off-chance we arrive here with a pointer to the GTT mapping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:30 +00:00
Chris Wilson 79258fe560 sna/traps: Apply some more operator and unbounded reductions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:30 +00:00
Chris Wilson fe8866d611 sna/gen[345]: Convert CPU mappings to GTT for vertices on submit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:11:30 +00:00
Chris Wilson 97cd0c7da5 sna/traps: Upon reducing an ADD to a SRC, we need to apply the pending clear
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47444
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-18 15:10:37 +00:00
Chris Wilson e31d9dacaf sna/traps: Align indices for unrolled memset in row_inplace()
The compiler presumes that the uint64_t write is naturally aligned and
so may emit code that crashes with an unaligned moved. To workaround
this, make sure the write is so aligned.

References: https://bugs.freedesktop.org/show_bug.cgi?id=47418
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-17 09:25:30 +00:00
Chris Wilson 2b4e11923d sna/traps: Tune inplace_end_subrows()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-17 00:13:35 +00:00
Chris Wilson d887f209f1 sna/dri: Mesa expects the 8-bit stencil buffer to have 2-bytes per pixel
The seperate stencil buffer is full of lies, why worry about one more?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 17:19:11 +00:00
Chris Wilson 63c0d10fae sna/dri: Improve handling of non-front attachments for CopyRegion
Confusion reigns between using the backing pixmap for the drawable for
the front buffer, and a fake pixmap for the auxiliary buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 14:57:39 +00:00
Chris Wilson 324a1dffdc sna/gen3: Micro-optimise solid span emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 13:07:00 +00:00
Chris Wilson 47c47b85f6 sna/traps: Micro-optimise span emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 12:59:13 +00:00
Chris Wilson 3a26437f19 sna/traps: Tune nonzero_row
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 12:37:25 +00:00
Chris Wilson cb04cf9f43 sna/traps: Make the inline u8 arithmetic more robust
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 09:53:15 +00:00
Chris Wilson d55bbdf42c sna/traps: Remove the old paths for mono inplace traps
Dead code elimination.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-16 09:29:39 +00:00
Chris Wilson fe4ad66aad sna: Correct the order of screen private teardown
So that we do not keep a stale references of the last cached pixmap
across server regeneration (or shutdown).

Reported-by: Thierry Reding <thierry.reding@avionic-design.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47357
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 21:34:01 +00:00
Chris Wilson 0a8218a535 sna: Prefer the CPU bo for uploads if last access was not through the shadow
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 13:32:35 +00:00
Chris Wilson 77c9c03b10 sna: Fixup the shadow pixmap pointer for move-to-gpu
If we choose not to use the CPU bo for the upload (because we fear the
subsequent synchronisation cost), we need to fixup the shadow pointer
before dereferencing it.

On the move-to-cpu side, the fixup is already performed as we will need
to access the shadow pixels for the subsequent drawing operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 13:32:02 +00:00
Chris Wilson 0e2fbb6a1c uxa: Merge 'remove complicated second level caching'
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47345
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 12:44:37 +00:00
Chris Wilson 84d7a82122 uxa: Simplify allocation of backing pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 12:43:12 +00:00
Chris Wilson 1b1016624a uxa/i915: Remove broken CA pass, fallback to magic 2-pass composite helper
The backend failed to handle all the corner cases, so remove the
complication.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 12:43:12 +00:00
Chris Wilson 895a56a553 uxa: Remove unused render_mask_solid members
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 12:43:12 +00:00
Chris Wilson 9c6f79440e uxa: Remove unused tracking of the current render target
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-15 12:43:12 +00:00