Commit Graph

5994 Commits

Author SHA1 Message Date
Chris Wilson b41ecda69f sna: Only reduce the maximum batch size for old kernels
Be careful we not increase the batch size to span multiple pages on 865g!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 22:39:36 +01:00
Chris Wilson 3ca7f8be5b sna/gen2: Count the number of dwords required for the invariant
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 22:39:10 +01:00
Chris Wilson 4d2dba0ba7 Use path for intel-gen4asm derived from pkg-config
As we use pkg-config to determine whether to use intel-gen4asm, we
should also use it to locate the right version of intel-gen4asm to use.
This allows the user to install the assembler in a non-standard path for
cross-builds and similar.

Reported-by: Josh Tripplet <josh@freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55646
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 10:49:07 +01:00
Chris Wilson 249051d90f sna/gen2: And the other compile failure
Typing on Sunday before coffee is a very bad idea.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 09:33:06 +01:00
Chris Wilson d11a15f04d sna/gen2: Compile fix
Be careful when cutting and pasting assertions!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 09:30:38 +01:00
Chris Wilson d2a26adc8e sna/gen2: Add a couple of assertions to track down a batch overflow
References: https://bugs.freedesktop.org/show_bug.cgi?id=55700
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 08:59:32 +01:00
Chris Wilson 3680aa4976 sna: Do not create an unsnooped CPU mapping for readbacks
Otherwise we notice that we have a CPU mmap during read synchronized and
presume that we need not take any further action. However...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-05 12:43:55 +01:00
Chris Wilson d717a67ff4 configure: Make rebuilding of the gen4 assembly files explicit
References: https://bugs.freedesktop.org/show_bug.cgi?id=55646
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-05 10:28:21 +01:00
Josh Triplett 5b74a2dc52 Fix out-of-tree builds with intel-gen4asm installed
The make rules to compile shaders with intel-gen4asm referenced the .g4a
source files without using $(srcdir), which broke out-of-tree builds.
Reference .g4a source files via $(srcdir), and add $(srcdir) to m4's
include path, fixing out-of-tree builds.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55645
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2012-10-05 10:28:05 +01:00
Chris Wilson 07a4633347 sna: Refactor the fallback CopyArea to use the common region computation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-05 10:17:45 +01:00
Chris Wilson 3ad3a2d839 sna/gen2: Tidy DBG code for disabling composite operations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 15:14:08 +01:00
Chris Wilson 6054f8e112 sna: Remove another sna_pixmap->cpu assertion that was not true
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 14:40:59 +01:00
Chris Wilson acf354d7fb sna: Propagate failures from compositing glyph masks
So that we can fallback correctly. This is primarily using for debugging
failure paths...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 14:35:14 +01:00
Chris Wilson c7ad655359 sna/gen2: Prevent using the GTT maps with I915_TILING_Y on 855gm
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 13:52:55 +01:00
Chris Wilson 0a2c5eb766 sna: Once again look into assertions around sna_pixmap->cpu
Revert back to basics, and clear the CPU flag everytime we use the GPU,
rather than try to avoid clearing it along some paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 13:51:23 +01:00
Chris Wilson 4d3b849c57 sna: Avoid using the gpu for uploads whilst wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 12:16:33 +01:00
Chris Wilson 4608e48261 sna/gen2: Allow fine damage tracking for render operations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04 11:23:36 +01:00
Chris Wilson 83b8669abc sna/gen2: Setup invariant blend arguments
I thought these were completely specified via the LOAD_STATE_IMMEDIATE
commands we used whilst seting up the render pipeline. I was wrong.

Reported-by: Timo Kamph <timo@kamph.org>
References: https://bugs.freedesktop.org/show_bug.cgi?id=55455
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 23:45:28 +01:00
Chris Wilson b71af5dc62 sna: Clear sna_pixmap->cpu when destroying the CPU damage
So that we keep the assertion checks that without CPU damage we can not
be on the cpu.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55591
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 22:53:57 +01:00
Chris Wilson 0d42872d1e sna: Protect against undefined O_CLOEXEC
Reported-by: Giovanni Mariani <mc2374@mclink.it>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 14:42:19 +01:00
Chris Wilson a683643ebf sna: Fix an instance of undamaged tracking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 14:13:13 +01:00
Chris Wilson 47c76bb968 sna/gen7: Tidy detection of unbounded render op
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 14:12:50 +01:00
Chris Wilson 3e770f09db sna/dri: Delay the deactivation of the pageflipping
As we need to clflush the scanout buffer as we return it to the bo cache
on SNB+, it is costly to terminate the pageflipping as soon as we drop a
frame as mesa often fails to keep up to the vrefresh rate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 13:02:04 +01:00
Chris Wilson b3a502a705 sna: Review sna_pixmap->cpu tracking
Notably 52b211cb15 was triggering a few assertions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 11:46:57 +01:00
Chris Wilson bf44d9965b sna: Prevent sna_damage_contains_box__no_reduce() from a NULL deref
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 12:22:51 +01:00
Chris Wilson 0ae6c2ccb0 sna: Actually upload the damage when replacing a busy CPU bo for PutImage
Reported-by: Roman Jarosz <kedgedev@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55508
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 11:44:16 +01:00
Chris Wilson 52b211cb15 sna: Tweak CPU damage partial upload paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 11:35:25 +01:00
Chris Wilson 1fc3fa699c sna: Avoid accumulating damage to the CPU if it is already damaged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 11:35:24 +01:00
Chris Wilson 8c2821d77c sna: Remember to call ValidatePicture() before using newly created Pictures
Reported-by: Marco De Michele <marco.demichele@taolab.it>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55527
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 11:32:47 +01:00
Chris Wilson 5120279886 uxa: Remove USE_GLAMOR check from unrealize glyph caches
In an interesting twist during teardown, the driver info structure is
freed long before the caches. However, the glyph cache teardown was
checking to see if glamor was enabled to see if it could skip the
teardown. In fact, since we won't have created the glyph caches in that
circumstances it was safe any way.

Reported-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-01 13:06:42 +01:00
Chris Wilson ba1dea5e37 sna/gen2: Clear STIPPLE setup before rendering with the 3D pipeline
One over-zealous removal too many.

Reported-by: Timo Kamph <timo@kamph.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55455
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-01 11:19:41 +01:00
Chris Wilson eec12faf82 sna/dri: Check back/front buffers of a pixmap for format change
Highly unlikely.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30 18:39:36 +01:00
Chris Wilson 8e23251aad sna: Cache repeated use of the temporary CPU mapping for tiled_x uploads
Fixes ShmPutImage regression under gnome-shell

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30 13:52:34 +01:00
Chris Wilson 1756cf4d8e sna/dri: Only chain to a triple buffer pageflip sequence
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30 12:26:23 +01:00
Chris Wilson ba525463fb sna/dri: Improve handling of async/sync pageflip transition
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30 10:44:05 +01:00
Chris Wilson 2eab5ef751 sna: Make sure the CPU bo is destroyed if we fail to mmap it during alloc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30 09:04:25 +01:00
Chris Wilson 45b351412b sna: set_cacheing returns a bool not an error-code
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30 09:04:25 +01:00
Chris Wilson 33f6f75378 sna/dri: Swallow error from GetMSC
Just ignore the error return from WaitVBlank and make up a value for
last MSC/SBC similar to an unattached Drawable.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55395
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-29 16:42:28 +01:00
Chris Wilson a873f6d354 sna: Release the front buffer and drop DRM master early during shutdown
If we delay the dropping of DRM master we may complete a VT switch
before we are ready and so prevent a second X server from reacquiring
master, and dying.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55446
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-29 16:42:28 +01:00
Chris Wilson a192f8cbc2 2.20.9 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-29 10:51:59 +01:00
Chris Wilson 16860d448f uxa: Only destroy the bufmgr if it exists
Be wary in case the Screen is destroy before we initialise bufmgr.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-29 10:40:51 +01:00
Chris Wilson 13f7a9e267 sna: Restore LLC cache level after using a buffer for scanout (uncached)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-28 09:25:12 +01:00
Chris Wilson 8bfd31e9bb sna/dri: Improve handling of flipping with no outputs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 21:15:16 +01:00
Chris Wilson dddb6e4e63 sna: Attempt to restore the current mode if pipe is disabled on DPMS on
If we attempt to power up the pipe through a DPMS request, but it was
previously disabled due to an error, first try re-enabling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 20:02:13 +01:00
Chris Wilson 88cfd23379 uxa: Update mode->fb_id after completing pageflips
As intel_crtc_on() depends upon the current value for determining if the
pipe is active, we can only change the value afterwards.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 16:16:39 +01:00
Chris Wilson 83990c649c Remove the last couple of references to mibstore
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 14:58:57 +01:00
Chris Wilson cb0b72c4fb uxa: Fixup the last couple of commits after realising I didn't have uxa enabled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 14:53:46 +01:00
Chris Wilson feef53005b uxa: Do not attempt to pageflip whilst not master
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 14:40:58 +01:00
Chris Wilson 5a45cbacb7 uxa: Confirm the pipe is alive before flipping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 13:31:27 +01:00
Chris Wilson edc5b7f741 uxa/dri: Confirm Drawable is still attached to an active pipe before flipping
If we schedule a flip to happen on a far distant vblank, it is possible
for us to disable the pipes with a modeset, whilst maintaining the fb
size, or with a DPMS command. If the pipe is disabled and we still try
to flip, then we trigger an EINVAL error from the kernel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-27 13:27:20 +01:00