Commit Graph

6857 Commits

Author SHA1 Message Date
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
Chris Wilson 7ec0378b64 sna: Only open the /dev/dri/cardX device once
Merge the device open in the main driver with the probing so that we can
open the path explicitly passed in by the PlatformProbe and keep that fd
around for the main driver and so avoid a later search.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-23 07:33:56 +01:00
Chris Wilson 41badce186 sna: Add reference counting to drmMaster for Zaphod
With Zaphod enabled, we will try to acquire/release the drmMaster
several times on each enter/leave VT. This obviously flags an error (and
drops the master too early), so track the number of references we still
hold for drmMaster.

References: https://bugs.freedesktop.org/show_bug.cgi?id=66041
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-22 17:39:39 +01:00
Chris Wilson 81b35092c3 2.21.10 release 2013-06-22 13:44:09 +01:00
Chris Wilson 5189ba727f sna: Refine the self-cow copy hack to reduce collateral damage
Sergio Callegari found a case in LibreOffice that copied cloned pixmaps
onto each other and then modified one of the pair. This was triggering
the hack put in to speed up firefox scrolling, unfortunately.

Reported-by: Sergio Callegari <sergio.callegari@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=65665
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-22 13:42:37 +01:00
Chris Wilson 62e42de300 sna: Determine swizzling once during initialisation and choose memcpy_to_tiled_x
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21 21:00:23 +01:00
Chris Wilson 53c113c3cc sna: Allow PutImage to write inplace using manual tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21 19:45:57 +01:00
Chris Wilson 48028a7c92 sna: Inspect availablity of render before prefering to use the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21 18:58:38 +01:00
Chris Wilson 71fc83401e sna: Check if we may want to simply upload for a CopyArea
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21 18:01:21 +01:00
Chris Wilson 7e90e52219 sna: Fix inspection of transfer extents for deciding transport
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21 15:44:42 +01:00
Chris Wilson 94cbe7bf7b sna: Mark overwriting CopyArea as not needing the dst damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20 19:40:44 +01:00
Chris Wilson b3d1118bbe sna: Promote the CopyArea to the GPU if it subsumes the CPU damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20 19:34:38 +01:00
Chris Wilson 186ac909ad sna: Fix tiled scanout limits for Valleyview
It appears that Valleyview shares the same scanout limits as gen4.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-20 15:32:30 +01:00
Chris Wilson 112fc5f370 sna: Tidy a redundant conditional for CopyArea
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-19 19:53:14 +01:00
Chris Wilson ba642d9ff8 sna: Fix the pitch limits for gen3 scanout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-19 16:29:02 +01:00
Chris Wilson 06679c1433 Revert "sna: Apply scanout stride limits to tiling selection"
This reverts commit cc08f6e0ef.

Prefer to keep the frontbuffer as tiled, and use an per-crtc pixmap in
case the frontbuffer is not suitable as the framebuffer.
2013-06-19 16:16:14 +01:00
Chris Wilson f165d2e213 sna: Switch to a per-crtc pixmap if the pitch exceeds scanout limitations
References: https://bugs.freedesktop.org/show_bug.cgi?id=65099
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-19 16:15:32 +01:00
Chris Wilson cc08f6e0ef sna: Apply scanout stride limits to tiling selection
gen4 has a restricted DSPSTRIDE limit for tiled surfaces lower than the
maximum supported size of the CRTC. So we need to double check
whether tiling the scanout is supported before attempting to allocate a
tiled scanout.

Reported-by: Paul Donohue <freedesktop-bugs@PaulSD.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65099
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-19 16:00:26 +01:00
Chris Wilson f95ed64a11 sna: Assert that the scanout fits within the allocated buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-19 14:49:19 +01:00
Jonathan Gray 6132400365 configure: test for librt (clock_gettime)
clock_gettime() is in libc not librt on OpenBSD so check
to see if linking librt is required.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
2013-06-19 11:30:24 +01:00