sna: Expand packed KMS structs for 64-bit alignment
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 Oct 2013 20:53:16 +0000 (21:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 Oct 2013 20:57:44 +0000 (21:57 +0100)
commita63b4d5a0766a7e98efeff8dd520c58e9a1bea88
tree857ac6a943d1281088c22d531c0c3490699bf3de
parentdc072db862372f1424195c0c774d10f148b0fcc6
sna: Expand packed KMS structs for 64-bit alignment

Pavel Roskin found that with a 32-bit build of the DDX with a 64-bit
kernel that the call to GETCONNECTOR was overwriting the 4 bytes beyond
the end of the drm_mode_get_connector structure. This would appear to be
due to the surreptious padding inserted by the compiler so that the
structure would be naturally aligned on a 64-bit system. To compenstate
we need to insert padding between the adjacent 32-bit structures on the
stack.

As usual, be paranoid and make sure that all the adjacent KMS structs we
use are padded out to an 64-bit boundary.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_display.c