drm: Introduce new DRM_FORMAT_XYUV
Subsystems (2)
PATCH v5 1/2 drm: Introduce new DRM_FORMAT_XYUV
From: Stanislav Lisovskiy <[email protected]>
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.
--- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/drm_fourcc.c +1 -0
@@ -173,6 +173,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, + { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = false }, }; unsigned int i;
include/uapi/drm/drm_fourcc.h +1 -0
@@ -112,6 +112,7 @@ extern "C" {#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y')/* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V')/* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ +#define DRM_FORMAT_XYUV fourcc_code('X', 'Y', 'U', 'V')/* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ /* * 2 plane RGB + A
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Stanislav,
FYI, we are trying to add same format under a slightly different name. See https://lists.freedesktop.org/archives/dri-devel/2018-July/184598.html
Quoted 16 lines · StanLis
From: Stanislav Lisovskiy <[email protected]>
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 1 + 2 files changed, 2 insertions(+)drivers/gpu/drm/drm_fourcc.c +0
-0
drivers/gpu/drm/drm_fourcc.c const struct drm_format_info *__drm_format_info(u32 format) · line 176
Quoted 4 lines
drivers/gpu/drm/drm_fourcc.c +1
-0@@ -173,6 +173,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, + { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = false },
I would rather drop the .has_alpha = false, since these lines are long enough already.
Quoted 22 lines
drivers/gpu/drm/drm_fourcc.c +0
-0};unsigned int i;include/uapi/drm/drm_fourcc.h +1
-0@@ -112,6 +112,7 @@ extern "C" {#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y')/* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V')/* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ +#define DRM_FORMAT_XYUV fourcc_code('X', 'Y', 'U', 'V')/* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ /* * 2 plane RGB + A Signature · 6 lines
2.17.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Cheers, Alex G _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Alexandru-Cosmin Gheorghe
Hi Stanislav,
FYI, we are trying to add same format under a slightly different name.
See https://lists.freedesktop.org/archives/dri-devel/2018-
July/184598.html
So we probably just need to decide, if this should be DRM_FORMAT_XYUV or DRM_FORMAT_XYUV8888 :)
Quoted 26 lines · StanLis
Quoted 24 lines
From: Stanislav Lisovskiy <[email protected]>
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 1 + 2 files changed, 2 insertions(+)drivers/gpu/drm/drm_fourcc.c +0
-0@@ -173,6 +173,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth= 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1,
Quoted 8 lines
Quoted 4 lines
.has_alpha = true },
drivers/gpu/drm/drm_fourcc.c +1
-0+ { .format = DRM_FORMAT_XYUV, .depth= 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = false },
I would rather drop the .has_alpha = false, since these lines are long
enough already.
Sounds reasonable.
Quoted 29 lines
Quoted 27 lines
drivers/gpu/drm/drm_fourcc.c +0
-0};unsigned int i;include/uapi/drm/drm_fourcc.h +0
-0@@ -112,6 +112,7 @@ extern "C" {#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U','Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
#define
DRM_FORMAT_AYUVfourcc_code('A', 'Y', 'U',
'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
+#defineDRM_FORMAT_XYUVfourcc_code('X', 'Y', 'U',
'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian *//*
* 2 plane RGB + ASignature · 6 lines
2.17.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Best Regards, Lisovskiy Stanislav _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx