summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-02-02sna: Reconstruct damage for the partially replaced discarded CPU boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: If IGNORE_CPU is not set we must mark the move as MOVE_READChris Wilson
Logic reversal in discarding CPU damage. An old bug revealed by the more aggressive attempts to discard CPU damage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Add some more DBG for choosing render targetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Skip discarding CPU bo when using as a render targetChris Wilson
The issue with unwanted serialisation does not affect the async move-to-cpu of a render target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Allow more inplace promotions of CPU to GPU boChris Wilson
If the CPU bo is wholly damaged, then it makes an ideal candidate for simply converting into the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Undo region translation before returningChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Apply drawable offsets to partial CPU damage being replacedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Don't discard the GPU prior to using it for stashing CPU damageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Remark the region as damaged after uploading the rest to the GPUChris Wilson
If we upload outside of the replaced region to the GPU, we need to remark the region of operation as dirty. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Only discard CPU damage for an replacing regionChris Wilson
When considering move-region-to-cpu, we need to take into account that the region may not replace the whole drawable, in which case we cannot simply dispose of an active CPU bo. Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reported-by: Conley Moorhous <conleymoorhous@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74327 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01glamor: Enable Xv supportChris Wilson
In addition to the UXA texture paths (which in theory support VSync) and direct overlay support, create a textured video paths that utilize the glamor acceleration code. Requested-by: Fabio Pedretti <fabio.ped@libero.it> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74311 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: remove short-circuit for move-to-CPU when damage covers regionChris Wilson
The short-circuit path missed translating the damage from drawable space into the pixmap (for Composite setups) which may have resulted in corruption. The path was also failing to consider the impact of reusing an active CPU bo when it could be discarding the unwanted damage and reallocating. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Use 24bpp rendering by default for gen2 againChris Wilson
Too many users where unhappy that their software was broken. Too bad the same software is also broken at high bit depths as well. References: https://bugs.freedesktop.org/show_bug.cgi?id=73877 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Balance memory accounting for buffer objectsChris Wilson
A couple bugs ended up with CPU bo gradually accumulating whilst the overall number of bo vanished. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Reorder assignments vs DBGChris Wilson
It helps reading the debug log if what we print is correct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Actually reuse pixmap headers for ordinary pixmapsChris Wilson
commit 3dbf17f00e200e864818b0b8ca762183cff9085f [2.99.907] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Dec 3 12:10:01 2013 +0000 sna: Mark up an ordinary pixmap for reuse started to put the frequently allocated pixmaps into the object cache - but as those frequent allocations themselves did not use the cache, the cache kept growing. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1272338 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Tidy up pixmap header allocationsChris Wilson
Refactor some more of the common code, and add some debug tracking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Show the memory debug info againChris Wilson
This needs to be visible whenever we --enable-debug=memory. Make it so, and trim it to a single line in the process. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-30sna: Silence a compiler warning for mismatching const stringsChris Wilson
sna_display.c: In function 'preferred_mode': sna_display.c:3393:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] mode = xf86GetOptValString(output->options, OPTION_PREFERRED_MODE); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-30sna: Suppress warning for freeing a "constant" stringChris Wilson
We allocated and own the string, so we can free it! sna_display.c: In function 'sna_output_get_modes': sna_display.c:2314:4: warning: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [enabled by default] free(current->name); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-30sna: Handle char *backlight_ifaceChris Wilson
The backlight_iface is a freeable string, in places we were assigning a constant string and later freeing it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-30sna: Constify GCFunc to quieten the compiler.Chris Wilson
We keep a pointer to the old funcs when wrapping, this now needs to be const. sna_accel.c: In function 'sna_gc_move_to_cpu': sna_accel.c:4008:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] sgc->old_funcs = gc->funcs; Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna: Fix format specifier typo ('%D') in DBGChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna: Always clear the domain even only a potential syncChris Wilson
It helps to keep the domain-tracking bookkeeping consistent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna: We can only retire a bo if is not referenced by the current batchChris Wilson
Fixes regression from commit 8b0ebebcab21647348f769c25ca0c1d81d169e75 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jan 28 16:30:47 2014 +0000 sna: Be a little more assertive in retiring after set-domain Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74176 Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna: Add assertions for set/get bindingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna/gen4+: Assert that the cached binding location is validChris Wilson
We can at least check that it is in the right region (i.e. not past where the current surface has been allocated from). References: https://bugs.freedesktop.org/show_bug.cgi?id=74176 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna: Do not use color corrected pixel values for comparing against gcChris Wilson
Dashed zero-width lines devolve into two passes (first to draw the foreground dashes, and then to draw the gaps). The code was using the pixel value to decide which phase was being drawn -- however the color on the gc is not always bit exact (e.g. alpha channel) with the pixel value. As a result, we would oft miss drawing anything when rendering into the scanout. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1059152 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna/gen6+: Encourage inplace uploads for CompositeChris Wilson
First try using the blt path for a potential inplace upload for a simple composite operation copying from a ShmPixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-29sna: Skip undamaged TearFree redisplaysChris Wilson
If we have not had cause to flush the wait_for_shadow buffer during the course of the rendering, then we never wrote to the backbuffer and its contents are still identical to the current frontbuffer. So if the wait_for_shadow is still flagged as required on the scanout, we know we can safely discard the redisplay request. References: https://bugs.freedesktop.org/show_bug.cgi?id=70905 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-28Allow selection of glamor as the default acceleration methodChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74162 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-28sna: Check for a hang after a spurious error return from set-domain-ioctlChris Wilson
set-domain-ioctl should only ever fail for invalid user input, beyond the normal signal handling. As such if we do find a spurious error return from the kernel, check for a GPU hang. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-28sna: Be a little more assertive in retiring after set-domainChris Wilson
After a successful set-domain for writing with the CPU, we know that the buffer is idle so remove it from our request tracking. (External clients complicate matters in that they may keep the bo active even after our set-domain.) On the contrary, because of read-read optimisations a bo may still be active after a set-domain for reading by the CPU, in which we need to remain conservative in retiring the bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-28sna: Cancel the backlight change if set-property(DPMS) failsChris Wilson
If the kernel reports an error from setting the DPMS property, we need to undo the local changes and propagate back the error to the caller. Although the latter is prevented by the RandR API, we can at least restore the backlight. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-27sna: Rearrange damage allocation to handle malloc failure more gracefullyChris Wilson
If we fail to allocate new damage boxes, first try collescing the existing boxes to free up memory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-27sna: Use signal-safe DBGChris Wilson
Otherwise we end up confusing the core Xserver functions when called from auxilliary threads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-24sna/gen3+: Allow for spill when aligning verticesChris Wilson
We need to flush the batch if we run out of space aligning our vertex buffer - but the test must anticipate the space required for the new alignment. Reported-by: Arkadiusz Miskiewicz Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-24sna/gen2+: Inspect composite flags to discard unneeded CPU damageChris Wilson
We can now check whether the Composite operation will require existing CPU damage and if not discard it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23sna/gen2,3: Don't set BLT_DST_TILEDChris Wilson
This bit only exists for gen4+ so avoid setting it on gen2 and gen3, whilst setting it doesn't seem to cause any harm, there is no reason to risk it... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23sna: Protect against fake CRTCs during initial probeChris Wilson
Reported-by: Nick Bowler <nbowler@draconx.ca> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73981 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23sna: Avoid erroneous discarding operations for partial compositesChris Wilson
Composite operations were presumed to cover their entire width x height area. However, a few paths submit boxes that do not cover the clip region and so the optimisation made during prepare to discard completely overwritten data is incorrect (and leads to corruption - stale data is seen which the client expected to have been overdrawn). So along these more unusual paths, we must add a flag to prevent the overzealous discard. Notably, xfce4 triggers this as it uses a lot of unantialiased trapezoids in its theme drawing. References: https://bugs.freedesktop.org/show_bug.cgi?id=69528 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23glamor: Don't require the glamoregl module to be pre-loaded with xserver >= 1.15Chris Wilson
Inspired by (ok, copied from): xf86-video-ati commit f2a0a5cf6c5a21e2a02280e110a4eb8e6609dace Author: Michel Dänzer <michel.daenzer@amd.com> Date: Wed Jan 22 11:04:42 2014 +0900 Don't require the glamoregl module to be pre-loaded with xserver >= 1.15 The issues with loading it on demand have been fixed in xserver 1.15. Inspired by Jérôme Glisse on IRC. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-22sna: Assert that the fill box is within boundsChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=73811 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna: Restore gc->serialNumber correctly after falling backChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73856 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna: Initialise the TearFree shadow output from the current front bufferChris Wilson
Otherwise we may end up in a sitation where we show stale contents for a (sometimes signification) fraction of a second before it is refreshed with the correct contents. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73842 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna/gen4: Add an ALWAYS_FLUSH debugging optionChris Wilson
Still gen4 is cursed. This should restore the plateau we reached with 2.99.907 by forcing a full GPU flush between every operation. References: https://bugs.freedesktop.org/show_bug.cgi?id=55500 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna: Drop bogus assert added in recent patchesChris Wilson
The intention was to detect if the gc->pCompositeClip still pointed to the temporary region. However, the assert failed to accomplish that goal. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna: Reduce zeal of new gc->pCompositeClipChris Wilson
gc->pCompositeClip starts off NULL, just like sna_gc->priv. Reported-by: Arkadiusz Miskiewicz Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna: Fix typo in assertion from previous commitChris Wilson
Sigh. It helps to remember to do compile testing with the right configuration. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-21sna: More assertions for tracking gc->pCompositeClipChris Wilson
Tracking down who leaves it modified... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>