drm/fourcc: fix Amlogic format modifier masks
authorSimon Ser <contact@emersion.fr>
Sun, 10 Jan 2021 12:51:03 +0000 (13:51 +0100)
committerSimon Ser <contact@emersion.fr>
Tue, 12 Jan 2021 14:52:43 +0000 (15:52 +0100)
commitcc3283f8f41f741fbaef63d0503d8fb4a7919100
tree41a78de8ef893266d80d58b555f546b5b03f4362
parentdc25e3776e8f50ff833803ad361ec709dc78f4f9
drm/fourcc: fix Amlogic format modifier masks

The comment says the layout and options use 8 bits, and the shift
uses 8 bits. However the mask is 0xf, ie. 0b00001111 (4 bits).

This could be surprising when introducing new layouts or options
that take more than 4 bits, as this would silently drop the high
bits.

Make the masks consistent with the comment and the shift.

Found when writing a drm_info patch [1].

[1]: https://github.com/ascent12/drm_info/pull/67

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression")
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210110125103.15447-1-contact@emersion.fr
include/uapi/drm/drm_fourcc.h