Fix errors pointed out by jonls

Signed-off-by: Mattias Andrée <maandree@operamail.com>
Merge changes to gamma-drm and resolve merge conflicts

Signed-off-by: Mattias Andrée <maandree@operamail.com>