sna: Only try the SRC fixup into the buffer if it is CPU mapped

On one particular machine, this operation is behaving as if it is
reading back UC memory during the explicit write-only composite.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2013-02-07 10:42:58 +00:00
parent 889ed28f52
commit bc8a2c30c4

View File

@@ -1576,8 +1576,10 @@ do_fixup:
}
/* Composite in the original format to preserve idiosyncracies */
if (picture->format == channel->pict_format)
dst = pixman_image_create_bits(picture->format,
if (!kgem_buffer_is_inplace(channel->bo) &&
(picture->pDrawable == NULL ||
picture->format == channel->pict_format))
dst = pixman_image_create_bits(channel->pict_format,
w, h, ptr, channel->bo->pitch);
else
dst = pixman_image_create_bits(picture->format, w, h, NULL, 0);
@@ -1603,7 +1605,7 @@ do_fixup:
free_pixman_pict(picture, src);
/* Then convert to card format */
if (picture->format != channel->pict_format) {
if (pixman_image_get_data(dst) != ptr) {
DBG(("%s: performing post-conversion %08x->%08x (%d, %d)\n",
__FUNCTION__,
picture->format, channel->pict_format,