Use the display hardware for simple rotations, when exported through the
rotation property on the CRTC.
As the kernel support is not yet merged upstream, the feature is hidden
behind --enable-rotation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This reverts commit 2a5ad9c015.
Oops, pushed from the wrong machine and merged in a incomplete bugfix
branch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When flushing between operations, we can choose between doing a full
flush to memory, or just a pipeline flush. For debugging it is better to
do the full flush to rule out cache effects.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The MOVE_READ else branch is repeated immediately below when marking up
damage for MOVE_WRITE, so remove it for simplicity.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When preparing a pixmap for CPU rendering, one of the last steps is to
copy the outstanding GPU damage back to the CPU. Currently, we flush any
outstanding pageflips (for TearFree) and in the process accidentally
destroy the shadow buffer if there is no outstanding GPU damage. Rearrange
the code to avoid tripping over that by only processing the move-to-gpu if
we need to touch the GPU bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
An optimisation for 1x1 reads of a clear buffer lead to a bug whereby
the damage for a 1x1 write would not be tracked correctly (conflicting
full GPU damage vs partial CPU damage).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
commit 82e6d41c2f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Oct 31 13:35:59 2013 +0000
sna/gen6: Tweak flush around CC state changes
Replaced the pipeline stall with a flush - but only when the target was
dirty. The missing stall however seems to be required as well.
v2: Actually emit the stall for all CC state changes [Ilia Mirkin]
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72375
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since we call kgem_bo_submit() along one path when synchronising a
cached bo (which is known to be inactive) but still want to keep the
assertion on the refcnt, simply rearrange the code to only assert on the
active path.
References: https://bugs.freedesktop.org/show_bug.cgi?id=73406
Reported-by: Matti Hamalainen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
One day, just not today, we may make gen4 work correctly, efficiently and
fast. Today, we can barely pick one.
References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
One path uses the mask channel, the other does not. We cannot rely on
overwriting all reused state in this case, and so we must clear the
composite state prior to use each time.
Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74494
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
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>
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>
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>
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>
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>
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>
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>
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>
commit 3dbf17f00e [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>
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>
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>
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>