diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2022-03-03 18:13:07 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2023-10-24 09:45:09 +0200 |
commit | bf462d03118f5e0266647ea307f061d3ed1c0a2e (patch) | |
tree | dbd2470e9be126330101707e54b9db48b0d1569c | |
parent | c895650f5de52b6ddcbf4594374db94e5ae76c7a (diff) |
modetest: add support for DRM_FORMAT_C[124]
Add support for creating buffers using the new color-indexed frame
buffer formats with two, four, and sixteen colors.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
- Add Reviewed-by,
v4:
- No changes,
v3:
- Add Acked-by,
v2:
- Split off changes to tests/modetest/buffers.c.
-rw-r--r-- | tests/modetest/buffers.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index c122fb3f..65f1cfb3 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -124,6 +124,18 @@ bo_create(int fd, unsigned int format, int ret; switch (format) { + case DRM_FORMAT_C1: + bpp = 1; + break; + + case DRM_FORMAT_C2: + bpp = 2; + break; + + case DRM_FORMAT_C4: + bpp = 4; + break; + case DRM_FORMAT_C8: case DRM_FORMAT_NV12: case DRM_FORMAT_NV21: @@ -292,6 +304,9 @@ bo_create(int fd, unsigned int format, planes[2] = virtual + offsets[2]; break; + case DRM_FORMAT_C1: + case DRM_FORMAT_C2: + case DRM_FORMAT_C4: case DRM_FORMAT_C8: case DRM_FORMAT_ARGB4444: case DRM_FORMAT_XRGB4444: |