When we call kgem_bo_write() we have less control over the allocation of
the buffer, and do not ensure it meets the alignment criteria required
for the cacheline optimisation. So use the simple pwrite routine to
avoid reading beyond the end of the allocation.
Reported-and-tested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we are ignoring CPU damage, we also need only to check GPU damage
when considering placement of the target bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Another fix for
commit e3f15cbf39 [2.99.905]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Oct 22 15:19:15 2013 +0100
sna: Move gc back to GPU after failure to move it to CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Old generations have very strict alignment requirements even for
unfenced tiled accesses which restricts the amount of aperture space
available for use, and in the process estimate for the effect of
framebuffer fragmentation on the mappable aperture.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Before attempting to map the destination for uploading into after a
failure to use the BLT, we need to recheck that it is indeed mappable.
References: https://bugs.freedesktop.org/show_bug.cgi?id=70924
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The macro still had buried returns which were no longer valid after the
translation to handle clipping. They needed to be breaks from the inner
most loops to the outer clip box instead.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70802
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
commit d580a30aaf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Oct 31 15:58:47 2013 +0000
sna/gen7: Flush render cache when changing CC state
ultimately doesn't prevent the issue and in the process adversely
affects perforamnce.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
After converting aperture_mappable to count in pages, there were a few
residual users expecting a byte count.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71117
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to fix some font corruption, it appears that we need an extra
flush in the Sandybridge pipeline when we change the CC stage and the
render cache is dirty. We previously triggered a full pipeline stall
for this case.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Some of the mi routines recuse back into the generic accel routines and
so confuse our trapping of SIGBUS. Add extra assertions to pinpoint the
recursion and unwrap sufficiently to avoid that recursion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
For an extra layer of paranoia, catch any sigbus when trying to upload
a bitmap, and convert it to a no-op.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The BYT vsync is closer to the IVB vsync, and using gen6 is just
erroneous. Apparently. At least that is what is in bspec today.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Yikes, the new assertions found cases where we would retain an active
buffer even though it was still owned by the next batch. Fortunately,
this should only be a bookkeeping issue rather than lead to corruption.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we know that we had a request to retire, we know that we may make
progress retiring active buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes regression from
commit e3f15cbf39 [2.99.905]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Oct 22 15:19:15 2013 +0100
sna: Move gc back to GPU after failure to move it to CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Expunge our caches if we fail to write into a bo (presuming that
allocation failure is the likely fixable cause).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
After computing the clip intersection, we immediately check for the
empty result, so refactor the check into the common routine.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
For consistency with the other aperture metrics and correctness when
passing around required number of pages.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we get a pageflip fail when trying to do a TearFree update, just
fallback to a copy (before turning off the display for complete
failure). The rare tearing copy should mar the user experience far less.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This will overcount buffers that both fenced and unfenced (likely most
fenced buffers!) but is required to prevent ENOSPC due to alignment
issues.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
kgem_check_bo_fenced queries whether the GPU is idle, and so its result
is timing dependent and not suitable for assertion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes a regression introduced in
commit 4d2840919f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Sep 26 15:30:58 2013 +0100
sna: In desperation, query the actual available aperture space
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>