summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-01-28sna: Clear the per-crtc shadow buffer if they are clippedChris Wilson
Before we present a buffer on the CRTC, we try to make sure it is initialised with the current contents. However, if it is larger than the screen then not all the buffer may be initialised and so we need to clear it first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-27sna/dri2: Check for comparable back/front pitches more carefullyChris Wilson
Suppose for a moment that we don't have a DRI2Buffer associated with the Drawable just yet... This could happen after a Composite redirect as the front buffer may created (and so associated with the new Pixmap) after the back buffer is recreated. Reported-by: Tomas Pruzina <pruzinat@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88814 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-26sna: Log maximum number of CPU threadsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-26sna/dri2: Use existing busy state if semaphores are disabledChris Wilson
Undo d16ac1f30bb (sna/dri2: Prefer to use normal selection criteria for CopyRegion on small GT) to keep on the current ring as the external bo if semaphores are disabled. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-26legacy/i810: Expand mask to match unsigned longChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-26sna: Expand mask to match uintptr_tChris Wilson
Let's make sure we mask all the uintptr_t bits. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-26uxa: fix XVMC = no buildPatrick Welche
Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
2015-01-26backlight.c: test for featuresPatrick Welche
Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
2015-01-26sna: Tweak treatment of DPMS mode to be consistent at all layersChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=88794 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-25sna/gen6+: Tweak engine placement when considering src/dst combinationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-23sna: Assert that the shadow buffer has a compatible pitch to the frontChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-23sna: GETPROPBLOB only works with exact length matchesChris Wilson
If the blob is smaller than the space we offer for the read, it skips the read. So make sure we repeat the read in this case as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-23sna: Add a fallback DBG for the git versionChris Wilson
In case the version numbering is disabled, like on Arch, include it anyway in the full debug log. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-22sna/dri2: Only preserve back buffers with the same pitchChris Wilson
We can only pageflip if we don't change the pitch, otherwise we simulate the pageflip with modeset. The idea is that once we have exchanged the buffers, we will quickly settle down to a steady state scenario where each buffer has the same pitch. We can encourage this further by only keeping those buffers around that do have the same pitch as the current front. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-22sna: Reorganise assertions when retiring idle boChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c83 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-22sna: Declare outputs as hidden at startChris Wilson
Required for our internal bookkeeping of DPMS events. Reported-by: Jiri Slaby <jirislaby:gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c79 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-21sna/dri2: Prefer to use normal selection criteria for CopyRegion on small GTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-21sna: Keep front_active consistent across DPMS eventsChris Wilson
When disabling outputs with DPMS, make sure we update front_active for consistency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-20sna: Add missing include of DPMS constantsChris Wilson
Fixes build with slightly older X servers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-20sna: Finish e6227daff1e3eChris Wilson
Missed the git-add before pushing. :| Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-20sna: Add a loud DBG message when enabledChris Wilson
Having a reminder/alert when the debug tracing is enabled I find useful. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-19Set the vdpau driver to va_glAdel Gadllah
This at least works when the wrapper is installed, there is no i9xx vdpau driver. This should for example improve flash which only supports vdpau. The expectation is that most software will use vaapi in preference for -intel, for example kodi which supports both vdpau and vaapi video acceleration methods. [A quick discussion with Peter Frühberger clarified that kodi should indeed continue to work fine and will not be confused if we expose an actual vdpau driver.]
2015-01-17sna: Provide a few compiler hintsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-17sna/gen6+: Prefer not to switch away from active RENDER pipelineChris Wilson
If we don't have a good reason to switch to BLT, don't jump engines simply because the BLT is idle if our target bo is active on the RENDER pipeline. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-16sna/dri2: Exchange flags when exchanging DRI2Buffers after SwapBuffersChris Wilson
Along with the name, pitch, bo, we should also preserve the flags. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-16sna/dri2: Track tracking of active-scanout for back buffer replacementChris Wilson
In the end it turned out to a small typo, s/scanout/active_scanout/ in consideration of reusing the cache. Though there are a number of very useful debug improvements along the way. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-15sna/gen6+: Prefer using RENDER pipeline for uncached destinations on large GTChris Wilson
If the sampler can be cached, the RENDER pipeline can write to an uncached destination surface faster than main memory bw would seem to actually allow... Notably, performance does not drastically fall off with small areas compared to BLT as it once did. However, using a solid source (which is not yet implemented well in the RENDER pipeline) is still much faster with the BLT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-15sna/dri2: Add a DBG message for when Xorg triple buffering is availableChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-14sna: Actually check for has_wc_mmap before useChris Wilson
The callers assumed that the callee was doing the check and vice versa. The result was that no did and we ended up using an incoherent mapping instead on old kernels. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88350 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13sna: Wrap direct access to ScrnInfoPtr->pScreenChris Wilson
Admittedly ScrnInfoPtr->pScreen has nearly always existed, but for completeness wrap it up in a compat macro. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13sna: Only instantiate the frontbuffer on the GPU if usedChris Wilson
If we are a PRIME slave, we never need to allocate any memory for the frontbuffer, so skip the forced allocation during modesets. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13sna: Combine slave CRTC offsets with rotationChris Wilson
When applying both a slave offset and an output rotation, order is important. To get the order right, we need to combine the two into a single transformation. Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13sna: Add a small DBG message for when PRIME slave tracking is enabledChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13sna: Throw away CRTC damage if the CRTC is outside the screen boundsChris Wilson
As the damage is entirely empty due to the screen clipping, we can save a few electrons by not recording it. Ordinarily, we will then get the damage event later when the screen is resized. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-11sna: Use correct octal value for gen3Chris Wilson
Fixes regression in commit 836f9e11d67356babc80464f1183b907cb6cb2f2 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Jan 9 19:55:41 2015 +0000 sna: Disable detiling for gen2 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Add basic unswizzled manual detilers for gen2Chris Wilson
gen2 uses a unique tile setup, and as far as we known, no swizzling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna/dri2: Fix build with DRI2INFOREC version 5Chris Wilson
Reported-by: Patrick Welche <prlw1@cam.ac.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88252 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Disable detiling for gen2Chris Wilson
gen2 use a different tile layout to all the other generations, and are not supported by the existing routines. Disable for now. References: https://bugs.freedesktop.org/show_bug.cgi?id=88112 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Actually set the priv->mapped type for mmap(wc)Chris Wilson
A glitch from the last patch forgot to set the priv->mapped flag correctly after setting up a mmap(wc). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Wrap mmap accessors with sigtrap to catch oom SIGBUSChris Wilson
Accessing a mmap'ed pointer (especially our shmemfs backed bo) can throw SIGBUS when out of memory, for which we use sigtrap for graceful failure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Replace assert with conditional setting of sna_pixmap->mappedChris Wilson
The status of sna_pixmap->mapped was changed with the introduction of mmap(wc), but the code was still asserting that the mmap could only be cached. References: https://bugs.freedesktop.org/show_bug.cgi?id=88112#c20 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Add a couple of guards against using the GPU to write into snooped boChris Wilson
Since gen2 cannot rendering into a snooped bo, we have to be careful before trusting the CPU bo as a GPU target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09sna: Capitlize log message "display hotplut detection"Chris Wilson
It looks out of place starting with a lower case letter when the surrounding messages are sentence captilized. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-08sna: Allow use of mmap(wc) for inplace GetImageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-08sna: Differentiate between disabling CRTC and turning off DPMSChris Wilson
xf86DisableUnusedFunctions() uses crtc->dpms(off) to disable unused pipes. In this case, we do want to explicitly disable the CRTC to release any shared state (e.g. PLLs and encoders). However, the user can also request for the DPMS to be disabled, either via the DPMS extension or the ScreenSaver. Here, we don't want to full disable the pipe as that incurs extra latency (and risk of failure) when switching the display back on. In order to distinguish the two cases, we can hook into the user paths and skip disabling the CRTCs. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07sna: Add mmap(wc) handling to has_coherent_ptr assertionChris Wilson
Extend the debuging sanity checks to also cover WC mappings. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07sna/trapezoids: Fix typo in construction of polygon linesChris Wilson
Fixes regression from a missed replacement in: commit 191c6b6ca7b3d2a1040c2633929845117ba1f1af [2.99.917] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Oct 5 09:05:20 2014 +0100 sna/trapezoids: Improve sample locations for imprecise rasterisation Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07sna/video: Reuse fallback colorkey filler from overlay for spritesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07sna/video: Provide fallback support for filling the colorkeyChris Wilson
If the GPU is wedged, we cannot use the blitter for filling the colorkey, so provide an interface to write the value using the GTT instead. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06sna: Copy mode.vrefresh between kernel and XChris Wilson
The value is typically used only for human readable output, though some kernel modules do use it for preferred mode matching (notably not i915.ko today). Let us not second guess the desired vrefresh if it is known. Suggested-by: "Jasper St. Pierre" <jstpierre@mecheye.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>