Commit Graph

7518 Commits

Author SHA1 Message Date
Chris Wilson b692416110 sna/damage: Tidy up a tail return
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-18 11:58:43 +00:00
Chris Wilson 52612185c6 sna/damage: Guard against integer overflow before malloc
Check that the multiplication to compute the allocation will not
overflow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-15 21:20:30 +00:00
Chris Wilson 95c3892dd3 sna: Include valgrind leakchecks for --enable-debug=memory
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-15 11:55:51 +00:00
Chris Wilson 6e9a8c5ae2 sna: Add the missing braces around the conditional block
Fixes regression from
commit f3225fcb38
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 5 08:38:22 2013 +0000

    sna: Be move conservative with tiling sizes for older fenced gen

Reported-by: Jay Little <jaylittle@jaylittle.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71605
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 16:14:09 +00:00
Chris Wilson 23f47c8b4b tests: Exercise render copies under a mask
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 12:07:47 +00:00
Chris Wilson aa5a5684eb sna/gen6+: Only substitute SRC for CLEAR if using the correct source
If the source has not been verified to be clear, then using the SRC
operator will paint the wrong color.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 12:07:47 +00:00
Chris Wilson 97e684ab3c sna/gen6+: Improve debug PREFER_RENDER to cover all decision points
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 12:07:47 +00:00
Chris Wilson 7358ba83a3 tests: Add render-composite-solid-mask
Another reference test to exercise simple composite pathways clearly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 12:07:47 +00:00
Chris Wilson f08f9cb28e sna: Eliminate a compiler warning for a shadowed variable
sna_driver.c: In function 'sna_load_palette':
sna_driver.c:86:12: warning: declaration of 'index' shadows a global declaration [-Wshadow]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 10:42:07 +00:00
Chris Wilson 501dbf45cd sna: Eliminate a compiler warning for a shadowed variable
We don't strictly need that local structure, so do without and keep the
compiler quiet.

sna_driver.c: In function 'fb_supports_depth':
sna_driver.c:414:23: warning: declaration of 'close' shadows a global declaration [-Wshadow]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 10:42:07 +00:00
Chris Wilson 7468a6b740 2.99.906 snapshot 2013-11-13 09:55:20 +00:00
Chris Wilson 220a8e8b14 Bump experimental ioctl command numbers
In the meantime a new ioctl has snuck in.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-13 09:53:03 +00:00
Chris Wilson 44c585a1d8 sna: Discard cached upload proxy when writing to the pixmap via the CPU
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-12 20:18:48 +00:00
Chris Wilson 20e318c292 intel-virtual-output: Manually adjust screen size
When we modify the outputs and end up with a different screen size, we
need to actually tell the display to resize with an explicit
XRRSetScreenSize.

Reported-by: Jethro Beekman <freedesktop-bugs@jbeekman.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71441
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-12 20:18:48 +00:00
Chris Wilson 04d2cad65d Add identification strings for new Atoms
All of the new Atom (Baytrail) products ship with "HD Graphics".

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-12 14:43:56 +00:00
Chris Wilson a6bd301171 sna: Factor available memory into available aperture estimation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-12 14:43:56 +00:00
Chris Wilson 4493fb8d21 sna: Apply drawable offset to glyph bbox prior to checking for clipping
This is a correction to

commit ec0866e86d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Oct 16 22:39:54 2013 +0100

    sna/glyphs: Fix computation of extents for long strings

in order for us to correctly detect when we need to clip.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71191
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-12 08:41:49 +00:00
Chris Wilson c489934ed7 xvmc: Handle allocation failure around batch submission
If we fail to allocate a new batch, just stall and reuse the old one
rather than crashing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 15:05:56 +00:00
Chris Wilson 3e93449b54 intel-virtual-output: Fix format specifiers for Visual DBG
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 13:15:07 +00:00
Chris Wilson 31b5ff5889 intel-virtual-output: Fix cut'n'paste DBG error
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 12:56:48 +00:00
Chris Wilson 29fcc15efa sna: Assert that gc->funcs is never set to NULL
References: https://bugs.freedesktop.org/show_bug.cgi?id=71415
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 11:44:41 +00:00
Chris Wilson aa140ef1e6 sna: Add a couple more asserts to track a potential NULL gc->pCompositeClip
References: https://bugs.freedesktop.org/show_bug.cgi?id=71415
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 11:39:34 +00:00
Chris Wilson 3e81a9cbd6 intel-virtual-output: Avoid the infinite loop around XPending
XPending() reports if there are any events pending and does not perform
any dequeuing itself - ergo for a remote display while (XPending()) ;
becomes an infinite loop should there be an event pending.

References: https://bugs.freedesktop.org/show_bug.cgi?id=71345
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 10:49:10 +00:00
Rémi Cardona 922a8bab89 configure: Use proper variables set by PKG_CHECK_MODULES
$DRI_CFLAGS does not actually exist. The PKG_CHECK_MODULES call creates
a $DRI1_CFLAGS variable instead. This doesn't break often because
"recent" versions of xorg-server.pc indirectly depend on xf86driproto.pc
thus bringing in the required CFLAGS through $XORG_CFLAGS.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=490342
Signed-off-by: Rémi Cardona <remi@gentoo.org>
2013-11-10 11:35:00 +00:00
Chris Wilson 7b0771180d intel-virtual-output: Do not hide the cursor on the local/source display
Whilst we want to take over and hide the cursor on the remote displays,
on the source we need to not interfere with the host.

Reported-by: Jethro Beekman <freedesktop-bugs@jbeekman.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71439
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-10 10:35:27 +00:00
Chris Wilson b3b02a879b sna: Assert that we do setup the gc->pCompositeClip upon ValidateGC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-10 10:35:27 +00:00
Chris Wilson 3ec663bf1c Merge branch 'master' of hsw:/usr/src/xf86-video-intel 2013-11-09 11:06:12 +00:00
Chris Wilson abf1a16914 intel-virtual-output: Only track the most recent visibility status of the cursor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 17:10:09 +00:00
Chris Wilson b46d0d3271 intel-virtual-output: Fix forced synchronisation of clones
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 14:04:32 +00:00
Chris Wilson fa40286e2f intel-virtual-output: Tighten bad_visual() checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 13:53:48 +00:00
Chris Wilson 83c33a1f43 intel-virtual-output: Disable event tracking after a failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 13:00:11 +00:00
Chris Wilson 8b10c52804 intel-virtual-output: Add DBG for the latest XSync
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:58:06 +00:00
Chris Wilson 969b064f74 intel-virtual-output: Perform an explicit sync
If we fail to track rendering using ShmCompletionEvents and begin to
drop frames, insert an explicit XSync.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:56:06 +00:00
Chris Wilson e0075ccee2 intel-virtual-output: Check for pending events before skipping draw
Make sure we check if the destination display has caught up before
skipping a frame.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:46:58 +00:00
Chris Wilson ea4f99c333 intel-virtual-output: Add some DBG for bad_visual()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:30:21 +00:00
Chris Wilson 84d667b94a sna: Always schedule upload buffers for retirement after use
Even if they are multiply referenced due to cached references.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 09:56:18 +00:00
Chris Wilson d9ecb91ef1 sna: Skip an unmappable linear bo when searching through a cache for a GTT mapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-07 14:58:08 +00:00
Chris Wilson cb579a4444 sna: Only assert that the bo is small enough to be mmapped
Not that is currently in a position to be mapped without eviction.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-07 14:54:39 +00:00
Chris Wilson 68cef6cd28 sna/gen7: Request secure batches for Haswell vsync
Since commit 8ff8eb2b38
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Sep 9 16:23:04 2013 +0100

    sna/hsw: Scanline waits require both DERRMR and forcewake

we have been emitting LRI to enable vsync on the render ring. This
requires a privileged batch buffer, and whilst we were checking for
kernel support, we forgot to actually tell the kernel to submit the
batch with the right privileges.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71328
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-07 13:10:16 +00:00
Chris Wilson b796c33411 sna: Always copy from the tile source
The first step when tiling with an intermediatory is to copy from the
source bo to the temporary. The alu should only be applied when copying
from the temporary to the destination.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 16:24:28 +00:00
Chris Wilson ace764501e sna: Remove erroneous assertion from sna_tiling_blt_composite
We have to rely on the caller only calling us for a PictOpSrc equivalent
operation as they don't all set op->op.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 15:44:33 +00:00
Chris Wilson 7a9c1e153a sna: Add a DBG breadcrumb to kgem_bo_convert_to_gpu()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 15:04:24 +00:00
Chris Wilson ae380a960d sna: Use tiling BLT fallback for BLT composite operations
This avoid a circuituous route through the render pathways and multiple
levels of tiling fallbacks to accomplish the same copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 14:51:42 +00:00
Chris Wilson 7578809ddc sna: Trim create flags if tiled sizes are too large
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 13:42:27 +00:00
Chris Wilson 073465817f sna: Fences are power-of-two sizes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 13:42:24 +00:00
Chris Wilson a6b008d692 sna: Fixup unwind checks for future BLT commands
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 11:38:53 +00:00
Chris Wilson 22b6a331d0 sna: Clear the execlist if we completely unwind a batch after using 8x8 tiling
Another location, but the right function this time!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 11:26:01 +00:00
Chris Wilson c3d5b1d8fc sna: Move initialisation of loop counter to common code
It was only being defined in x86-64 and left unitialized for x86-32.

Fixes regression from
commit 587c486665
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Nov 4 15:10:40 2013 +0000

    sna: Promote uint16_t to a full int to avoid overflow in computing w*h in memcpy_xor

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71286
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 09:40:56 +00:00
Chris Wilson 1a31335954 sna: Clear the execlist if we completely unwind a batch after using 8x8 tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 09:05:05 +00:00
Chris Wilson ef842d2cee sna: Be more pessimistic for tiling sizes on older gen
On the older generation, we have severe alignment penalties for fenced
regions which dramatically reduce the amount of space we can effectively
use in a batch. To accommodate this, reduce the tiling step size.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06 09:01:17 +00:00