Commit Graph

5755 Commits

Author SHA1 Message Date
Chris Wilson c80db9bc2e sna: Flush the batch before preparing for a FlushCallback
As we end up submitting and maybe synchronising upon a batch within
FlushCallback (or our client will) it is important that we start that
serialized batch as early as possible to minimise the impending stalls.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 10:45:36 +01:00
Chris Wilson c39fe02538 sna: Do not use the GPU to migrate to the CPU whilst wedged!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 20:56:13 +01:00
Chris Wilson fe05268d70 sna: Experiment with flushing the batch prior to rendering to a ShmPixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 20:56:13 +01:00
Chris Wilson bbd7a82581 sna: Don't promote a ShmPixmap to GPU for a CopyArea
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 20:56:13 +01:00
Chris Wilson 7bf7a5ad10 sna/gen3: Tidy vbo discard
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 20:56:13 +01:00
Chris Wilson d1b808fd72 sna: Tweak is_cpu/is_gpu heuristics
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 18:08:20 +01:00
Chris Wilson c682c1a376 sna: Discard GPU (and damage) after applying clear on migration to CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 17:28:25 +01:00
Chris Wilson dc83ef49f9 sna/trapezoids: Accept more operators for maybe-inplace
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 17:20:45 +01:00
Chris Wilson 47d948f5df sna: Update maybe_inplace to recognise more types of handled pixel formats
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 17:10:34 +01:00
Chris Wilson 02963f489b sna: Only submit the batch if flushing a DRI client bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 16:34:13 +01:00
Chris Wilson 13d1a10515 sna: compare the correct trailing dword when skipping identical bitmap lines
Fixes regression in 2.20.4 from

commit 85192f00e3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Aug 8 12:11:50 2012 +0100

    sna: Ignore trailing bits when comparing lines inside the bitmap

Reported-by: Edward Sheldrake <ejsheldrake@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53699
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 10:17:21 +01:00
Chris Wilson a13781d19d sna: Enable BLT composite functions to target CPU buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19 10:17:21 +01:00
Chris Wilson be940856c7 sna: Consider sample wraparound in each direction independently
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 21:23:03 +01:00
Chris Wilson 110c7ef7f6 sna/damage: Replace the damage with a larger box if subsumed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 17:42:51 +01:00
Chris Wilson 75a2fab766 sna: Avoid forcing an upload for an unblittable bo unless on a fallback path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 17:35:41 +01:00
Chris Wilson 110d5519f3 sna: Reduce subtracted damage earlier
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 17:35:15 +01:00
Chris Wilson 8812e8b6e8 sna: Reduce damage after a large composite operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 17:35:15 +01:00
Chris Wilson e361627b90 sna/damage: Add some more sanity checks for creating empty regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 17:35:15 +01:00
Chris Wilson 10f334872e sna: Add damage for the whole unaligned trapezoid not per component
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 15:49:02 +01:00
Chris Wilson 5ff6198c93 2.20.4 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 11:59:56 +01:00
Chris Wilson bc77a46653 sna: Silence a couple of recent compiler warnings
sna_accel.c: In function 'sna_poly_fill_rect_extents':
sna_accel.c:11438:11: warning: unused variable 'v' [-Wunused-variable]

