OSDN Git Service

nv30: Fix creation of scanout buffers
authorHans de Goede <hdegoede@redhat.com>
Wed, 12 Aug 2015 11:39:42 +0000 (13:39 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 4 Sep 2015 20:07:08 +0000 (16:07 -0400)
commit3329703eb116a7ad73bc694356b43e014532240b
tree92f06c5b08b98e3b79cf4ac3d3c619b1117830b3
parent48de40ce9c45de154965490843f9e50407970c26
nv30: Fix creation of scanout buffers

Scanout buffers on nv30 must always be non-swizzled and have special
width alignment constraints.

These constrains have been taken from the xf86-video-nouveau
src/nv_accel_common.c: nouveau_allocate_surface() function.

nouveau_allocate_surface() applies these width constraints only when a
tiled attribute is set, which it sets for all surfaces allocated via
dri, and this "tiling" is not the same as swizzling, scanout surfaces
must be linear / have a uniform_pitch or only complete garbage is shown.

This commit fixes dri3 on nv30 showing a garbled display, with dri3 the
scanout buffers are allocated by mesa, rather then by the ddx, and the
wrong stride of these buffers was causing the garbled display.

Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv30/nv30_miptree.c