Add XYUV format support
Subsystems (3)
v10 cover Add XYUV format support
Introduced new XYUV scan-in format for framebuffer and added support for it to i915(SkyLake+).
Stanislav Lisovskiy (2):
drm: Introduce new DRM_FORMAT_XYUV
drm/i915: Adding YUV444 packed format support for skl+
drivers/gpu/drm/drm_fourcc.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ include/uapi/drm/drm_fourcc.h | 1 + 5 files changed, 21 insertions(+), 1 deletion(-)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v10 1/2 drm: Introduce new DRM_FORMAT_XYUV
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.
v6: Removed unneeded initializer for new XYUV format.
v7: Added is_yuv field initialization according to latest
drm_fourcc format structure initialization changes.
v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUV to PLANE_CTL_FORMAT_XYUV as this format doesn't support per-pixel alpha. Fixed minor code issues.
v9: Moved DRM format check to proper place in intel_framebuffer_init.
--- 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
@@ -190,6 +190,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, .is_yuv = true }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true }, + { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, }; unsigned int i;
include/uapi/drm/drm_fourcc.h +1 -0
@@ -151,6 +151,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.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v10 1/2] drm: Introduce new DRM_FORMAT_XYUV
Hi,
Quoted 8 lines · Stanislav Lisovskiy
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.v6: Removed unneeded initializer for new XYUV format.
v7: Added
is_yuvfield initialization according to latest
drm_fourccformat structure initialization changes.
Quoted 7 lines
v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.Signed-off-by Stanislav Lisovskiy <[email protected]>
I'm planning of sending a new version with my series[1], do you think this patch will get merged soon, or is there anything else that needs to be done.
[1] https://lists.freedesktop.org/archives/dri-devel/2018-August/186963.html
Quoted 36 lines
--- 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@@ -190,6 +190,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, .is_yuv = true }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true }, + { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, }; unsigned int i;include/uapi/drm/drm_fourcc.h +1
-0@@ -151,6 +151,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.1 _______________________________________________ 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
Re: [PATCH v10 1/2] drm: Introduce new DRM_FORMAT_XYUV
Quoted 20 lines · Alexandru-Cosmin Gheorghe
Hi,
Quoted 8 lines · Stanislav Lisovskiy
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.v6: Removed unneeded initializer for new XYUV format.
v7: Added
is_yuvfield initialization according to latest
drm_fourccformat structure initialization changes.Quoted 8 lines
v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.Signed-off-by Stanislav Lisovskiy <[email protected]>
Quoted 8 lines
Reviewed-by Alexandru Gheorghe <[email protected]>I'm planning of sending a new version with my series[1], do you think this patch will get merged soon, or is there anything else that needs to be done.
[1] https://lists.freedesktop.org/archives/dri-devel/2018-
August/186963.html
Hi,
I had to implement IGT test case and xf86-video-intel support for this new format(in order to check that it works with gstreamer as we have userspace requirement for this change), so currently I guess all the requirements are met. I might need to do some
minor changes in those patches though, once I get some feedback.
Quoted 53 lines
Quoted 51 lines
--- 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@@ -190,6 +190,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, .is_yuv = true }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1,.is_yuv = true },
{ .format =DRM_FORMAT_AYUV, .depth
= 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = 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, .is_yuv = true },
drivers/gpu/drm/drm_fourcc.c +0
-0};unsigned int i;include/uapi/drm/drm_fourcc.h +0
-0@@ -151,6 +151,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.1 _______________________________________________ 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
Re: [PATCH v10 1/2] drm: Introduce new DRM_FORMAT_XYUV
Quoted 30 lines · Stanislav
Quoted 20 lines · Alexandru-Cosmin Gheorghe
Hi,
Quoted 8 lines · Stanislav Lisovskiy
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.v6: Removed unneeded initializer for new XYUV format.
v7: Added
is_yuvfield initialization according to latest
drm_fourccformat structure initialization changes.Quoted 8 lines
v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.Signed-off-by Stanislav Lisovskiy <[email protected]>Quoted 8 lines
Reviewed-by Alexandru Gheorghe <[email protected]>I'm planning of sending a new version with my series[1], do you think this patch will get merged soon, or is there anything else that needs to be done.
[1] https://lists.freedesktop.org/archives/dri-devel/2018-
August/186963.html
Quoted 7 lines
Hi,
I had to implement IGT test case and xf86-video-intel support for this new format(in order to check that it works with gstreamer as we have userspace requirement for this change), so currently I guess all the requirements are met. I might need to do some
minor changes in those patches though, once I get some feedback.
A bit offtopic do we need userspace for adding a new fourcc as well, I thought those are extempted from "must have userspace rule".
Quoted 58 lines
Quoted 54 lines
Quoted 52 lines
--- 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@@ -190,6 +190,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, .is_yuv = true }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1,.is_yuv = true },
{ .format =DRM_FORMAT_AYUV, .depth
= 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = 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, .is_yuv = true },
drivers/gpu/drm/drm_fourcc.c +0
-0};unsigned int i;include/uapi/drm/drm_fourcc.h +0
-0@@ -151,6 +151,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.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 3 lines
Best Regards, Lisovskiy Stanislav
Signature · 6 lines
Cheers, Alex G _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v10 1/2] drm: Introduce new DRM_FORMAT_XYUV
Quoted 49 lines · Alexandru-Cosmin Gheorghe
Quoted 39 lines · Stanislav
Quoted 27 lines · Alexandru-Cosmin Gheorghe
Hi,
Quoted 14 lines · Stanislav Lisovskiy
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.v6: Removed unneeded initializer for new XYUV format.
v7: Added
is_yuvfield initialization according to latest
drm_fourccformat structure initialization changes.v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this
format
doesn't support per-pixel alpha. Fixed minor code issues.Quoted 5 lines
v9: Moved DRM format check to proper place in
intel_framebuffer_init.Signed-off-by Stanislav Lisovskiy <[email protected]om>
Reviewed-by Alexandru Gheorghe <[email protected]m>
Quoted 8 lines
I'm planning of sending a new version with my series[1], do you think
this patch will get merged soon, or is there anything else that needs
to be done.[1] https://lists.freedesktop.org/archives/dri-devel/2018-
August/186963.htmlHi,
Quoted 8 lines
I had to implement IGT test case and xf86-video-intel support for this
new format(in order to check that it works with gstreamer as we have
userspace requirement for this change), so currently I guess all the
requirements are met. I might need to do some
minor changes in those patches though, once I get some feedback.
Quoted 2 lines
A bit offtopic do we need userspace for adding a new fourcc as well, I thought those are extempted from "must have userspace rule".
Well, at least in my case I was asked to do that. Interesting task though :)
Currently I check with GStreamer, so that video works both in textured and sprite format.
BTW, I have changed DRM_FORMAT_XYUV to DRM_FORMAT_XYUV8888 so that it is compliant with your change. As I understood we've agreed to have it called that way instead of DRM_FORMAT_XYUV. Are you ok with that?
I will then send a new patch for IGT, xf86-video-intel and drm today.
Quoted 72 lines
Quoted 70 lines
Quoted 65 lines
Quoted 63 lines
--- 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@@ -190,6 +190,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,
.is_yuv = true },
{ .format =DRM_FORMAT_VYUY, .d
epth
= 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1,
.is_yuv = true },
{ .format =DRM_FORMAT_AYUV, .d
epth
= 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1,
.has_alpha = true, .is_yuv = 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,
.is_yuv = true },drivers/gpu/drm/drm_fourcc.c +0
-0};unsigned int i;include/uapi/drm/drm_fourcc.h +0
-0@@ -151,6 +151,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.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 3 lines
Best Regards, Lisovskiy Stanislav
Signature · 7 lines
Best Regards, Lisovskiy Stanislav _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v10 1/2] drm: Introduce new DRM_FORMAT_XYUV
Quoted 53 lines · Stanislav
Quoted 49 lines · Alexandru-Cosmin Gheorghe
Quoted 39 lines · Stanislav
Quoted 27 lines · Alexandru-Cosmin Gheorghe
Hi,
Quoted 14 lines · Stanislav Lisovskiy
v5: This is YUV444 packed format same as AYUV, but without alpha,
as supported by i915.v6: Removed unneeded initializer for new XYUV format.
v7: Added
is_yuvfield initialization according to latest
drm_fourccformat structure initialization changes.v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this
format
doesn't support per-pixel alpha. Fixed minor code issues.Quoted 5 lines
v9: Moved DRM format check to proper place in
intel_framebuffer_init.Signed-off-by Stanislav Lisovskiy <[email protected]om>
Reviewed-by Alexandru Gheorghe <[email protected]m>
Quoted 8 lines
I'm planning of sending a new version with my series[1], do you think
this patch will get merged soon, or is there anything else that needs
to be done.[1] https://lists.freedesktop.org/archives/dri-devel/2018-
August/186963.htmlHi,
Quoted 8 lines
I had to implement IGT test case and xf86-video-intel support for this
new format(in order to check that it works with gstreamer as we have
userspace requirement for this change), so currently I guess all the
requirements are met. I might need to do some
minor changes in those patches though, once I get some feedback.Quoted 2 lines
A bit offtopic do we need userspace for adding a new fourcc as well, I thought those are extempted from "must have userspace rule".
Quoted 8 lines
Well, at least in my case I was asked to do that. Interesting task though :)
Currently I check with GStreamer, so that video works both in textured and sprite format.
BTW, I have changedDRM_FORMAT_XYUVtoDRM_FORMAT_XYUV8888so that it is compliant with your change. As I understood we've agreed to have it called that way instead ofDRM_FORMAT_XYUV. Are you ok with that?
Yes DRM_FORMAT_XYUV8888, it's fine by me.
Thanks.
Quoted 79 lines
I will then send a new patch for IGT, xf86-video-intel and drm today.
Quoted 72 lines
Quoted 70 lines
Quoted 65 lines
Quoted 63 lines
--- 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@@ -190,6 +190,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,
.is_yuv = true },
{ .format =DRM_FORMAT_VYUY, .d
epth
= 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1,
.is_yuv = true },
{ .format =DRM_FORMAT_AYUV, .d
epth
= 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1,
.has_alpha = true, .is_yuv = 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,
.is_yuv = true },drivers/gpu/drm/drm_fourcc.c +0
-0};unsigned int i;include/uapi/drm/drm_fourcc.h +0
-0@@ -151,6 +151,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.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 3 lines
Best Regards, Lisovskiy StanislavSignature · 3 lines
Best Regards, Lisovskiy Stanislav
Signature · 6 lines
Cheers, Alex G _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v10 2/2 drm/i915: Adding YUV444 packed format support for skl+
In reply to Stanislav LisovskiyPLANE_CTL_FORMAT_AYUV is already supported, according to hardware specification.
v2: Edited commit message, removed redundant whitespaces.
v3: Fixed fallthrough logic for the format switch cases.
v4: Yet again fixed fallthrough logic, to reuse code from other case
labels.
v5: Started to use XYUV instead of AYUV, as we don't use alpha.
v6: Removed unneeded initializer for new XYUV format.
v7: Added scaling support for DRM_FORMAT_XYUV
v8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUV to PLANE_CTL_FORMAT_XYUV as this format doesn't support per-pixel alpha. Fixed minor code issues.
v9: Moved DRM format check to proper place in intel_framebuffer_init.
v10: Added missing XYUV format to sprite planes for skl+.
--- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +1 -1
@@ -6501,7 +6501,7 @@ enum {#define PLANE_CTL_FORMAT_XRGB_2101010 (2 << 24)#define PLANE_CTL_FORMAT_XRGB_8888 (4 << 24)#define PLANE_CTL_FORMAT_XRGB_16161616F (6 << 24) -#define PLANE_CTL_FORMAT_AYUV (8 << 24) +#define PLANE_CTL_FORMAT_XYUV (8 << 24)#define PLANE_CTL_FORMAT_INDEXED (12 << 24)#define PLANE_CTL_FORMAT_RGB_565 (14 << 24)#define ICL_PLANE_CTL_FORMAT_MASK (0x1f << 23)
drivers/gpu/drm/i915/intel_display.c +15 -0
@@ -87,6 +87,7 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static const uint32_t skl_pri_planar_formats[] = {
@@ -102,6 +103,7 @@ static const uint32_t skl_pri_planar_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , +DRM_FORMAT_XYUV , DRM_FORMAT_NV12, };
@@ -2673,6 +2675,8 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)return DRM_FORMAT_RGB565 ;case PLANE_CTL_FORMAT_NV12 :return DRM_FORMAT_NV12 ; +case PLANE_CTL_FORMAT_XYUV : +return DRM_FORMAT_XYUV ;default :case PLANE_CTL_FORMAT_XRGB_8888 :if (rgb_order) {
@@ -3502,6 +3506,8 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)return PLANE_CTL_FORMAT_XRGB_2101010 ;case DRM_FORMAT_XBGR2101010 :return PLANE_CTL_ORDER_RGBX |PLANE_CTL_FORMAT_XRGB_2101010 ; +case DRM_FORMAT_XYUV : +return PLANE_CTL_FORMAT_XYUV ;case DRM_FORMAT_YUYV :return PLANE_CTL_FORMAT_YUV422 |PLANE_CTL_YUV422_YUYV ;case DRM_FORMAT_YVYU :
@@ -4960,6 +4966,7 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :break ;default : DRM_DEBUG_KMS("[PLANE:%d:%s] FB:%d unsupported scaling format 0x%x\n",
@@ -13421,6 +13428,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */
@@ -14545,6 +14553,13 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, goto err; }break ; +case DRM_FORMAT_XYUV : +if (INTEL_GEN (dev_priv) <9 ) { +DRM_DEBUG_KMS ("unsupported pixel format: %s\n" , +drm_get_format_name (mode_cmd->pixel_format, &format_name)); + goto err; + } +break ;case DRM_FORMAT_YUYV :case DRM_FORMAT_UYVY :case DRM_FORMAT_YVYU :
drivers/gpu/drm/i915/intel_sprite.c +3 -0
@@ -1266,6 +1266,7 @@ static uint32_t skl_plane_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static uint32_t skl_planar_formats[] = {
@@ -1279,6 +1280,7 @@ static uint32_t skl_planar_formats[] = {DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY ,DRM_FORMAT_NV12 , + DRM_FORMAT_XYUV, }; static const uint64_t skl_plane_format_modifiers_noccs[] = {
@@ -1420,6 +1422,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst
maintainerRe: [PATCH v10 2/2] drm/i915: Adding YUV444 packed format support for skl+
Op 02-10-18 om 13:15 schreef Stanislav Lisovskiy:
Quoted 36 lines
PLANE_CTL_FORMAT_AYUVis already supported, according to hardware specification.v2: Edited commit message, removed redundant whitespaces.
v3: Fixed fallthrough logic for the format switch cases.
v4: Yet again fixed fallthrough logic, to reuse code from other case
labels.v5: Started to use XYUV instead of AYUV, as we don't use alpha.
v6: Removed unneeded initializer for new XYUV format.
v7: Added scaling support for
DRM_FORMAT_XYUVv8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.v10: Added missing XYUV format to sprite planes for skl+.
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 6504
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -6501,7 +6501,7 @@ enum {#define PLANE_CTL_FORMAT_XRGB_2101010 (2 << 24)#define PLANE_CTL_FORMAT_XRGB_8888 (4 << 24)#define PLANE_CTL_FORMAT_XRGB_16161616F (6 << 24) -#define PLANE_CTL_FORMAT_AYUV (8 << 24) +#define PLANE_CTL_FORMAT_XYUV (8 << 24)
It's the same format as AYUV, don't add a separate definition here for it. The only difference is we ignore the alpha channel.
Quoted 16 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define PLANE_CTL_FORMAT_INDEXED (12 << 24)#define PLANE_CTL_FORMAT_RGB_565 (14 << 24)#define ICL_PLANE_CTL_FORMAT_MASK (0x1f << 23)drivers/gpu/drm/i915/intel_display.c +1
-0@@ -87,6 +87,7 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static const uint32_t skl_pri_planar_formats[] = {
drivers/gpu/drm/i915/intel_display.c static const uint32_t skl_pri_planar_formats[] = { · line 107
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -102,6 +103,7 @@ static const uint32_t skl_pri_planar_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , +DRM_FORMAT_XYUV , DRM_FORMAT_NV12,
I would add AYUV as well, only difference is blending mode used by the alpha channel..
drivers/gpu/drm/i915/intel_display.c int skl_format_to_fourcc(int format, bool rgb_order, bool alpha) · line 2679
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +2
-0};@@ -2673,6 +2675,8 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)return DRM_FORMAT_RGB565 ;case PLANE_CTL_FORMAT_NV12 :return DRM_FORMAT_NV12 ; +case PLANE_CTL_FORMAT_XYUV : +return DRM_FORMAT_XYUV ;
Use PLANE_CTL_FORMAT_AYUV here.
return alpha ? DRM_FORMAT_AYUV : DRM_FORMAT_XYUV8888.
Quoted 63 lines
drivers/gpu/drm/i915/intel_display.c +11
-0default :case PLANE_CTL_FORMAT_XRGB_8888 :if (rgb_order) {@@ -3502,6 +3506,8 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)return PLANE_CTL_FORMAT_XRGB_2101010 ;case DRM_FORMAT_XBGR2101010 :return PLANE_CTL_ORDER_RGBX |PLANE_CTL_FORMAT_XRGB_2101010 ; +case DRM_FORMAT_XYUV : +return PLANE_CTL_FORMAT_XYUV ;case DRM_FORMAT_YUYV :return PLANE_CTL_FORMAT_YUV422 |PLANE_CTL_YUV422_YUYV ;case DRM_FORMAT_YVYU :@@ -4960,6 +4966,7 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :break ;default : DRM_DEBUG_KMS("[PLANE:%d:%s] FB:%d unsupported scaling format 0x%x\n",@@ -13421,6 +13428,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */ @@ -14545,6 +14553,13 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, goto err; }break ; +case DRM_FORMAT_XYUV : +if (INTEL_GEN (dev_priv) <9 ) { +DRM_DEBUG_KMS ("unsupported pixel format: %s\n" , +drm_get_format_name (mode_cmd->pixel_format, &format_name)); + goto err; + } +break ;case DRM_FORMAT_YUYV :case DRM_FORMAT_UYVY :case DRM_FORMAT_YVYU :drivers/gpu/drm/i915/intel_sprite.c +2
-0@@ -1266,6 +1266,7 @@ static uint32_t skl_plane_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static uint32_t skl_planar_formats[] = {@@ -1279,6 +1280,7 @@ static uint32_t skl_planar_formats[] = {DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY ,DRM_FORMAT_NV12 , + DRM_FORMAT_XYUV, }; static const uint64_t skl_plane_format_modifiers_noccs[] = {
drivers/gpu/drm/i915/intel_sprite.c static bool skl_plane_format_mod_supported(struct drm_plane *_plane, · line 1428
Quoted 7 lines
drivers/gpu/drm/i915/intel_sprite.c +1
-0@@ -1420,6 +1422,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v10 2/2] drm/i915: Adding YUV444 packed format support for skl+
Quoted 35 lines · Maarten Lankhorst
Op 02-10-18 om 13:15 schreef Stanislav Lisovskiy:
Quoted 33 lines
PLANE_CTL_FORMAT_AYUVis already supported, according to hardware specification.v2: Edited commit message, removed redundant whitespaces.
v3: Fixed fallthrough logic for the format switch cases.
v4: Yet again fixed fallthrough logic, to reuse code from other case
labels.v5: Started to use XYUV instead of AYUV, as we don't use alpha.
v6: Removed unneeded initializer for new XYUV format.
v7: Added scaling support for
DRM_FORMAT_XYUVv8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.v10: Added missing XYUV format to sprite planes for skl+.
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-)
Quoted 15 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 6504
Quoted 11 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -6501,7 +6501,7 @@ enum {#define PLANE_CTL_FORMAT_XRGB_2101010 (2 << 24)#define PLANE_CTL_FORMAT_XRGB_8888 (4 << 24)#define PLANE_CTL_FORMAT_XRGB_16161616F (6 << 24) -#define PLANE_CTL_FORMAT_AYUV (8 << 24) +#define PLANE_CTL_FORMAT_XYUV (8 << 24)It's the same format as AYUV, don't add a separate definition here for it.
The only difference is we ignore the alpha channel.
Yeah, initially it was that way in my first patches, but then we agreed with Ville that it might make more sense to change it to XYUV as it doesn't have alpha.
So probably we should work on some common approach here(personally I'm fine with both).
Quoted 123 lines
Quoted 17 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define PLANE_CTL_FORMAT_INDEXED (12 << 24)#define PLANE_CTL_FORMAT_RGB_565 (14 << 24)#define ICL_PLANE_CTL_FORMAT_MASK (0x1f << 23)drivers/gpu/drm/i915/intel_display.c +1
-0@@ -87,6 +87,7 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static const uint32_t skl_pri_planar_formats[] = {drivers/gpu/drm/i915/intel_display.c static const uint32_t skl_pri_planar_formats[] · line 108
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -102,6 +103,7 @@ static const uint32_t skl_pri_planar_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , +DRM_FORMAT_XYUV , DRM_FORMAT_NV12,I would add AYUV as well, only difference is blending mode used by the alpha channel..
drivers/gpu/drm/i915/intel_display.c int skl_format_to_fourcc(int format, bool · line 2680
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +2
-0};@@ -2673,6 +2675,8 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)return DRM_FORMAT_RGB565 ;case PLANE_CTL_FORMAT_NV12 :return DRM_FORMAT_NV12 ; +case PLANE_CTL_FORMAT_XYUV : +return DRM_FORMAT_XYUV ;Use
PLANE_CTL_FORMAT_AYUVhere.
return alpha ?DRM_FORMAT_AYUV:DRM_FORMAT_XYUV8888.Quoted 81 lines
drivers/gpu/drm/i915/intel_display.c +0
-0default :case PLANE_CTL_FORMAT_XRGB_8888 :drivers/gpu/drm/i915/intel_display.c +2
-0if (rgb_order) {@@ -3502,6 +3506,8 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)return PLANE_CTL_FORMAT_XRGB_2101010 ;case DRM_FORMAT_XBGR2101010 :return PLANE_CTL_ORDER_RGBX |PLANE_CTL_FORMAT_XRGB_2101010 ; +case DRM_FORMAT_XYUV : +return PLANE_CTL_FORMAT_XYUV ;case DRM_FORMAT_YUYV :return
PLANE_CTL_FORMAT_YUV422|PLANE_CTL_YUV422_YUYV;drivers/gpu/drm/i915/intel_display.c +1
-0case DRM_FORMAT_YVYU :@@ -4960,6 +4966,7 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state, case DRM_FORMAT_UYVY:case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :break ;default :DRM_DEBUG_KMS("[PLANE:%d:%s] FB:%d unsupported
scaling format 0x%x\n",drivers/gpu/drm/i915/intel_display.c +1
-0@@ -13421,6 +13428,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane, case DRM_FORMAT_UYVY:case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;drivers/gpu/drm/i915/intel_display.c +7
-1/* fall through */ @@ -14545,6 +14553,13 @@ static int intel_framebuffer_init(structintel_framebuffer *intel_fb, goto err; }break ; +case DRM_FORMAT_XYUV : +if (INTEL_GEN (dev_priv) <9 ) { + DRM_DEBUG_KMS("unsupported pixel format: %s\n", + drm_get_format_name(mode_cmd ->pixel_format, &format_name)); + goto err; + } + break; case DRM_FORMAT_YUYV: case DRM_FORMAT_UYVY: case DRM_FORMAT_YVYU:drivers/gpu/drm/i915/intel_sprite.c +3
-0@@ -1266,6 +1266,7 @@ static uint32_t skl_plane_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static uint32_t skl_planar_formats[] = {@@ -1279,6 +1280,7 @@ static uint32_t skl_planar_formats[] = {DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY ,DRM_FORMAT_NV12 , + DRM_FORMAT_XYUV, }; static const uint64_t skl_plane_format_modifiers_noccs[] = {@@ -1420,6 +1422,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane, case DRM_FORMAT_UYVY:case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */
Signature · 7 lines
Best Regards, Lisovskiy Stanislav _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v10 2/2] drm/i915: Adding YUV444 packed format support for skl+
In reply to Maarten LankhorstQuoted 34 lines · Maarten Lankhorst
Op 02-10-18 om 13:15 schreef Stanislav Lisovskiy:
Quoted 31 lines
PLANE_CTL_FORMAT_AYUVis already supported, according to hardware specification.v2: Edited commit message, removed redundant whitespaces.
v3: Fixed fallthrough logic for the format switch cases.
v4: Yet again fixed fallthrough logic, to reuse code from other case
labels.v5: Started to use XYUV instead of AYUV, as we don't use alpha.
v6: Removed unneeded initializer for new XYUV format.
v7: Added scaling support for
DRM_FORMAT_XYUVv8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.v10: Added missing XYUV format to sprite planes for skl+.
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-)
Quoted 12 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 6504
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -6501,7 +6501,7 @@ enum {#define PLANE_CTL_FORMAT_XRGB_2101010 (2 << 24)#define PLANE_CTL_FORMAT_XRGB_8888 (4 << 24)#define PLANE_CTL_FORMAT_XRGB_16161616F (6 << 24) -#define PLANE_CTL_FORMAT_AYUV (8 << 24) +#define PLANE_CTL_FORMAT_XYUV (8 << 24)It's the same format as AYUV, don't add a separate definition here for it. The only difference is we ignore the alpha channel.
I think he's just renaming the format that's already been added to be more consistent with how we name our other PLANE_CTL_FORMAT_ definitions. I.e., all the rgb types use "XRGB" in the name.
Quoted 14 lines
Quoted 14 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define PLANE_CTL_FORMAT_INDEXED (12 << 24)#define PLANE_CTL_FORMAT_RGB_565 (14 << 24)#define ICL_PLANE_CTL_FORMAT_MASK (0x1f << 23)drivers/gpu/drm/i915/intel_display.c +1
-0@@ -87,6 +87,7 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, };
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c static const uint32_t skl_pri_planar_formats[] = { · line 107
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c +1
-0static const uint32_t skl_pri_planar_formats[] = {@@ -102,6 +103,7 @@ static const uint32_t skl_pri_planar_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , +DRM_FORMAT_XYUV , DRM_FORMAT_NV12,I would add AYUV as well, only difference is blending mode used by the alpha channel..
According to the bspec's "Display Features / Surface Formats" matrix, per-pixel alpha isn't supported for this format (and the PLANE_CTL/PLANE_COLOR_CTL descriptions seem to agree that alpha is only supported for RGB formats), so I don't think we want to expose the alpha version of this format in the userspace-visible format lists.
Matt
Quoted 88 lines
drivers/gpu/drm/i915/intel_display.c int skl_format_to_fourcc(int format, bool rgb_order, bool alpha) · line 2679
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +2
-0};@@ -2673,6 +2675,8 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)return DRM_FORMAT_RGB565 ;case PLANE_CTL_FORMAT_NV12 :return DRM_FORMAT_NV12 ; +case PLANE_CTL_FORMAT_XYUV : +return DRM_FORMAT_XYUV ;Use
PLANE_CTL_FORMAT_AYUVhere.
return alpha ?DRM_FORMAT_AYUV:DRM_FORMAT_XYUV8888.Quoted 63 lines
drivers/gpu/drm/i915/intel_display.c +11
-0default :case PLANE_CTL_FORMAT_XRGB_8888 :if (rgb_order) {@@ -3502,6 +3506,8 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)return PLANE_CTL_FORMAT_XRGB_2101010 ;case DRM_FORMAT_XBGR2101010 :return PLANE_CTL_ORDER_RGBX |PLANE_CTL_FORMAT_XRGB_2101010 ; +case DRM_FORMAT_XYUV : +return PLANE_CTL_FORMAT_XYUV ;case DRM_FORMAT_YUYV :return PLANE_CTL_FORMAT_YUV422 |PLANE_CTL_YUV422_YUYV ;case DRM_FORMAT_YVYU :@@ -4960,6 +4966,7 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :break ;default : DRM_DEBUG_KMS("[PLANE:%d:%s] FB:%d unsupported scaling format 0x%x\n",@@ -13421,6 +13428,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */ @@ -14545,6 +14553,13 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, goto err; }break ; +case DRM_FORMAT_XYUV : +if (INTEL_GEN (dev_priv) <9 ) { +DRM_DEBUG_KMS ("unsupported pixel format: %s\n" , +drm_get_format_name (mode_cmd->pixel_format, &format_name)); + goto err; + } +break ;case DRM_FORMAT_YUYV :case DRM_FORMAT_UYVY :case DRM_FORMAT_YVYU :drivers/gpu/drm/i915/intel_sprite.c +2
-0@@ -1266,6 +1266,7 @@ static uint32_t skl_plane_formats[] = {DRM_FORMAT_YVYU ,DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY , + DRM_FORMAT_XYUV, }; static uint32_t skl_planar_formats[] = {@@ -1279,6 +1280,7 @@ static uint32_t skl_planar_formats[] = {DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY ,DRM_FORMAT_NV12 , + DRM_FORMAT_XYUV, }; static const uint64_t skl_plane_format_modifiers_noccs[] = {drivers/gpu/drm/i915/intel_sprite.c static bool skl_plane_format_mod_supported(struct drm_plane *_plane, · line 1428
Quoted 7 lines
drivers/gpu/drm/i915/intel_sprite.c +1
-0@@ -1420,6 +1422,7 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY :case DRM_FORMAT_NV12 : +case DRM_FORMAT_XYUV :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */ _______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 9 lines
Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst
maintainerRe: [PATCH v10 2/2] drm/i915: Adding YUV444 packed format support for skl+
Op 24-10-18 om 19:17 schreef Matt Roper:
Quoted 46 lines · Maarten Lankhorst
Quoted 33 lines
Op 02-10-18 om 13:15 schreef Stanislav Lisovskiy:
Quoted 31 lines
PLANE_CTL_FORMAT_AYUVis already supported, according to hardware specification.v2: Edited commit message, removed redundant whitespaces.
v3: Fixed fallthrough logic for the format switch cases.
v4: Yet again fixed fallthrough logic, to reuse code from other case
labels.v5: Started to use XYUV instead of AYUV, as we don't use alpha.
v6: Removed unneeded initializer for new XYUV format.
v7: Added scaling support for
DRM_FORMAT_XYUVv8: Edited commit message to be more clear about skl+, renamed
PLANE_CTL_FORMAT_AYUVtoPLANE_CTL_FORMAT_XYUVas this format doesn't support per-pixel alpha. Fixed minor code issues.v9: Moved DRM format check to proper place in
intel_framebuffer_init.v10: Added missing XYUV format to sprite planes for skl+.
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-)Quoted 12 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 6504
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -6501,7 +6501,7 @@ enum {#define PLANE_CTL_FORMAT_XRGB_2101010 (2 << 24)#define PLANE_CTL_FORMAT_XRGB_8888 (4 << 24)#define PLANE_CTL_FORMAT_XRGB_16161616F (6 << 24) -#define PLANE_CTL_FORMAT_AYUV (8 << 24) +#define PLANE_CTL_FORMAT_XYUV (8 << 24)It's the same format as AYUV, don't add a separate definition here for it. The only difference is we ignore the alpha channel.
Quoted 4 lines
I think he's just renaming the format that's already been added to be more consistent with how we name our other
PLANE_CTL_FORMAT_definitions. I.e., all the rgb types use "XRGB" in the name.
Ah k, with your explanation it makes more sense then. :) Yeah just zap the AYUV if there's no alpha channel.
~Maarten
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Add XYUV format support (rev7)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: Add XYUV format support (rev7)
URL : https://patchwork.freedesktop.org/series/48007/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
7ef74de686fe drm: Introduce new DRM_FORMAT_XYUV
-:30: WARNING:LONG_LINE: line over 100 characters
#30: FILE: drivers/gpu/drm/drm_fourcc.c:228:
+ { .format = DRM_FORMAT_XYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },-:42: WARNING:LONG_LINE_COMMENT: line over 100 characters #42: FILE: include/uapi/drm/drm_fourcc.h:154:
+#define DRM_FORMAT_XYUV fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
total: 0 errors, 2 warnings, 0 checks, 14 lines checked bb1a2cba6c59 drm/i915: Adding YUV444 packed format support for skl+
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for Add XYUV format support (rev7)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: Add XYUV format support (rev7)
URL : https://patchwork.freedesktop.org/series/48007/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4914 -> Patchwork_10322 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10322 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10322, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48007/revisions/7/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10322:
=== IGT changes ===
==== Possible regressions ====
igt@gem_exec_basic@gtt-bsd1:
fi-pnv-d510: NOTRUN -> INCOMPLETE== Known issues ==
Here are the changes found in Patchwork_10322 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s3:
fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718)
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-bdw-samus: NOTRUN -> INCOMPLETE (fdo#107773)
==== Possible fixes ====
igt@amdgpu/amd_cs_nop@fork-gfx0:
fi-kbl-8809g: DMESG-WARN (fdo#107762) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
fi-skl-guc: FAIL (fdo#103191) -> PASS fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107762 https://bugs.freedesktop.org/show_bug.cgi?id=107762
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
== Participating hosts (44 -> 43) ==
Additional (2): fi-bdw-samus fi-pnv-d510
Missing (3): fi-bsw-cyan fi-byt-squawks fi-icl-u2
== Build changes ==
* Linux: CI_DRM_4914 -> Patchwork_10322
CI_DRM_4914: 7bb6a990d5bfa66c62bbdb97ae74c1ce5c828a19 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4660: d0975646c50568e66e65b44b81d28232d059b94e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10322: bb1a2cba6c5960f4ef4e2a444ec731f97c42d8a7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
bb1a2cba6c59 drm/i915: Adding YUV444 packed format support for skl+ 7ef74de686fe drm: Introduce new DRM_FORMAT_XYUV
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10322/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx