summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-21sna: Disable userspace w/a for i830/845 cs incoherencydisable-gen20-waDaniel Vetter1-2/+0
In commit c7f7dd61fd07dbf938fc6ba711de07986d35ce1f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Dec 12 19:43:19 2012 +0000 sna: Pin some batches to avoid CS incoherence on 830/845 the in-kernel w/a of pinning batches was duplicated for older kernels. Unfortunately the userspace w/a isn't as good as the kernel one - when restarting X we need to pin a new set of batch buffer objects. Those new batches could potentially have stale tlb entries still in the CS, leading to gpu hangs right after X started. The other problem is that when support for detecting the kernel-based w/a added to be able to opt out of it using the EXEC_IS_PINNED in commit 5b0572503eab235bc7eff20d369241330c41e630 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Dec 16 23:04:55 2012 +0000 sna: Enable support for opting out of the kernel CS workaround the logic in kgem_create_batch was fumbled: Since we always opt out we should unconditionally pin the batches. The end result is that we've ended up with unpinned batches if the kernel implements the w/a :( Instead of fixing the userspace w/a to work even when the kernel w/a is available I've opted to just disable the EXEC_IS_PINNED optimization completely - given the above issues around restarting X it's imo better to be safe than sorry. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-21sna: Tweak opportunistic flushing to reduce power consumptionChris Wilson2-41/+26
When trying to conserve power, reduce the number of small batches we emit - trying to maximise GPU efficacy and minimise CPU overhead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-21sna: Set the canonical name for the current mode if none matchChris Wilson1-0/+31
Always give the mode a name for pretty printing for the user. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-21sna: Copy the EDID mode name for the current CRTC modeChris Wilson1-0/+11
As the kernel does not preserve the name and driver type when returning the current CRTC mode, we need to reconstruct those from the EDID mode when available. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-21sna: Fix typo inside an assertionChris Wilson1-1/+1
Use the right dst_priv variable instead of priv! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-21sna: Suppress log messages for unchanging EDIDChris Wilson1-1/+21
Whenever we reprobe an unchanging output and re-read its EDID, we emit a useless log message. Previously this was squelched by trying to spot when an EDID was unchanged through the use of its blob.id, however we need to do a complete check on the contents in case the kernel returns us a new EDID with the old id. So make a temporary copy of the current EDID data and only squelch the log messages if the new EDID is an exact match. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-20sna: Fix the addition of the current output Mode to the probed listsChris Wilson1-26/+16
We need to add the current mode to the Modes list and not directly to the output->probed_modes as that gets overwritten. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-19sna: Unmap pixmap prior to release GPU boChris Wilson3-15/+23
As the unmap routine will deference the GPu bo in its debugging code, we need to be sure that the pointer is still valid at the time of unmapping. Hence unmap before release. Reported-by: Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-18sna: Do a quick pass on dirty damage before reductionChris Wilson1-1/+22
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-18sna: Drop now obsolete assertionChris Wilson1-3/+1
We no longer unconditionally clear the CPU hint when moving to the GPU for readonly updates, so we can no longer assert that the priv->cpu == false afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-18sna: Tighten pixmap map assertionsChris Wilson2-107/+111
We need to also take account of upload buffers which include an offset to the base map. To do so, we also need to stop conflating the cpu hint with the current mapping flag. References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-18sna/glyphs: Remove glyph_approx_extentsChris Wilson1-95/+57
It didn't consider the height of the glyph above the baseline, i.e. it was fundamentally flawed. The only thing to do is to make sure that glyph_extents() is sufficiently fast never to show up in profiles. (Until then QA should spot the ~10% regression.) An alternative would be to feed the drawable clip extents to the render engine and avoid manual clipping if the clip region covers the whole drawable. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Reported-by: Jiri Slaby <jirislaby@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70552 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-18Remove defunct file 'brw_eu_util.c' from gitChris Wilson1-126/+0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-17sna: Check return of source_bo for a potential failureChris Wilson1-0/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-17sna: Fix computation of clip boxes for stipple uploadsChris Wilson1-2/+2
References: https://bugs.freedesktop.org/show_bug.cgi?id=67865 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-17sna: Assert mapped stateChris Wilson4-60/+41
When mapped, assert that we point to the expected mapping of the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-17sna/dri: Refactor to use the common GPU damage routineChris Wilson1-8/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-16sna/glyphs: Fix computation of extents for long stringsChris Wilson2-49/+144
And make sure we consider such overflowing strings for correct clipping against Windows. To offset the cost of doing a full extents check (~10% on aa10text), we introduce an approximate extents query (~1% on aa10text). The disparity should be rare, and should be an overestimate to force redundant clipping. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70541 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-16sna: Fix inverted tiled CPU map check in has_coherent_ptr()Chris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-16sna: Only carry 32/64-bit compat wrapper for drm_mode_get_connectorChris Wilson1-34/+26
This is the only structure we care about that has u64 and its size is not a multiple of u64s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna: Expand packed KMS structs for 64-bit alignmentChris Wilson1-65/+81
Pavel Roskin found that with a 32-bit build of the DDX with a 64-bit kernel that the call to GETCONNECTOR was overwriting the 4 bytes beyond the end of the drm_mode_get_connector structure. This would appear to be due to the surreptious padding inserted by the compiler so that the structure would be naturally aligned on a 64-bit system. To compenstate we need to insert padding between the adjacent 32-bit structures on the stack. As usual, be paranoid and make sure that all the adjacent KMS structs we use are padded out to an 64-bit boundary. Reported-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna: Add DBG along all output init failure pathsChris Wilson1-4/+17
Suggested-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna: Allow read-mappings for has_coherent_ptr() assertChris Wilson1-4/+0
The assertion was a little too specific and disallowed us to have a CPU read-only mapping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna: Speed up inplace copies from SHM pixmaps to GPU boChris Wilson1-18/+155
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15Revert "sna: Preserve the user backlight value for get_property calls"Chris Wilson1-9/+0
This reverts commit 41b6b792d8e9c84c0a71a4bd7600e1c42e86b5bd in favour of the better fix to not ask RRChangeOutputProperty to reset the known hardware values. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna: Disable updating properties upon reading their valuesChris Wilson1-5/+6
When we assign the hardware values to the output properties, we do not need to process the set_property callback to write those values back to hardware. This callback is triggered by the pending update flag passed to RRChangeOutputProperty. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70406 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna: Preserve the user backlight value for get_property callsChris Wilson1-1/+11
When querying the current backlight value, be sure not to overwrite the last user set value by the call to RRChangeOutputProperty. RRChangeOutputProperty calls into set_backlight_property, tricking us into believing that the user has set a new backlight value. The result is that we end up believing that the user chooses a 0 backlight if she should happen to query the property whilst the output is disabled. Reported-by: reztho@archlinux.us Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70406 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-15sna/trapezoids: Initialise force_fallbackChris Wilson1-1/+2
Remember to set it initially to false so that we randomly do not start using fallbacks. Fixes regression from commit 0cd2c43fa8f3a66d612589ad1163a90e427668ac Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Oct 13 14:46:45 2013 +0100 sna/trapezoids: Use the aligned fast path for fallbacks Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-14sna: Assert that the mode/ring are set when marking active boChris Wilson1-0/+1
As we use the current ring to encode upon the bo relocs, we need that ring to be properly setup prior to performing relocations. References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-14sna/gen6: Fix the invert fixChris Wilson1-1/+1
Eek, missed that 8-wide dispatch branch still had the opposite fix that I was testing first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-14sna/gen6+: Fix calculation of 1/z for projective texturesChris Wilson1-9/+9
A typo crept in causing the shader to read from the wrong temporaries for the invert operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-14sna: Tighten has_coherent_ptr() assertionChris Wilson1-21/+29
Pass along the flags for read/write direction so that we know whether or not we expect the gpu bo to be in the CPU write domain. Reported-by: Pavel Ondračka <pavel.ondracka@email.cz> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13sna: Fix typo in DBGChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13sna/trapezoids: Use the aligned fast path for fallbacksChris Wilson1-8/+12
Route the fallback methods through the force_fallback aligned fast paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13sna: Cleanup up unused variablesChris Wilson1-2/+0
commit 951f969fa63defbe7cfa52ca97c8985b157bbed0 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Oct 13 12:47:20 2013 +0100 sna: Update DPMS on attached outputs before disabling the CRT left behind a couple of variables now deceased. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13sna: Update DPMS on attached outputs before disabling the CRTCChris Wilson1-12/+42
We may want to take action such as preserving the current user value of the backlight before disabling it whilst forcing a CRTC off. This requires us to record that value first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13sna: Cleanup allocation of sna_output after late syscall failChris Wilson1-1/+3
If the second syscall fails (presumably as a deferred allocation failure check), cleanup the allocations made so far before reporting the failure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13uxa: Check for allocation failure in i915 videoChris Wilson1-0/+5
For a large screen, we have to create a temporary surface for rendering the textured video. If this pixmap creation fails we may be left with a system memory only pixmap leading to a segfault. Reported-by: Bas Wijnen <wijnen@debian.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13uxa: Abort CreateScreenResources after allocation failureChris Wilson1-0/+3
One of UXA's invarients is that the ScreenPixmap is complete (i.e. has an intel_pixmap private with a bo attached). If we fail to create that private during CreateScreenResources we will die very soon afterwards, so just report the failure and shutdown gracefully. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-11configure: Allow manual specification of intel-gen4asm pathChris Wilson1-4/+17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna: Populate bo->size from dma-bufChris Wilson1-0/+6
Recent kernels gained the ability to report the actual size of the dma-buf through an lseek. We can use this to set the correct size of the bo when available, overriding the guess provided by the caller. Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna: Sanitize output->crtc before falling back oto xf86InitialConfigurationChris Wilson1-2/+16
During initialisation, we stash the currently attached CRTC id in output->crtc. This is fine as ordinarily we would not dereference output->crtc until after it had been assigned a real CRTC. However, commit 6fda305e2f2f991b39d09e67d0b17c8c3d50f9a4 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Oct 9 15:59:42 2013 +0100 sna: Append the current mode to the output list if not found introduces such an early dereference and causes a crash if we fail to probe the KMS configuration (usually due to a user override). Reported-by: Łukasz Maśko <ed@yen.ipipan.waw.pl> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10configure: Add xfixes to X11 pkg checkDaniel Martin2-2/+2
Add xfixes to the list of PKG_CHECK_MODULES for X11. '-lXfixes' was hardcoded in test/Makefile.am before. This could lead to a broken build in very rare cases where the build environment has all specified X libraries but Xfixes. Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-10-10sna/gen4+: Share a few common routinesChris Wilson9-128/+140
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna/gen6+: Share the common routines for ring preferrenceChris Wilson7-428/+308
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna/gen6+: Only allow switching to BLT for fills if we have semaphoresChris Wilson2-2/+4
An extra caveat to these generations for commit 97d809c26bec2c0120f2dc0bcfd840379bd996fa Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Oct 10 00:15:55 2013 +0100 sna: Pass usage hint down to render fill routines is that we don't want to incur ring switch overheads that may overwhelm any advantages from using the BLT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna: Prevent changes in tiling/pitch of existing framebuffersChris Wilson1-10/+4
Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna: Pass usage hint down to render fill routinesChris Wilson9-35/+58
For the scanlines emitted for rendering Core drawing primitives, it is preferable to use the BLT engine, so pass those hints down. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna: Upon unwinding operations, also check for exec objects to clearChris Wilson2-3/+20
If we cancel an operation after partially committing it, we may leave the batch bookkeeping in an inconsistent state with an exec object with a zero-length batch. Ordinarily, this would not be an issue as we could pass the extra object to the next batch. However, if we switch rings, we need to clear the extra objects as they are currently flagged as being on the wrong ring, leading to hilarity. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-092.99.904 snapshotChris Wilson2-1/+39