metal: allow configuring framebuffer formats
This commit is contained in:
parent
9bab4f7ce1
commit
b4ca15fec0
24 changed files with 713 additions and 58 deletions
|
|
@ -757,6 +757,40 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"Format": {
|
||||
"type": "string",
|
||||
"description": "A graphics format.\n\nThese formats are documented in https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h\n\n- Example:\n\n ```toml\n [[outputs]]\n match.serial-number = \"33K03894SL0\"\n format = \"rgb565\"\n ```\n",
|
||||
"enum": [
|
||||
"argb8888",
|
||||
"xrgb8888",
|
||||
"abgr8888",
|
||||
"xbgr8888",
|
||||
"r8",
|
||||
"gr88",
|
||||
"rgb888",
|
||||
"bgr888",
|
||||
"rgba4444",
|
||||
"rgbx4444",
|
||||
"bgra4444",
|
||||
"bgrx4444",
|
||||
"rgb565",
|
||||
"bgr565",
|
||||
"rgba5551",
|
||||
"rgbx5551",
|
||||
"bgra5551",
|
||||
"bgrx5551",
|
||||
"argb1555",
|
||||
"xrgb1555",
|
||||
"argb2101010",
|
||||
"xrgb2101010",
|
||||
"abgr2101010",
|
||||
"xbgr2101010",
|
||||
"abgr16161616",
|
||||
"xbgr16161616",
|
||||
"abgr16161616f",
|
||||
"xbgr16161616f"
|
||||
]
|
||||
},
|
||||
"GfxApi": {
|
||||
"type": "string",
|
||||
"description": "A graphics API used for rendering.",
|
||||
|
|
@ -1066,6 +1100,10 @@
|
|||
"tearing": {
|
||||
"description": "Configures the tearing settings of this output.\n\nBy default, the tearing mode is `variant3`.\n\n- Example:\n\n ```toml\n [[outputs]]\n match.serial-number = \"33K03894SL0\"\n tearing.mode = \"never\"\n ```\n",
|
||||
"$ref": "#/$defs/Tearing"
|
||||
},
|
||||
"format": {
|
||||
"description": "Configures the framebuffer format of this output.\n\nBy default, the format is `xrgb8888`.\n\n- Example:\n\n ```toml\n [[outputs]]\n match.serial-number = \"33K03894SL0\"\n format = \"rgb565\"\n ```\n",
|
||||
"$ref": "#/$defs/Format"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
|
|||
|
|
@ -1507,6 +1507,111 @@ The table has the following fields:
|
|||
The value of this field should be a boolean.
|
||||
|
||||
|
||||
<a name="types-Format"></a>
|
||||
### `Format`
|
||||
|
||||
A graphics format.
|
||||
|
||||
These formats are documented in https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[[outputs]]
|
||||
match.serial-number = "33K03894SL0"
|
||||
format = "rgb565"
|
||||
```
|
||||
|
||||
Values of this type should be strings.
|
||||
|
||||
The string should have one of the following values:
|
||||
|
||||
- `argb8888`:
|
||||
|
||||
|
||||
- `xrgb8888`:
|
||||
|
||||
|
||||
- `abgr8888`:
|
||||
|
||||
|
||||
- `xbgr8888`:
|
||||
|
||||
|
||||
- `r8`:
|
||||
|
||||
|
||||
- `gr88`:
|
||||
|
||||
|
||||
- `rgb888`:
|
||||
|
||||
|
||||
- `bgr888`:
|
||||
|
||||
|
||||
- `rgba4444`:
|
||||
|
||||
|
||||
- `rgbx4444`:
|
||||
|
||||
|
||||
- `bgra4444`:
|
||||
|
||||
|
||||
- `bgrx4444`:
|
||||
|
||||
|
||||
- `rgb565`:
|
||||
|
||||
|
||||
- `bgr565`:
|
||||
|
||||
|
||||
- `rgba5551`:
|
||||
|
||||
|
||||
- `rgbx5551`:
|
||||
|
||||
|
||||
- `bgra5551`:
|
||||
|
||||
|
||||
- `bgrx5551`:
|
||||
|
||||
|
||||
- `argb1555`:
|
||||
|
||||
|
||||
- `xrgb1555`:
|
||||
|
||||
|
||||
- `argb2101010`:
|
||||
|
||||
|
||||
- `xrgb2101010`:
|
||||
|
||||
|
||||
- `abgr2101010`:
|
||||
|
||||
|
||||
- `xbgr2101010`:
|
||||
|
||||
|
||||
- `abgr16161616`:
|
||||
|
||||
|
||||
- `xbgr16161616`:
|
||||
|
||||
|
||||
- `abgr16161616f`:
|
||||
|
||||
|
||||
- `xbgr16161616f`:
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="types-GfxApi"></a>
|
||||
### `GfxApi`
|
||||
|
||||
|
|
@ -2283,6 +2388,22 @@ The table has the following fields:
|
|||
|
||||
The value of this field should be a [Tearing](#types-Tearing).
|
||||
|
||||
- `format` (optional):
|
||||
|
||||
Configures the framebuffer format of this output.
|
||||
|
||||
By default, the format is `xrgb8888`.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[[outputs]]
|
||||
match.serial-number = "33K03894SL0"
|
||||
format = "rgb565"
|
||||
```
|
||||
|
||||
The value of this field should be a [Format](#types-Format).
|
||||
|
||||
|
||||
<a name="types-OutputMatch"></a>
|
||||
### `OutputMatch`
|
||||
|
|
|
|||
|
|
@ -1606,6 +1606,21 @@ Output:
|
|||
match.serial-number = "33K03894SL0"
|
||||
tearing.mode = "never"
|
||||
```
|
||||
format:
|
||||
ref: Format
|
||||
required: false
|
||||
description: |
|
||||
Configures the framebuffer format of this output.
|
||||
|
||||
By default, the format is `xrgb8888`.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[[outputs]]
|
||||
match.serial-number = "33K03894SL0"
|
||||
format = "rgb565"
|
||||
```
|
||||
|
||||
|
||||
Transform:
|
||||
|
|
@ -2490,3 +2505,76 @@ Libei:
|
|||
Even if the socket is disabled, application can still request access via the portal.
|
||||
|
||||
The default is `false`.
|
||||
|
||||
|
||||
Format:
|
||||
description: |
|
||||
A graphics format.
|
||||
|
||||
These formats are documented in https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[[outputs]]
|
||||
match.serial-number = "33K03894SL0"
|
||||
format = "rgb565"
|
||||
```
|
||||
kind: string
|
||||
values:
|
||||
- value: argb8888
|
||||
description: ""
|
||||
- value: xrgb8888
|
||||
description: ""
|
||||
- value: abgr8888
|
||||
description: ""
|
||||
- value: xbgr8888
|
||||
description: ""
|
||||
- value: r8
|
||||
description: ""
|
||||
- value: gr88
|
||||
description: ""
|
||||
- value: rgb888
|
||||
description: ""
|
||||
- value: bgr888
|
||||
description: ""
|
||||
- value: rgba4444
|
||||
description: ""
|
||||
- value: rgbx4444
|
||||
description: ""
|
||||
- value: bgra4444
|
||||
description: ""
|
||||
- value: bgrx4444
|
||||
description: ""
|
||||
- value: rgb565
|
||||
description: ""
|
||||
- value: bgr565
|
||||
description: ""
|
||||
- value: rgba5551
|
||||
description: ""
|
||||
- value: rgbx5551
|
||||
description: ""
|
||||
- value: bgra5551
|
||||
description: ""
|
||||
- value: bgrx5551
|
||||
description: ""
|
||||
- value: argb1555
|
||||
description: ""
|
||||
- value: xrgb1555
|
||||
description: ""
|
||||
- value: argb2101010
|
||||
description: ""
|
||||
- value: xrgb2101010
|
||||
description: ""
|
||||
- value: abgr2101010
|
||||
description: ""
|
||||
- value: xbgr2101010
|
||||
description: ""
|
||||
- value: abgr16161616
|
||||
description: ""
|
||||
- value: xbgr16161616
|
||||
description: ""
|
||||
- value: abgr16161616f
|
||||
description: ""
|
||||
- value: xbgr16161616f
|
||||
description: ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue