drm/fourcc: Add AXBXGXRX106106106106 format
Subsystems (2)
PATCH v3 1/1 drm/fourcc: Add AXBXGXRX106106106106 format
Add ABGR format with 10-bit components packed in 64-bit per pixel. This format can be used to handle VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 on little-endian architectures.
Signed-off-by Matteo Franchin <[email protected]>
Reviewed-by Brian Starkey <[email protected]>
Acked-by Daniel Vetter <[email protected]>
--- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 6 ++++++ 2 files changed, 7 insertions(+)
drivers/gpu/drm/drm_fourcc.c +1 -0
@@ -202,6 +202,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, + { .format = DRM_FORMAT_AXBXGXRX106106106106, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_RGB888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_BGR888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_XRGB8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
include/uapi/drm/drm_fourcc.h +6 -0
@@ -179,6 +179,12 @@ extern "C" {#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H')/* [63:0] A:R:G:B 16:16:16:16 little endian */ #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H')/* [63:0] A:B:G:R 16:16:16:16 little endian */ +/* +* RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits +* of unused padding per component: +*/ +#define DRM_FORMAT_AXBXGXRX106106106106 fourcc_code('A', 'B', '1', '0')/* [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian */ +/* packed YCbCr */ #define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V')/* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ #define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U')/* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
v3 includes the Signed-off-by and Acked-by lines in the commit. No other changes.
At this point, I'd need some help from a maintainer/committer to merge this, I understand.
Daniel Vetter, are you happy to do this or does this work differently?
Many thanks,
Matteo
Quoted 44 lines · Matteo Franchin
Add ABGR format with 10-bit components packed in 64-bit per pixel. This format can be used to handle
VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16on little-endian architectures.Signed-off-by Matteo Franchin <[email protected]>Reviewed-by Brian Starkey <[email protected]>Acked-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 6 ++++++ 2 files changed, 7 insertions(+)drivers/gpu/drm/drm_fourcc.c +1
-0@@ -202,6 +202,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, + { .format = DRM_FORMAT_AXBXGXRX106106106106, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_RGB888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_BGR888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_XRGB8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },include/uapi/drm/drm_fourcc.h +6
-0@@ -179,6 +179,12 @@ extern "C" {#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H')/* [63:0] A:R:G:B 16:16:16:16 little endian */ #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H')/* [63:0] A:B:G:R 16:16:16:16 little endian */ +/* +* RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits +* of unused padding per component: +*/ +#define DRM_FORMAT_AXBXGXRX106106106106 fourcc_code('A', 'B', '1', '0')/* [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian */ +/* packed YCbCr */ #define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V')/* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ #define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U')/* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ Signature · 1 line
2.17.1