Commit Graph

5775 Commits

Author SHA1 Message Date
Chris Wilson 4ee2e227dd sna: Mark all levels of a proxy as dirty
So that if we write to a surface through one view, we make sure that the
sample cache is invalidated for all future views.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-21 00:39:46 +01:00
Chris Wilson eee181e9d7 sna/gen6+: Only mark the dst as dirty again if it already is in the batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-21 00:19:10 +01:00
Chris Wilson c86df17c14 sna/gen3: Fix assertion to check the freshly allocated vertex bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 23:18:10 +01:00
Chris Wilson 6aabe90587 sna: Allow target bo promotion to GPU even on old architectures
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 23:18:10 +01:00
Chris Wilson 1a4b6fea7b sna: Assign a unique id to snoopable CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 23:18:10 +01:00
Chris Wilson 892b1a1e43 sna/gen3: Convert to sna_drawable_use_bo()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 23:18:10 +01:00
Chris Wilson 3ca1bfb51b sna: Trim a parameter from kgem_bo_mark_dirty() and add some assertions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 23:18:10 +01:00
Chris Wilson 16f3d3a9ae sna: Keep a stash of the most recently allocated requests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 19:42:22 +01:00
Chris Wilson fb349ced91 sna: A few more buffer cache management assertions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 17:35:44 +01:00
Chris Wilson ae6b3c7508 Check that the module that indeed i915 before using custom ioctls
Thanks to Adam Jackson for pointing me towards drmGetVersion() and
Julien Cristau for saying "Yuck!"

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 17:05:14 +01:00
Chris Wilson 3c611087e8 Only open the matching BusID and not the first named
If you pass a name to drmOpen() it will attempt to open any device
corresponding to that name if it first fails to open the device
corresponding to the BusID. Obviously we want the failure from opening
the specified device in order to prevent wrongly opening the first found
device multiple times.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 16:09:25 +01:00
Chris Wilson dd6c67b32f sna: Add a couple of buffer cache management assertions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 16:06:13 +01:00
Chris Wilson 01ebdb4d7a sna: Remove confusing is_cpu()
The only real user now has its own heuristics, so convert the remaining
users over to !is_gpu().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 16:06:13 +01:00
Chris Wilson 410316d202 sna: Refine decision making for maybe-inplace trapezoids
In particular, we want to avoid preferentially taking the CPU paths
when it may force any migration (including clear).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 16:06:13 +01:00
Chris Wilson 91f1bf971f sna: Correct ordering of calls to memcpy for BLT cpu composite paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 16:06:13 +01:00
Chris Wilson 027569bf83 Missing includes for b5b76ad849
The warnings of implicit function declarations were lost amongst the
noise.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 12:56:30 +01:00
Chris Wilson f1b259f627 sna: Add a modicum of DBG for PolyFillRect
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 12:51:51 +01:00
Chris Wilson b5b76ad849 Sanity check that the driver is an i915.ko GEM device before claiming it
This fixes an issue with us claiming Poulsbo and friends even though we
do not speak their language.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 12:17:58 +01:00
Chris Wilson 74f998136b sna: Avoid migrating the BLT composite src to the GPU if the dst is not
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 11:09:29 +01:00
Chris Wilson a05643eb67 sna: Remove unneeded source bo unref after __sna_render_pixmap_bo()
As __sna_render_pixmap_bo() deliberately does not reference its returned
bo, we need to avoid unreferencing it else we cause explosions later.

Fixes regression from commit a13781d19d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Aug 19 09:45:12 2012 +0100

    sna: Enable BLT composite functions to target CPU buffers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20 10:46:14 +01:00
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