summaryrefslogtreecommitdiff
path: root/src/sna
AgeCommit message (Collapse)Author
2013-07-12sna/gen5: Add some more DBGChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-11sna: Replace parsing of /proc/cpuinfo with parsing of cpuidChris Wilson
Courtesy of a patch from Chad Versace via Ben Widawsky, actually digging through CPUID for the cache info looks quite easy in comparison to the fragile approach of parsing a linux specific file that may or may not be available. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-11sna: Remove the duplicated open-coding of SetScreenPixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-11sna: Remove the temporary region allocation from sna_do_copyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-10sna: Remove incorrect asserts for checking CPU mappings (after remapping)Chris Wilson
These assertions were checking that the previous state prior to performing the new mapping was consistent. Given that the checks were occurring after the update in mapping, the asserts were bogus. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-10sna: Ofast was introduced with gcc-4.6Chris Wilson
Thomas Jones reported that the build was failing with gcc-4.5 due to the memcpy routines requesting an unsupported optimisation mode (-Ofast) and supplied this patch to only enable Ofast for gcc-4.6+ Reported-by: Thomas Jones <thomas.jones@utoronto.ca> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-09sna: Only flush after the BLT operation if we have more than 2 distinct boChris Wilson
In order to preserve the optimisation of discarding incomplete batches, we don't always want to immediately submit the batch after inserting the first command. As we currently only cancel a batch if it only touches the bo being discarded, we can skip the immediate flush if it only accesses one bo and maybe be able to use the undo optimisation later. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-09sna: Free the source reference after performing a BLT compositeChris Wilson
Fixes regression from commit 8751c0f5ad202850bdd56dbb4eedb211c023cf23 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Jul 5 17:55:10 2013 +0100 sna: Flush blt copies if no operations pending Reported-by: Andreas Reis <andreas.reis@gmail.com> Reported-by: Mike Lothian <mike@fireburn.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66742 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-07sna: Experiment with a new ioctl to create buffers from stolen memoryChris Wilson
If there is stolen memory reserved by the BIOS, we want to utilize it in preference to regular system memory. However, given the caveat that it is not suitable for CPU access, rules out most use cases - but it is a good match for framebuffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-07sna/gen4: Remove custom max flush vertices w/a from video pathChris Wilson
This should now be superseded by using the common w/a. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-07sna/gen4: Remove the glyph mask hack and tune the flush w/aChris Wilson
Remove the hack from the glyph path to force the use of an auxiliary channel, and reduce the maximum amount of inflight vertices until we can then render glyphs with no corruption (at least in my test case). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-07sna/gen4: Tighten FORCE_FLUSH w/a to spot amalgamation of primitivesChris Wilson
Inspect whether this rectangle will be added to the previous primitive and so charge it against the current number of inflight rectangles. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-06sna/gen4: Restore the flush-every-vertex w/aChris Wilson
This is an abhorrent workaround for some internal GPU brokenness. A slight refinement since earlier times is the recognition that 16 is a magic number limiting the maximum number of inflight rectangles through the GPU. References: https://bugs.freedesktop.org/show_bug.cgi?id=55500 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-06sna: Tune inplace hints for CPU operations with GPU targetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-06sna: Relax assertion that the source of the cloned pixmap cannot be mappedChris Wilson
I was being overzealous at the time of making the COW and trying to be sure that we would never write through a mapping. Then I started to allow clones to be mapped (for reads) and missed relaxing this assertion. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-06sna: Flush blt copies if no operations pendingChris Wilson
More work to try and keep the GPU busy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-04sna: Use a stack allocated PixmapRec for the fbcon copyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-04sna: Set 1024x768 fb in absence of any connected devicesChris Wilson
No actual initial configration magic is required, all we need to do is set the initial framebuffer size with no connected outputs and leave it to the core to select CompatOutput() the like. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-04sna: Fix gamma query to not request uninitialized valuesChris Wilson
Oops, surprising that ebf4517a0b had any positive effect. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-04sna: Set the initial gamma from the attached monitor configurationChris Wilson
Fixes a missed configuration option from commit 8a6a21bff86100144ba7960fc32a299ac54ada83 [2.21.11] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jun 26 13:29:48 2013 +0100 sna: Use the existing configuration for initial modes Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-03sna: Always read back the gamma, even for a inactive CRTCChris Wilson
Even if the CRTC is inactive, we still need to initialise the gamma tables. Reported-and-tested-by: Timo Kamph <timo@kamph.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66563 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-03sna: Tidy up the user override enumsChris Wilson
Since we have a second place dependent upon the hidden ordering of the output options, simplify by copying the complete enum block from hw/xfree86/modes/xf86Crtc.c Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-03sna: Fix configuration user overrides on xorg-server < 1.14.99.1Chris Wilson
Marty Jack found that the enums for the user overrides were off by one (his xorg conf was no longer being applied). This is because I had missed the introduction of ZoomModes in 1.14.99 increasing all the important enum values by one. Reported-by: Marty Jack <marty19@comcast.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-03intel: Add an option for forced rediscovery of output status on startupChris Wilson
Specifying Section "Device" Option "ReprobeOutputs" "true" EndSection will restore the old behaviour of scanning each output on startup and picking a spanning mode. The behaviour was changed in commit 8a6a21bff86100144ba7960fc32a299ac54ada83 [2.21.11] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jun 26 13:29:48 2013 +0100 sna: Use the existing configuration for initial modes Please do notify us of any circumstances that force you to use this flag. References: https://bugs.freedesktop.org/show_bug.cgi?id=66494 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-03intel: Retire Option "RelaxedFencing"Chris Wilson
The kernel bugs have long since been fixed and should have been propagated to all stable kernels long ago. Now there should be no need to workaround those bugs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Try harder to do the BLT upload along the fallback pathChris Wilson
Only in the !fallback path will we try using the render pipeline after the blt, in which case we can try using render rather than forcing a stall. In the fallback path, we are going to incur stalls and readbacks, anyway so ignore them when considering blt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna/gen2: Fix alpha replication in the copy pipelineChris Wilson
When copying into an a8 surface we need to replicate the result into the green channel. It helps to tell the GPU from where to source the value to be replicated. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Assorted DBGChris Wilson
This DBG was useful for narrowing down the issue in the next patch... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Add the condition that 855gm cannot GTT map Y-tiled surfacesChris Wilson
We had the check in a couple of places, but missed a key one that decided whether or not to perform a GTT mapping of a bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Only preserve the real fbcon upon first starting XChris Wilson
We only want to preserve the plymouthd splash screen for flicker free start up, a subsequent regeneration should be cleared instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Simplify validation of active CRTCsChris Wilson
Atter a modeset or KMS takeover, we do a quick readback of the kernel state in order to verify that it matches our expectations. If we find that a foreign framebuffer is attached, or no mode if set on the output, we then turn off that connection and release any resources associated with that pipe. This patch tries to reduce the number of superfluous requests to turn off a connection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Hook into crtc_notify rather than ModeSetChris Wilson
ModeSet is called after updating each CRTC, unlike crtc_notify which is called after applying all changes. The last is what we need as if we are called too early we detect that the next CRTC doesn't match our expectations and so we disable it, right before applying the desired mode. References: https://bugs.freedesktop.org/show_bug.cgi?id=66494 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Include connector status in the initial probeChris Wilson
We cannot simply rely on connector->encoder->crtc status as with the introduction of Haswell or SDVO we may have multiple connectors using the same encoder. So we need to explictly check the connector status first, before determining if the output is connected to an active encoder and CRTC. References: https://bugs.freedesktop.org/show_bug.cgi?id=66488 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Minor tweaks to make DBG compile againChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Fix checking the dirty boxesChris Wilson
I forgot how insane the data structure for the list of dirty boxes attached to the damage is. It is neither a simple list, nor does not store the count of boxes within each chunk. Fixes regression from commit 9026bb954646c0425360c2236e26c79d097142cd [2.21.11] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Jun 28 15:59:17 2013 +0100 sna: Inspect the dirty boxes when querying whether damage contains a rectangle A side effect is that we now make sure that there is an upper bound to the amount of searching we do for the no-reduce fast path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66430 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Allow scanouts to be untiled if need beChris Wilson
Fixes regression from commit 77fa8ab08b441934218ddb8f690be1a919f0ec64 [2.21.11] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 25 22:25:25 2013 +0100 sna: Free just-allocated bo if we fail to set-tiling on CREATE_EXACT Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Always create the clear PictureChris Wilson
As we unconditionally use it irrespective of whether we then call accelerated code paths or not. Fixes regression from commit dc18eaa585c36c8e5f5b4ec405a976a835fd2ac3 [2.20.10] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Aug 12 10:34:10 2012 +0100 sna: Make the failure to create render caches non-fatal in the event we need to start with a hung GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Make sure we are consistent in applying USE_INPLACE debug optionChris Wilson
A few new paths were missing the debug check, and clarify a few indirect uses by performing the explicit check. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Debug options for forcing mmap syncsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Improve the message about where to find the hang stateChris Wilson
Search the few canonical locations for our hang state so that we can be more explicit to the user about what to include. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Mark an inplace getimage as preferring the CPU mapping afterwardsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Assert that we do not have overlapping damageChris Wilson
Double check that the results of the box query match with the slow queries. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Check whether the query box is contained within the damageChris Wilson
We can improve our query for whether the rectangle of interest is within the damage by checking whether the damage extents contains the entire box rather than just checking for an overlap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Experiment with cpu mappings for migrationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Do not use userptr for GetImage on unsupported architecturesChris Wilson
If the system cannot blt to a CPU buffer, we should even attempt to do so for GetImage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-30sna: Store the path used to open the device and pass to DRIChris Wilson
Avoid having to search the device tree once again in order to simply recover the path we used to open the device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-30sna: Replace conflicting drmDropMasterChris Wilson
Calling drmDropMaster twice along the CloseScreen path is not a good idea. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29sna: Allow tiled memcpy on i386Chris Wilson
With the split into per-swizzle functions, and with the forced optimisation levels, it appears that i386 doesn't suffer so badly and the tiled memcpy are a viable method. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29sna: Add the Ofast option to the critical memcpy routinesChris Wilson
Always enable gcc to fully optimize the core memcpy routines (provided that optimisations are not entirely disabled, for instance for debugging). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29sna: Fix get_image_inplace to use the pixmap offsetChris Wilson
The inplace routine assumed that the region to be read was already in pixmap coordinates. Making it so makes the code easier, so do it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>