Commit Graph

3774 Commits

Author SHA1 Message Date
Chris Wilson ccf6547a8f sna: Paranoid debug flush after every op (as well as before)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-24 23:16:57 +01:00
Chris Wilson 0233760034 sna/gen5: Debug option to disable state caching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-24 23:16:43 +01:00
Chris Wilson af4d3853ae sna/glyphs: Convert all sub-8bpp masks to a8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-24 19:47:41 +01:00
Chris Wilson c79e90da71 sna: Add a debug option to disable caching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-24 19:47:41 +01:00
Kenneth Graunke 6bbb88af09 Fix incorrect maximum PS thread count on IvyBridge
I mistakenly set GEN7_PS_MAX_THREAD_SHIFT to 23; it's actually 24 on
Ivybridge.  Not only did this halve our thread count, it caused us to
write 1 into a bit 23, which is marked as MBZ (must be zero).
Furthermore, it made us write an even number into this field, which is
apparently not allowed.  Apparently we were just lucky it worked.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-24 09:28:45 +01:00
Chris Wilson 7f7f95abbf sna/accel: Use the PolyFillRect to handle tiled spans
Would be preferrable to duplicate the tiling logic. Leave the task of
reimplementing XAA to another day!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 11:49:43 +01:00
Chris Wilson 964c96b181 sna/accel: Always subtract the enlarged region from the outstanding GPU damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 11:49:43 +01:00
Chris Wilson c68856f346 sna/accel: Only skip undamaging the GPU for reads
Introduced with ac1b83240e (sna/accel: Simplify single pixel read-back)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 11:49:43 +01:00
Chris Wilson 5913c90967 sna/accel: fix assert to include the offset of copy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-22 17:13:15 +01:00
Chris Wilson 3185706802 sna: move an assert
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-22 17:13:15 +01:00
Chris Wilson 61764af13a sna/dri: Bump DRI2INFOREC_VERSION
An intervening dri2 patch landed in the sever.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-22 13:00:02 +01:00
Chris Wilson 12070b8eb1 sna/dri: Play with marking bo reusable
Since we have no recycling of wc pages in the kernel, we try hard to
recycle buffers in userspace to avoid GTT thrashing. This requires
co-operation between DRI clients and X, which is sadly lacking and so we
need to discard any buffer given out to a client after it is finished.
We cheat slightly for page-flips and access to the scanout.

A further compromise.

References: https://bugs.freedesktop.org/show_bug.cgi?id=38732
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-22 12:28:57 +01:00
Chris Wilson 902a023419 sna: Use pot buckets for active cache
On x11perf one of the major hotspots is the search through the active
list for an object large enough to reuse as the target surface. We can
eliminate that overhead by keeping those active objects in pre-sorted
lists by size.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-19 20:34:15 +01:00
Chris Wilson 7bb2c5c4d5 sna: Move an assertion to the point of import
All the guesswork is so that when we require an inactive bo, we do
actually get a buffer that is not currently on a GPU active list. For
some unresolved reason, this assertion was firing when putting the
buffer onto the inactive list - so just workaround the worrisome issue
by delaying the check until use.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-19 19:12:46 +01:00
Chris Wilson 686a5ec52c sna/trapezoids: Fix overflow during sorting of mono edge step
We were tracking the 32bit value of the prev_x using only a 16bit
variable, and so failing to sort the edges after advancing to the next
scanline.

Fixes cairo a1-clip-fill-rule.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-19 18:14:55 +01:00
Chris Wilson 0390105bc2 sna: compile fixes for debugging
Update the DBG messages to reflect changes in function parameters.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-19 12:49:27 +01:00
Paulo Zanoni 7f0cba3a25 Remove useless assertion
Removes 17 instances of:
warning: comparison of unsigned expression >= 0 is always true

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 09:47:55 +01:00
Paulo Zanoni 2d9effca14 Fix "always false" conditionals
Enums are unsigned by default in gcc and we can't rely on any specific
signedess for the other compilers.

