Commit Graph

6876 Commits

Author SHA1 Message Date
Chris Wilson e33fbd6d7f sna/blt: Refine op placement logic for handling current source location
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-28 08:55:48 +01:00
Chris Wilson 48b5ac11a0 intel: Use fcntl to try and set CLOEXEC if the open(O_CLOEXEC) fails
As suggested by Arkadiusz Miskiewicz.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 21:42:13 +01:00
Chris Wilson 9b3e5c2114 intel: #ifdef O_CLOEXEC for compilation on squeeze
If the system doesn't support O_CLOEXEC, then we simply can't use it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 21:09:38 +01:00
Chris Wilson caf43fcadb sna: Enable memcpy_from_tiled for the IO paths
Should you ever need to read back from a tiled surface and for whatever
reason do not have a CPU bo to accelerate the operation, maybe we could
use the manual tiling instead (as it is useful elsewhere).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 17:16:10 +01:00
Roy.Li b5e85e495e uxa: fix the compilation error with xorg-xserver <= 1.10
struct _Screen has no canDoBGNoneRoot when ABI_VIDEODRV_VERSION is less than 10.0

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
2013-06-27 16:40:41 +01:00
Chris Wilson 41715af4d0 configure: SNA supports the old Xorgs
So allow it to be compiled by default for older Xorgs as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 16:36:52 +01:00
Chris Wilson 7ce4876174 sna: Trim the large object threshold
Be kinder to smaller machines by lowering the threshold at which treat
an object as huge and worthy of avoiding duplication.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 16:12:54 +01:00
Chris Wilson 31467e18d2 sna: Prefer operating inplace with a very large GPU bo
As we strive to only keep one copy when working with very large objects,
so try operating inplace on a mapping for CPU operations with a large
GPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 16:12:54 +01:00
Chris Wilson b615ce97ec sna: Add a fast path for reading back from tiled X bo
This is lower latency than the double copy incurred for first moving the
bo to the CPU and then copying it back - but due to the less efficient
tiled memcpy, it has lower throughput. So x11perf -shmget500 suffers
(by about 30%) but real world applications improve by about 2x.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 15:27:48 +01:00
Chris Wilson 6493c8c65f sna: Implement memcpy_from_tiled functions (for X-tiling only atm)
To provide symmetry with the ability to write into an X-tiled mapping of
a bo, we add the memcpy_from_tiled to be able to read back from the same
bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 15:26:41 +01:00
Chris Wilson 60d716b539 sna: Add the probed CRTC mode to the list of output modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 14:11:00 +01:00
Chris Wilson 263e87d5e1 sna: Set the current mode when initialising CRTCs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 14:10:30 +01:00
Chris Wilson 2f2f439c9c sna: Fake the output physical width/height from the CRTC size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 12:58:58 +01:00
Chris Wilson 5124f35168 sna: Support operations inplace on CPU mappings of a region
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 12:50:59 +01:00
Chris Wilson 18ee5c20d5 sna: We can read from cloned pixmaps inplace - so long as we don't write
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 12:34:34 +01:00
Chris Wilson 36993618b4 sna: Tweak ordering of userptr temporary mappings for uploads
There are a few more circumstances where the temporary mapping is
beneficial, such as pixmaps that are only shadow copies or operations
that require reads on the destination.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 12:08:47 +01:00
Chris Wilson c6ad9861f0 sna: Fix DBG printing of can_upload_tiled_x()
The function changed it parameters, this DBG caller did not.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 10:59:06 +01:00
Chris Wilson 591981a36c sna: Refactor freeing gpu_bo in manual tiled upload
Use the common function so that we correctly check for pinned GPU bo,
and adjust the hints afterwards.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 10:02:28 +01:00
Chris Wilson 8f6dcc15c8 sna: Detect and handle cloned pixels for manual tiled uploads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-27 09:44:36 +01:00
Chris Wilson d7be3df2fe sna: Se the default gamma if left uninitialized by the driver
Due to a bug in i915.ko the gamma ramp is left uninitialised...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 17:01:37 +01:00
Chris Wilson 491f4fab21 sna: Correct typo s/\j/\n/
When is a newline, not a newline? When it is ajar.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 15:16:09 +01:00
Chris Wilson a40dd0ed6d sna: Explicitly initialise the probed transform for a CRTC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 14:50:43 +01:00
Chris Wilson 01ce3ef9f1 sna: Set RR_Rotate_0 instead of 0 as desired initial rotation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 14:26:22 +01:00
Chris Wilson c5651254c3 sna: Fallback to xf86InitialConfiguration if nothing is connected
Use the default mechanism for picking a fallback output and mode if
nothing is connected at X startup.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 14:19:32 +01:00
Chris Wilson 8a6a21bff8 sna: Use the existing configuration for initial modes
After checking for user overrides (preferred output modes, rotation and
placement), copy the current CRTC configuration from the kernel into the
desired modes. This should enable X to start without introducing any extra
flicker.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 13:59:47 +01:00
Chris Wilson 362b0dc6a3 sna/gen4+: Fix determination of intermediate extents
Complete logic fail for finding the bounding box of the boxes to be
copied.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66168
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 12:04:46 +01:00
Chris Wilson 2212468315 sna: Avoid allocating a temporary if using rendercpy tiles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 11:27:25 +01:00
Chris Wilson fc5b9a9619 sna: Clear mapped state after performing manual tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 10:02:41 +01:00
Chris Wilson 3f33abee37 sna: Do not force creation of CPU maps on !llc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 10:02:41 +01:00
Chris Wilson 77fa8ab08b sna: Free just-allocated bo if we fail to set-tiling on CREATE_EXACT
If the caller requires an exactly constructed bo, abandon the attempt if
we cannot set the tiling as specified.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 10:02:41 +01:00
Chris Wilson 273716029e sna: Rearrange tiled x upload so that damage accumulation is last
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 10:02:41 +01:00
Chris Wilson e033a28bcb sna: Optimize clears to white
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26 10:02:40 +01:00
Chris Wilson b77c334a26 sna: Do not perform tiling inplace if the destination is busy
Rather than waiting on the GPU stall, just use the standard mechanisms to
queue the uploads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-25 19:12:01 +01:00
Chris Wilson 4b0cdf28b8 sna: Be explicit when creating tiled-x pixmaps for manual tiling uplaods
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-25 18:36:59 +01:00
Chris Wilson 98feba417c sna: Drop master when closing the screen
As we reacquire master when initialisation the next gen of the server,
to keep the reference counting consistent we need to release our master
reference on CloseScreen.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-25 18:36:59 +01:00
Chris Wilson febfd38823 intel: Use the correct errno value for reporting the drmSetVersion failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-25 18:05:28 +01:00
Chris Wilson 2e2c448a77 sna: Don't flag IGNORE_CPU for partial overwritten blocks
As we set the flags for the migration extents, but only operate upon the
boxes in the region, we need to be careful to be sure to migrate data
outside of the boxes overwritten.

