OSDN Git Service

gallium/winsys/kms: Fully initialize kms_sw_dt at prime import time (v2)
authorTomasz Figa <tfiga@chromium.org>
Tue, 2 Aug 2016 10:46:26 +0000 (19:46 +0900)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 1 Sep 2016 10:39:45 +0000 (11:39 +0100)
commit731e6575e6c2d7b97bf3108c5bd19a286b79ae1a
treeaacd3d6b9b0065e7e63b1f002a3c5181fc90feea
parentab157ffd86f976a005108b2d5e72e38b482cd261
gallium/winsys/kms: Fully initialize kms_sw_dt at prime import time (v2)

Currently kms_sw_displaytarget_add_from_prime() allocates the struct and
fills in only some of the fields, resulting in a half-baked struct that
needs to be further completed by the caller. To make this a bit more
consistent, pass width, height and stride to this function and fill in
everything there, so that caller can take the returned struct as is.

v2: Split from one big patch into four fixing one thing at a time.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit e71b78ebf9a405f2831826de2cb2d4ebb8658262)
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c