i965_render.c: In function ‘i965_prepare_composite’:
i965_render.c:2018:2: warning: comparison of unsigned expression < 0 is always false
i965_render.c:2025:2: warning: comparison of unsigned expression < 0 is always false
i965_render.c:2050:3: warning: comparison of unsigned expression < 0 is always false
i965_render.c:2057:3: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
[ickle: take advantage and rename the enum values]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 09:47:31 +01:00
Chris Wilson 7bcd1d2b75 sna: perform a warnings reduction pass
Didn't spot anything that might have led to a genuine bug, but this
should help improve the signal-to-noise ratio of warnings in the future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-17 22:33:28 +01:00
Chris Wilson a5b5b4ebb1 sna: Apply the screen offset for direct upload of a composited pixmap
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38733
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-17 00:28:57 +01:00
Chris Wilson daeb9291e2 sna/trapezoids: Ensure we do not overrun the vertical edges for mono
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-17 00:27:55 +01:00
Chris Wilson 481df2618a sna: Add debug option to force allocaiton of gpu-only pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-17 00:27:32 +01:00
Chris Wilson 52f93c9546 sna/glyphs: Disable the glyph cache for debugging
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 23:24:16 +01:00
Chris Wilson c8a144d6f8 sna/glyphs: Correct offset of fallback-via-mask glyphs
Under a compositing manager where we have fun values for both
drawable->x/y and pixmap->screen.x/y, we were not drawing either the
glyphs into the mask correctly and then failed to composite the mask in
the right position on top of the pixmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 23:06:43 +01:00
Chris Wilson 1eea2c4e60 sna: Can't free bo from the active list
As the active bo is still referenced in the request list, we can not
simply free it but need to wait for it to be purged on expiration.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 23:00:55 +01:00
Chris Wilson d743c456db sna: Debug option to disable tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 20:34:33 +01:00
Chris Wilson 8c35df4493 sna: Remove bad assert
The caller intentionally violates this assert, so it is useless.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 20:33:57 +01:00
Chris Wilson 72ca1fdf2f configure: Introduce --with-builderstring
Julien Cristau disliked my broadcasting of the git tree used to build
his distribution package as it bore little relevance to his users. As it
is only useful for people installing their own drivers (as a means of
sanity checking that they are running the right driver), we introduce
the --with-builderstring idiom borrowed from the xserver. This allows
the builder to override the use of `git describe` and either leave it
blank or to fill it with something useful for their own purposes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 18:00:07 +01:00
Chris Wilson 544a4167c1 sna/trapezoids: Amalgamate adjacent mono spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 18:38:57 +01:00
Chris Wilson 3565c48c4b sna: Yet another s/x/y/ typo
Every time I do a transformation into pixmap space I like to include one
of these copy'n'paste errors.

Reported-by: Paul Neumann <paul104x@yahoo.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40850
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 17:45:41 +01:00
Chris Wilson 4d4aca21fd sna: assert that the memcpy upload path points to valid regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 17:44:38 +01:00
Chris Wilson 8396105178 sna/gen3: Reset the shader after playing video
Another piece of state we zap without marking as dirty when playing
video.

Reported-by: Paul Neumann <paul104x@yahoo.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40842
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 18:37:01 +01:00
Chris Wilson 34c03f2215 sna: Clear the list of buffers upon server regen
Or else we may try to clear the new framebuffer with an invalid batch,
because it will reuse the same bo as last time and that bo may still
think it is part of the old batch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 17:24:14 +01:00
Chris Wilson 831cdb8371 sna/debug: Assert that BLT commands on gen2/3 are properly fenced
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 17:09:38 +01:00
Chris Wilson a9242a77f0 sna: Add a couple of debug statements for why we may not flush the scanout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 16:20:40 +01:00
Chris Wilson 0056bfd11e video: Stop advertising unsupported Xv attributes
We have yet to implement a yuv-shader that applies
contrast/brightness/saturation and so should not advertise such
features, potentially allowing the client to fallback and perform the
adjustments itself.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 14:44:48 +01:00
Chris Wilson 84a7c11a81 sna/video: Stop advertising unsupported Xv attributes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 14:42:33 +01:00
Chris Wilson a0d533ea8d sna/trapezoids: Implement a mono-rasteriser to skip opacity spans
For mono-rasteriser we can simply emit the composite spans without
requiring an opacity shader.

For single trapezoids, it will be more interesting to emit triangles
directly. However, we still need to compute the union of many
trapezoids, and this builds upon existing code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 13:21:33 +01:00
Chris Wilson 343b99d2a8 sna: Reuse the smallest bo that fits the request
When scanning the active list, pick the smallest that we can reuse.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 12:20:17 +01:00
Chris Wilson 90071454d2 sna: Don't clear the kernel-needs-flush flag if we emit a MI_FLUSH
We need to mirror the kernel active lists in order to predict when it
will stall upon an access to a bo, and so we cannot clear the
needs_flush for our own MI_FLUSH.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 11:37:17 +01:00
Chris Wilson 2deafe2d95 sna/accel: Use correct enum for requesting a write-buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 11:34:43 +01:00
Chris Wilson 544b1a678d sna/gen5: Fix debug compilation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 11:34:25 +01:00
Chris Wilson 6b1ed58d63 sna/gen5: Avoid bitfields for simple assignments 2011-09-12 19:25:08 +01:00
Chris Wilson 03a7fc16f9 sna: Avoid the call overhead for the trivial clip case
Profile guided micro-optimisation. /o\

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 12:20:24 +01:00
Chris Wilson 2540c877d4 sna/gen6: Prefer RENDER for copies as it compacts better
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 11:54:46 +01:00
Chris Wilson f2a617dcc5 sna: Use single precision for computing the texcoord scale factor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 11:54:02 +01:00
Chris Wilson c2e19987c3 sna: Provide a direct lookup cache of alpha values
To reflect recent changes in cairo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 10:56:29 +01:00
Chris Wilson 04c5a3df02 sna: Fix compilation without timerfd()
Based on the patch by Konstantin Belousov.

Reported-by: Konstantin Belousov <konstantin.belousov@zoral.com.ua>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 09:20:58 +01:00
Chris Wilson ae887c9d1c sna/trapezoids: Prevent a memleak if feed lots of degenerate boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-11 13:59:08 +01:00
Chris Wilson 72fafdfd37 gitignore: add git_version.h
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 23:15:58 +01:00