utils: gen-formats: Support big-endian DRM formats
DRM 4CCs are defined in little-endian, and can be declined in a big-endian version by setting bit 31 (DRM_FORMAT_BIG_ENDIAN) in the 4CC value. Add support for such formats in the gen-formats.py script. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
78f49d5e34
commit
7c496f1c54
1 changed files with 4 additions and 1 deletions
|
@ -59,10 +59,13 @@ def generate_h(formats, drm_fourcc):
|
||||||
|
|
||||||
for format in formats:
|
for format in formats:
|
||||||
name, format = format.popitem()
|
name, format = format.popitem()
|
||||||
|
fourcc = drm_fourcc.fourcc(format['fourcc'])
|
||||||
|
if format.get('big-endian'):
|
||||||
|
fourcc += '| DRM_FORMAT_BIG_ENDIAN'
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'fourcc': drm_fourcc.fourcc(format['fourcc']),
|
'fourcc': fourcc,
|
||||||
'mod': '0, 0',
|
'mod': '0, 0',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue