gbm/dri: Fix sign-extension in modifier query
authorDaniel Stone <daniels@collabora.com>
Tue, 2 May 2017 18:44:38 +0000 (19:44 +0100)
committerDaniel Stone <daniels@collabora.com>
Tue, 2 May 2017 18:55:13 +0000 (19:55 +0100)
commit80ac89a952930f068a058a9eee3c2536832b10c9
tree1f8d11ed8496e865caf761384ed81d2854702647
parentfba6559a1e76a22135b14490fdf5a6f1de1ae272
gbm/dri: Fix sign-extension in modifier query

When we were assembling the unsigned 64-bit query return from its
two signed 32-bit component parts, the lower half was getting
sign-extended into the top half. Be more explicit about what we want to
do.

Fixes gbm_bo_get_modifier() returning ((1 << 64) - 1) rather than
((1 << 56) - 1), i.e. DRM_FORMAT_MOD_INVALID.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
src/gbm/backends/dri/gbm_dri.c