Skip to contentSkip to conversation

drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers

PATCH Superseded Shashank Sharma 4 participants 6 messages May 2, 2019

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers

Framebuffer formats P01x are supported by GLK, but the function which handles CSC on plane color control register, still expectes the input buffer to be REC709. This can cause inaccurate output for direct P01x flips.

This patch checks if the color_encoding property is set to YCBCR_2020, and enables the corresponding color conversion mode on plane CSC.

PS: renamed variable plane_color_ctl to color_ctl for 80 char stuff.

Cc Ville Syrjala <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Uma Shankar <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +16 -10
index dd65d7c521c1..2d4d3128bf1f 100644
@@ -3868,24 +3868,30 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
 		to_i915(plane_state->base.plane->dev);
 	const struct drm_framebuffer *fb = plane_state->base.fb;
 	struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
-	u32 plane_color_ctl = 0;
+	u32 color_ctl = 0;
 
-	plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
-	plane_color_ctl |= glk_plane_color_ctl_alpha(plane_state);
+	color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
+	color_ctl |= glk_plane_color_ctl_alpha(plane_state);
 
 	if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) {
-		if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
-			plane_color_ctl |= PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
-		else
-			plane_color_ctl |= PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;
+		switch (plane_state->base.color_encoding) {
+		case DRM_COLOR_YCBCR_BT709:
+			color_ctl |= PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
+			break;
+		case DRM_COLOR_YCBCR_BT2020:
+			color_ctl |= PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;
+			break;
+		default:
+			color_ctl |= PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;
+		}
 
 		if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
-			plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
+			color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
 	} else if (fb->format->is_yuv) {
-		plane_color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
+		color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
 	}
 
-	return plane_color_ctl;
+	return color_ctl;
 }
 
 static int
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 39 lines · Shashank Sharma

Framebuffer formats P01x are supported by GLK, but the function which handles CSC on plane color control register, still expectes the input buffer to be REC709. This can cause inaccurate output for direct P01x flips.

This patch checks if the color_encoding property is set to YCBCR_2020, and enables the corresponding color conversion mode on plane CSC.

PS: renamed variable plane_color_ctl to color_ctl for 80 char stuff.

Cc Ville Syrjala <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Uma Shankar <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -7
index dd65d7c521c1..2d4d3128bf1f 100644
@@ -3868,24 +3868,30 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
 		to_i915(plane_state->base.plane->dev);
 	const struct drm_framebuffer *fb = plane_state->base.fb;
 	struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
-	u32 plane_color_ctl = 0;
+	u32 color_ctl = 0;
 
-	plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
-	plane_color_ctl |= glk_plane_color_ctl_alpha(plane_state);
+	color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
+	color_ctl |= glk_plane_color_ctl_alpha(plane_state);
 
 	if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) {
-		if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
-			plane_color_ctl |= PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
-		else
-			plane_color_ctl |= PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, · line 3886

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10 -0
+		switch (plane_state->base.color_encoding) {
+		case DRM_COLOR_YCBCR_BT709:
+			color_ctl |= PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;
+			break;
+		case DRM_COLOR_YCBCR_BT2020:
+			color_ctl |= PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;
+			break;
+		default:
+			color_ctl |= PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;
+		}

This isn't going to do anything without adjusting the property supported encodings as well.

Quoted 21 lines
drivers/gpu/drm/i915/intel_display.c +3 -3
 		if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
-			plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
+			color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
 	} else if (fb->format->is_yuv) {
-		plane_color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
+		color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
 	}
 
-	return plane_color_ctl;
+	return color_ctl;
 }
 
 static int
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 63 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Thursday, May 2, 2019 3:45 PM
To: Sharma, Shashank <[email protected]>
Cc: [email protected]; Syrjala, Ville <[email protected]>; Lankhorst, Maarten <[email protected]>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state

Quoted 24 lines · Shashank Sharma

Framebuffer formats P01x are supported by GLK, but the function which handles CSC on plane color control register, still expectes the input buffer to be REC709. This can cause inaccurate output for direct P01x flips.

This patch checks if the color_encoding property is set to YCBCR_2020, and enables the corresponding color conversion mode on plane CSC.

PS: renamed variable plane_color_ctl to color_ctl for 80 char stuff.

Cc Ville Syrjala <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Uma Shankar <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index dd65d7c521c1..2d4d3128bf1f 100644
@@ -3868,24 +3868,30 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state

*crtc_state,

Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +0 -1
 		to_i915(plane_state->base.plane->dev);
 	const struct drm_framebuffer *fb = plane_state->base.fb;
 	struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
-	u32 plane_color_ctl = 0;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +3 -4
+	u32 color_ctl = 0;
 
-	plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
-	plane_color_ctl |= glk_plane_color_ctl_alpha(plane_state);
+	color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
+	color_ctl |= glk_plane_color_ctl_alpha(plane_state);
 
 	if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) {
-		if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
-			plane_color_ctl |=

PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 3880

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -2
-		else
-			plane_color_ctl |=

PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+		switch (plane_state->base.color_encoding) {
+		case DRM_COLOR_YCBCR_BT709:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+			break;
+		case DRM_COLOR_YCBCR_BT2020:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;

Quoted 9 lines

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+			break;
+		default:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, · line 3886

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1 -0
+		}

This isn't going to do anything without adjusting the property supported encodings as well.

I might have not understood this comment properly, but, AFAIK, if userspace sets this property well, and we set this color_ctl bit properly, driver is setting PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 bits in GLK color control register. As GLK has a fix function plane CSC, HW will apply a different matrix internally to convert input buffer to RGB_2020 from YCBCR_2020 (earlier this would have been YCBCR_709). So I think we should see visible changes in output. Do you think otherwise ?

- Shashank

Quoted 20 lines

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 3887

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
 		if (plane_state->base.color_range ==

DRM_COLOR_YCBCR_FULL_RANGE)

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 3882

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +0 -1
-			plane_color_ctl |=

PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 3888

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1 -0
+			color_ctl |=

PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;

Quoted 13 lines
drivers/gpu/drm/i915/intel_display.c +2 -3
 	} else if (fb->format->is_yuv) {
-		plane_color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
+		color_ctl |= PLANE_COLOR_INPUT_CSC_ENABLE;
 	}
 
-	return plane_color_ctl;
+	return color_ctl;
 }
 
 static int
--

2.17.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 67 lines · Shashank
Quoted 67 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Thursday, May 2, 2019 3:45 PM
To: Sharma, Shashank <[email protected]>
Cc: [email protected]; Syrjala, Ville <[email protected]>; Lankhorst, Maarten <[email protected]>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state

Quoted 24 lines · Shashank Sharma

Framebuffer formats P01x are supported by GLK, but the function which handles CSC on plane color control register, still expectes the input buffer to be REC709. This can cause inaccurate output for direct P01x flips.

This patch checks if the color_encoding property is set to YCBCR_2020, and enables the corresponding color conversion mode on plane CSC.

PS: renamed variable plane_color_ctl to color_ctl for 80 char stuff.

Cc Ville Syrjala <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Uma Shankar <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index dd65d7c521c1..2d4d3128bf1f 100644
@@ -3868,24 +3868,30 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state

*crtc_state,

Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +0 -1
 		to_i915(plane_state->base.plane->dev);
 	const struct drm_framebuffer *fb = plane_state->base.fb;
 	struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
-	u32 plane_color_ctl = 0;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +3 -4
+	u32 color_ctl = 0;
 