sna_blt.c: In function 'sna_blt_composite__convert':
sna_blt.c:1712:3: warning: format '%s' expects a matching 'char *' argument [-Wformat]
sna_blt.c:1738:3: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'CARD32' [-Wformat]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18 11:09:23 +01:00
Chris Wilson d1da2c7146 sna: Correct assertion for StoreColors
Fixing the assertion reveals that it was bogus!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 21:15:54 +01:00
Chris Wilson 31ddaa0cfb sna: Fixup DBG after 7f5a9e3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 21:13:52 +01:00
Chris Wilson b8bc56c12c uxa/gen3: Simply simple fill shader generation
Suggested-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 21:00:57 +01:00
Chris Wilson 182581edde uxa/glamor: Check for failed prepares
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:59:09 +01:00
Chris Wilson c289b607d1 uxa: Check for failed mmapping of the scanout
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:54:53 +01:00
Chris Wilson 32ec8b979b test/dri2: Discard error returns from _XReply
This is only test code, so keep the static analyser quiet

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:53:08 +01:00
Chris Wilson 5675c36e0d sna: Check for failure to pin the front buffer
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:44:32 +01:00
Chris Wilson c9db2c74ab sna/gen2: Add break rather than fallthrough
The fall-through in this instance is irrelevant, and the static
analysers complain for not commenting on the fall-through. Silence the
analyser by removing the fall-through.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:42:50 +01:00
Chris Wilson e0abbc3cca i810: Query PortPriv for the surface properties
Avoid the NULL deferences.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:40:17 +01:00
Chris Wilson c09518f98d sna: Fix assignment inside assertion (should be an equality check)
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:32:53 +01:00
Chris Wilson 7d3e4328d4 sna/glyphs: Fix potential leak of glyph extents (for many lists of many formats)
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:32:11 +01:00
Chris Wilson 9b00c82df7 sna: Remember alpha-fixup for BLT upload
Still dubious whether this is truly beneficial...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 20:30:52 +01:00
Chris Wilson 94871944a0 sna: Avoid conflating tearfree and randr shadow modes
For ordinary TearFree we do not want to adjust the crtc offsets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16 00:12:14 +01:00
Chris Wilson 1a38984234 sna: Avoid queuing a pageflip on a DPMS off pipe
If the pipe is not running, attempting to queue a pageflip will result
in an error and us disabling the output in retaliation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-15 23:07:16 +01:00
Chris Wilson 615739556d sna: Only continue to update the shadow buffer if the flips succeeded
If the flip fail, we disable the crtc and may end up disabling the
output, removing the shadow (and old scanout bo) in the process.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-15 20:10:52 +01:00
Chris Wilson 2554d0d76e sna: Submit the batch upon destroying a ShmPixmap
The midlayer has already detached the pixmap from the segment (possibly
destroying that segment in the process, thanks midlayer!) so we need to
submit the batch asap before the segment disappears.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-15 18:04:18 +01:00
Chris Wilson 4e604d721b sna: Flush shm pixmaps after upload
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-15 16:53:20 +01:00
Chris Wilson 7f5a9e30c9 sna: Remove zero-size rectangles fro PolyFillRectangle
Some applications like to waste precious bw by attempting to fill
zero-sized rectangles; remove them upfront rather than process them.

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-08-15 09:46:54 +01:00
Chris Wilson 0c882f4fa9 sna/gen2,3: Prevent dereferencing a NULL bo with solid render fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-14 16:02:38 +01:00
Chris Wilson 48f436d370 sna: Defer the release of a busy SHM pixmap until the next flush callback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-14 15:06:27 +01:00
Chris Wilson 9f07d1fc01 sna: Enable use of shm pixmap for readback
A little too overzealous in the degradation of writing to the CPU bo
if we need to read from a GPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-14 12:03:24 +01:00
Chris Wilson 9b016d2e46 sna: do not bother attaching to a miniscule ShmPixmap
If the pixmap is less than a page in size we are unlikely to recover the
cost of tracking it via the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12 22:06:48 +01:00
Chris Wilson 2f4de90709 uxa: Only emit a warning if we fail to tile the frontbuffer and the hw allows
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12 13:02:27 +01:00
Chris Wilson 4d3cafc99a sna: Fix compilation without pixman glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12 13:02:43 +01:00
Chris Wilson dc18eaa585 sna: Make the failure to create render caches non-fatal
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12 12:05:43 +01:00
Dave Airlie b580abdfa6 intel: fix video xvPipe range check
Pointed out by Russell King on irc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-12 20:52:12 +10:00
Chris Wilson 44f848f9b2 sna: Fix typo in computation of texel offsets for tiled 8x8 blts
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53353
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-11 19:44:15 +01:00
Chris Wilson b335d369bb sna: Discard the GPU bo after syncing to CPU bo for writing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-11 13:59:31 +01:00
Chris Wilson 029934662e sna: Add a little DBG for promotion of CPU source bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-11 11:12:33 +01:00