Fixes regression from
commit 94cbe7bf7b [2.21.10]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jun 20 19:40:44 2013 +0100

    sna: Mark overwriting CopyArea as not needing the dst damage

If we start passing around regions rather than extents, we coud do
finergrained migration decision.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55244
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-25 14:25:00 +01:00
Chris Wilson 27ebef515e Add the nickle utility scripts to the tarball
So that the tarball matches the git checkout.

Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 20:34:58 +01:00
Chris Wilson c88d911d42 sna: Initialise gc->ops->PolyPoint for miWideDash
The miWideDash may also call PolyPoint rather than emit spans, so make
sure that we correctly prepare sna_poly_point before calling mi*.

Reported-by: Tobias Brodel <toby.jamesjoy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66104
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 14:33:40 +01:00
Chris Wilson 72e8ab2b8f sna: Remove unused brw_eu_debug.c
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 11:50:25 +01:00
Chris Wilson 6ca4ae441c sna: Check for a request to create an inactive scanout
The combination is just about valid and used along some odd paths, so
replace the assertion with a regular checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 11:50:25 +01:00
Chris Wilson b459ab9eeb sna: Move the reset bo to the right list
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 11:50:25 +01:00
Chris Wilson 77ddadf0ec sna: Clear 'clear' hint upon uploading into tiled
Fixes regression from
commit 53c113c3cc [2.21.10]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 21 19:27:24 2013 +0100

    sna: Allow PutImage to write inplace using manual tiling

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66059
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 11:50:19 +01:00
Chris Wilson d3de043d2d sna: Discard proxy upload buffers before overwritting for PutImage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 23:53:47 +01:00
Chris Wilson d68d24dc37 sna: Discard overwritten incomplete operations before migrating
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 23:53:47 +01:00
Chris Wilson 60dbd5a5b6 sna: Document swizzling for DBG
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 22:33:42 +01:00
Chris Wilson fd375da5ca sna: Allow tiled uploads to accumulate damage
And for the upload to create the bo as required.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 22:33:42 +01:00
Chris Wilson b0e383363e sna/gen5: Elide the forced flush after a drawrect
Presume that the non-pipelined drawrect is sufficient to serialise
operations to the render cache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 10:55:21 +01:00
Chris Wilson 16fb786bd0 sna/gen5: Force a write flush when changing blend modes
Otherwise it appears that the hardware will readback from memory
bypassing its render cache after a change of modes. There is probably a
lot more subtly to it than this, but this appears to be a good first
approximation.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51422
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 09:00:17 +01:00
Chris Wilson 9eabe28a40 Tidy version query for i915.ko
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 07:33:56 +01:00