-	plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
-	plane_color_ctl |= glk_plane_color_ctl_alpha(plane_state);
+	color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
+	color_ctl |= glk_plane_color_ctl_alpha(plane_state);
 
 	if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) {
-		if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
-			plane_color_ctl |=

PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 3880

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -2
-		else
-			plane_color_ctl |=

PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+		switch (plane_state->base.color_encoding) {
+		case DRM_COLOR_YCBCR_BT709:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+			break;
+		case DRM_COLOR_YCBCR_BT2020:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+			break;
+		default:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

Quoted 6 lines
Quoted 5 lines

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, · line 3886

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1 -0
+		}

This isn't going to do anything without adjusting the property supported encodings as well.

I might have not understood this comment properly, but, AFAIK, if userspace sets this property well, and we set this color_ctl bit properly, driver is setting PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 bits in GLK color control register. As GLK has a fix function plane CSC, HW will apply a different matrix internally to convert input buffer to RGB_2020 from YCBCR_2020 (earlier this would have been YCBCR_709). So I think we should see visible changes in output. Do you think otherwise ?

The property won't accept the BT2020 value. Or if it does we have a bug somewhere.

I guess tests would be nice. Maybe we should extend the kms_plane pixel format tests to check different YCbCr encodings as well? Or maybe Maarten's kms_yuv already tests this?

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

tor 2019-05-02 klockan 14:51 +0300 skrev Ville Syrjälä:

Quoted 105 lines · Shashank
Quoted 95 lines
Quoted 88 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Thursday, May 2, 2019 3:45 PM
To: Sharma, Shashank <[email protected]>
Cc: [email protected]; Syrjala, Ville <ville.syrjal [email protected]>; Lankhorst,
Maarten <[email protected]>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/GLK: Properly handle plane CSC for
BT2020 framebuffers

Quoted 31 lines · Shashank Sharma

Framebuffer formats P01x are supported by GLK, but the function which
handles CSC on plane color control register, still expectes the input
buffer to be REC709. This can cause inaccurate output for direct P01x
flips.

This patch checks if the color_encoding property is set to YCBCR_2020,
and enables the corresponding color conversion mode on plane CSC.

PS: renamed variable plane_color_ctl to color_ctl for 80 char stuff.

Cc Ville Syrjala <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Uma Shankar <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++--
--------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index dd65d7c521c1..2d4d3128bf1f 100644
@@ -3868,24 +3868,30 @@ u32 glk_plane_color_ctl(const struct
Quoted 1 line

intel_crtc_state

*crtc_state,

Quoted 18 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
 		to_i915(plane_state->base.plane->dev);
 	const struct drm_framebuffer *fb = plane_state-
Quoted 1 line

base.fb;

struct intel_plane *plane =
to_intel_plane(plane_state->base.plane);

drivers/gpu/drm/i915/intel_display.c +1 -3
-	u32 plane_color_ctl = 0;
+	u32 color_ctl = 0;
 
-	plane_color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
-	plane_color_ctl |=

glk_plane_color_ctl_alpha(plane_state);

drivers/gpu/drm/i915/intel_display.c +2 -0
+	color_ctl |= PLANE_COLOR_PLANE_GAMMA_DISABLE;
+	color_ctl |= glk_plane_color_ctl_alpha(plane_state);
 
 	if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv,

plane->id)) {

drivers/gpu/drm/i915/intel_display.c +0 -1
-		if (plane_state->base.color_encoding ==

DRM_COLOR_YCBCR_BT709)

drivers/gpu/drm/i915/intel_display.c

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +0 -1
-			plane_color_ctl |=

PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -2
-		else
-			plane_color_ctl |=

PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+		switch (plane_state->base.color_encoding) {
+		case DRM_COLOR_YCBCR_BT709:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+			break;
+		case DRM_COLOR_YCBCR_BT2020:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3 -0
+			break;
+		default:
+			color_ctl |=

PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;

Quoted 6 lines

drivers/gpu/drm/i915/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, · line 3886

Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1 -0
+		}

This isn't going to do anything without adjusting the property supported encodings as
well.

Quoted 8 lines

I might have not understood this comment properly, but, AFAIK, if userspace sets this property well, and we set this color_ctl bit properly, driver is setting PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 bits in GLK color control register. As GLK has a fix function plane CSC, HW will apply a different matrix internally to convert input buffer to RGB_2020 from YCBCR_2020 (earlier this would have been YCBCR_709). So I think we should see visible changes in output. Do you think otherwise ?

Quoted 8 lines

The property won't accept the BT2020 value. Or if it does we have a bug
somewhere.

I guess tests would be nice. Maybe we should extend the kms_plane pixel
format tests to check different YCbCr encodings as well? Or maybe Maarten's kms_yuv already tests this?

Not yet, unfortunately we have no way to set CSC in igt yet. :(

Best way to do so would be to add a igt_create_fb_yuv() which would a igt_create_fb that accepts igt color encoding and range as arguments.

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✓ Fi.CI.BAT: success for drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers

In reply to Shashank Sharma
== Series Details ==

== Series Details ==

Series: drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers
URL : https://patchwork.freedesktop.org/series/60195/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6026 -> Patchwork_12937
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/60195/revisions/1/mbox/

Known issues
------------

Here are the changes found in Patchwork_12937 that come from known issues:

### IGT changes ###

#### Possible fixes ####

* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: [DMESG-WARN][1] ([fdo#108965]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-kbl-8809g/igt@amdgpu/[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12937/fi-kbl-8809g/igt@amdgpu/[email protected]

* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: [INCOMPLETE][3] ([fdo#107718] / [fdo#110581]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-blb-e6850/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12937/fi-blb-e6850/igt@[email protected]

* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: [INCOMPLETE][5] ([fdo#108602] / [fdo#108744] / [fdo#110581]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6026/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12937/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#110581]: https://bugs.freedesktop.org/show_bug.cgi?id=110581

Participating hosts (52 -> 45)
------------------------------

Additional (1): fi-byt-j1900
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-byt-clapper fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_6026 -> Patchwork_12937

CI_DRM_6026: 2d2d8d3b9d8896c99c88307a881120885afd2ddb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4972: f052e49a43cc9704ea5f240df15dd9d3dfed68ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12937: 0809bda74a2027f28cd5aa06bafd0d08c3b0281e @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

0809bda74a20 drm/i915/GLK: Properly handle plane CSC for BT2020 framebuffers

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12937/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx