drm/i915: Add Plane color encoding support for YCBCR_BT2020
Subsystems (3)
PATCH v3 1/1 drm/i915: Add Plane color encoding support for YCBCR_BT2020
Currently the plane property doesn't have support for YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.
V2: Enabling support for YCBCT_BT2020 for HDR planes on
platforms GLK & ICL
V3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling in glk_plane_color_ctl.
--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +9 -3
@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, plane_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->hw.color_encoding ==DRM_COLOR_YCBCR_BT709 ) +switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709 ; -else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 ; +break ; +default : plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709 ; - + }if (plane_state->hw.color_range ==DRM_COLOR_YCBCR_FULL_RANGE ) plane_color_ctl |=PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE ; }else if (fb->format->is_yuv) {
drivers/gpu/drm/i915/display/intel_sprite.c +15 -2
@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;
@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,DRM_MODE_ROTATE_0 , supported_rotations); + supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) |BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes +*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); + drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc, BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | BIT(DRM_COLOR_YCBCR_FULL_RANGE), DRM_COLOR_YCBCR_BT709,
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 64 lines · Kishore Kadiyala
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +9
-3@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, plane_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->hw.color_encoding ==DRM_COLOR_YCBCR_BT709 ) +switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709 ; -else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 ; +break ; +default : plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709 ; - + }if (plane_state->hw.color_range ==DRM_COLOR_YCBCR_FULL_RANGE ) plane_color_ctl |=PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE ; }else if (fb->format->is_yuv) {drivers/gpu/drm/i915/display/intel_sprite.c +3
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,DRM_MODE_ROTATE_0 , supported_rotations); + supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) |BIT (DRM_COLOR_YCBCR_BT709 ); +
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3120
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_sprite.c +10
-0+/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes +*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 );
IOW,
if (IS_GEN(dev_priv, 10) || IS_GEMINILAKE(dev_priv) ||
icl_is_hdr_plane(dev_priv, plane_id))
supported_csc |= BIT(DRM_COLOR_YCBCR_BT2020);Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-2+ drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc, BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | BIT(DRM_COLOR_YCBCR_FULL_RANGE), DRM_COLOR_YCBCR_BT709,
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 101 lines
-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Wednesday, April 8, 2020 5:13 PM
To: Kadiyala, Kishore <[email protected]>; intel- [email protected]
Cc: Kadiyala, Kishore <[email protected]>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct
Quoted 27 lines · Kishore Kadiyala
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const struct
intel_crtc_state*crtc_state,drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-1plane_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->hw.color_encoding ==
DRM_COLOR_YCBCR_BT709)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-1-else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+break ; +default : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- + } if (plane_state->hw.color_range ==
DRM_COLOR_YCBCR_FULL_RANGE)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct · line 4823
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +0
-0plane_color_ctl |=
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0}else if (fb->format->is_yuv) {drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct drm_i915_private
*dev_priv,drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct
drm_i915_private*dev_priv,Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +3
-0DRM_MODE_ROTATE_0 , supported_rotations); + supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) | +BIT (DRM_COLOR_YCBCR_BT709 ); +drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3120
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_sprite.c +10
-0+/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes +*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 );IOW,
Quoted 4 lines
if (IS_GEN(dev_priv, 10) || IS_GEMINILAKE(dev_priv) ||
icl_is_hdr_plane(dev_priv, plane_id))
supported_csc |= BIT(DRM_COLOR_YCBCR_BT2020);Got it Jani,
Thanks,
Kishore
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-2+ drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc,
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE)|Quoted 1 line
Quoted 5 lines
BIT(DRM_COLOR_YCBCR_FULL_RANGE),Quoted 1 line
DRM_COLOR_YCBCR_BT709,--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 59 lines · Kishore Kadiyala
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +9
-3@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, plane_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->hw.color_encoding ==DRM_COLOR_YCBCR_BT709 ) +switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709 ; -else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 ; +break ; +default : plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709 ; - + }if (plane_state->hw.color_range ==DRM_COLOR_YCBCR_FULL_RANGE ) plane_color_ctl |=PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE ; }else if (fb->format->is_yuv) {drivers/gpu/drm/i915/display/intel_sprite.c +1
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3114
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c +6
-0@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,DRM_MODE_ROTATE_0 , supported_rotations); + supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) |BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes
What issues are those?
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_sprite.c +8
-2+*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); + drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc, BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | BIT(DRM_COLOR_YCBCR_FULL_RANGE), DRM_COLOR_YCBCR_BT709,Signature · 1 line
2.17.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 85 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 6:17 PM
To: Kadiyala, Kishore <[email protected]>
Cc: [email protected]; Shankar, Uma <[email protected]>; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state
Quoted 27 lines · Kishore Kadiyala
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-1plane_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->hw.color_encoding ==
DRM_COLOR_YCBCR_BT709)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-1-else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+break ; +default : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- + } if (plane_state->hw.color_range ==
DRM_COLOR_YCBCR_FULL_RANGE)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 4823
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +0
-0plane_color_ctl |=
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0}else if (fb->format->is_yuv) {drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct drm_i915_private
*dev_priv,drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct drm_i915_private
*dev_priv,Quoted 3 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_MODE_ROTATE_0 , supported_rotations);
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3114
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_sprite.c +7
-0+ supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) | +BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes What issues are those?
There was an issue on some of the hardcoded matrix values used in SDR planes, hence it would be good to not enable BT2020 conversion on SDR planes in ICL+ till this gets resolved.
Reference WA: #220884772
"Incorrect plane CSC coefficients for sRGB to Bt2020 :
SDR planes PLANE_COLOR_CTL Plane CSC Mode 100b, RGB709 to RGB2020,
uses hardcoded R-Y coefficient of 0.75 instead of 0.625, resulting in incorrect BT2020 color conversion. WA: Limit RGB709 to RGB2020 conversion to the HDR capable planes"
@Kishore : Please add this as comment here.
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv,
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_sprite.c +8
-2+*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); + drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc,
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE)|
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-1BIT (DRM_COLOR_YCBCR_FULL_RANGE ), DRM_COLOR_YCBCR_BT709, --2.17.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 98 lines
Quoted 88 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 6:17 PM
To: Kadiyala, Kishore <[email protected]>
Cc: [email protected]; Shankar, Uma <[email protected]>; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020Quoted 27 lines · Kishore Kadiyala
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const structQuoted 1 line
intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-1plane_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->hw.color_encoding ==
DRM_COLOR_YCBCR_BT709)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-1-else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+break ; +default : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- + } if (plane_state->hw.color_range ==
DRM_COLOR_YCBCR_FULL_RANGE)Quoted 1 line
plane_color_ctl|=
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0}else if (fb->format->is_yuv) {drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct
drm_i915_private
*dev_priv,Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct
drm_i915_private
*dev_priv,Quoted 3 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_MODE_ROTATE_0 , supported_rotations);Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3114
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_sprite.c +7
-0+ supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) | +BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes What issues are those?
Quoted 9 lines
There was an issue on some of the hardcoded matrix values used in SDR planes, hence it would be good to not enable BT2020 conversion on SDR planes in ICL+ till this gets resolved.
Reference WA: #220884772
"Incorrect plane CSC coefficients for sRGB to Bt2020 :
SDR planesPLANE_COLOR_CTLPlane CSC Mode 100b, RGB709 to RGB2020, uses hardcoded R-Y coefficient of 0.75 instead of 0.625, resulting in incorrect BT2020 color conversion. WA: Limit RGB709 to RGB2020 conversion to the HDR capable planes"
Also this is applicable only for ICL, so we can enable this from gen12 onwards.
Quoted 20 lines
@Kishore : Please add this as comment here.
Quoted 18 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3123
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_sprite.c +8
-2+*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); + drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc,
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE)|Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-1BIT (DRM_COLOR_YCBCR_FULL_RANGE ), DRM_COLOR_YCBCR_BT709, --2.17.1
Quoted 7 lines
Quoted 3 lines
--
Ville Syrjälä
Intel_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 95 lines · Uma
Quoted 85 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 6:17 PM
To: Kadiyala, Kishore <[email protected]>
Cc: [email protected]; Shankar, Uma <[email protected]>; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state
Quoted 27 lines · Kishore Kadiyala
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-1plane_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->hw.color_encoding ==
DRM_COLOR_YCBCR_BT709)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-1-else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+break ; +default : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- + } if (plane_state->hw.color_range ==
DRM_COLOR_YCBCR_FULL_RANGE)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state · line 4823
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +0
-0plane_color_ctl |=
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0}else if (fb->format->is_yuv) {drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct drm_i915_private
*dev_priv,drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct drm_i915_private
*dev_priv,Quoted 3 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_MODE_ROTATE_0 , supported_rotations);Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3114
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_sprite.c +7
-0+ supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) | +BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes What issues are those?
Quoted 8 lines
There was an issue on some of the hardcoded matrix values used in SDR planes, hence it would be good to not enable BT2020 conversion on SDR planes in ICL+ till this gets resolved.
Reference WA: #220884772
"Incorrect plane CSC coefficients for sRGB to Bt2020 :
SDR planesPLANE_COLOR_CTLPlane CSC Mode 100b, RGB709 to RGB2020,
uses hardcoded R-Y coefficient of 0.75 instead of 0.625, resulting in incorrect BT2020 color conversion. WA: Limit RGB709 to RGB2020 conversion to the HDR capable planes"
That only matters for RGB->RGB conversion, which has nothing to do with this patch.
Quoted 24 lines
@Kishore : Please add this as comment here.
Quoted 21 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv,
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_sprite.c +8
-2+*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); + drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc,
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE)|Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-1BIT (DRM_COLOR_YCBCR_FULL_RANGE ), DRM_COLOR_YCBCR_BT709, --2.17.1
--
Ville Syrjälä
Intel
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 121 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 7:08 PM
To: Shankar, Uma <[email protected]>
Cc: Kadiyala, Kishore <[email protected]>; [email protected]; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020Quoted 12 lines · Uma
Quoted 12 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 6:17 PM
To: Kadiyala, Kishore <[email protected]>
Cc: [email protected]; Shankar, Uma <[email protected]>; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020Quoted 3 lines
Quoted 3 lines · Kishore Kadiyala
Quoted 2 lines
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode onplane CSC.
Quoted 85 lines
Quoted 75 lines
Quoted 26 lines
In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.
V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const structQuoted 1 line
intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-1plane_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->hw.color_encoding ==
DRM_COLOR_YCBCR_BT709)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-1-else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+break ; +default : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- + } if (plane_state->hw.color_range ==
DRM_COLOR_YCBCR_FULL_RANGE)Quoted 1 line
plane_color_ctl|=
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;Quoted 8 lines
} else if (
fb->format->is_yuv) { diff --gita/drivers/gpu/drm/i915/display/intel_sprite.cb/drivers/gpu/drm/i915/display/intel_sprite.cindexdeda351719db..237c4b951f02100644drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct
drm_i915_private
*dev_priv,Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct
drm_i915_private
*dev_priv,Quoted 3 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_MODE_ROTATE_0 , supported_rotations);Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3114
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_sprite.c +7
-0+ supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) | +BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3 +* as there are issues seen with SDR planes What issues are those?
Quoted 8 lines
There was an issue on some of the hardcoded matrix values used in SDR planes, hence it would be good to not enable BT2020 conversion on SDR planes in ICL+ till this gets resolved.
Reference WA: #220884772
"Incorrect plane CSC coefficients for sRGB to Bt2020 :
SDR planesPLANE_COLOR_CTLPlane CSC Mode 100b, RGB709 to RGB2020, uses hardcoded R-Y coefficient of 0.75 instead of 0.625, resulting in incorrect BT2020 color conversion. WA: Limit RGB709 to RGB2020 conversion to
Quoted 4 lines
the HDR capable planes"
That only matters for
RGB->RGBconversion, which has nothing to do with this patch.
Oh yeah my bad, this is just for RGB specific conversion only, please ignore my comments.
Quoted 21 lines
Quoted 21 lines
@Kishore : Please add this as comment here.
Quoted 18 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3123
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_sprite.c +8
-2+*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); + drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc,
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE)|Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-1BIT (DRM_COLOR_YCBCR_FULL_RANGE ), DRM_COLOR_YCBCR_BT709, --2.17.1
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
--
Ville Syrjälä
Intel--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 135 lines
-----Original Message-----
From: Shankar, Uma <[email protected]>
Sent: Wednesday, April 8, 2020 7:24 PM
To: Ville Syrjälä <[email protected]>
Cc: Kadiyala, Kishore <[email protected]>; intel- [email protected]; Nikula, Jani <[email protected]>
Subject: RE: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020Quoted 102 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 7:08 PM
To: Shankar, Uma <[email protected]>
Cc: Kadiyala, Kishore <[email protected]>; [email protected]; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020Quoted 12 lines · Uma
Quoted 12 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Wednesday, April 8, 2020 6:17 PM
To: Kadiyala, Kishore <[email protected]>
Cc: [email protected]; Shankar, Uma <[email protected]>; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v3] drm/i915: Add Plane color encoding support forYCBCR_BT2020Quoted 4 lines
Quoted 4 lines · Kishore Kadiyala
Quoted 3 lines
Currently the plane property doesn't have support for
YCBCR_BT2020, which enables the corresponding color conversion mode onplane CSC.
Quoted 75 lines
Quoted 75 lines
Quoted 26 lines
In ICL+ platforms , this property setting is confined only to HDR Planes as there is limitation in SDR Planes and while in GLK it set for all planes.
V2: Enabling support for
YCBCT_BT2020for HDR planes on
platforms GLK & ICLV3: Refined the condition check to handle GLK & ICL+ HDR planes
Also added BT2020 handling inglk_plane_color_ctl.Cc Ville Syrjala <[email protected]>Cc Uma Shankar <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Kishore Kadiyala <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_sprite.c | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -4808,11 +4808,17 @@ u32 glk_plane_color_ctl(const structQuoted 1 line
intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-1plane_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->hw.color_encoding ==
DRM_COLOR_YCBCR_BT709)drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+switch (plane_state->hw.color_encoding) { +case DRM_COLOR_YCBCR_BT709 : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-1-else +break ; +case DRM_COLOR_YCBCR_BT2020 : + plane_color_ctl |= +PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+break ; +default : plane_color_ctl |=
PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709;drivers/gpu/drm/i915/display/intel_display.c u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- + } if (plane_state->hw.color_range ==
DRM_COLOR_YCBCR_FULL_RANGE)Quoted 1 line
plane_color_ctl|=
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;Quoted 8 lines
} else if (
fb->format->is_yuv) { diff --gita/drivers/gpu/drm/i915/display/intel_sprite.cb/drivers/gpu/drm/i915/display/intel_sprite.cindexdeda351719db..237c4b951f02100644drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -3031,6 +3031,7 @@ skl_universal_plane_create(struct
drm_i915_private
*dev_priv,Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0struct intel_plane *plane;enum drm_plane_type plane_type;unsigned int supported_rotations; +unsigned int supported_csc;const u64 *modifiers;const u32 *formats;int num_formats;@@ -3105,9 +3106,21 @@ skl_universal_plane_create(struct
drm_i915_private
*dev_priv,Quoted 3 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_MODE_ROTATE_0 , supported_rotations);Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +6
-0+ supported_csc =BIT (DRM_COLOR_YCBCR_BT601 ) | +BIT (DRM_COLOR_YCBCR_BT709 ); + +/* +* Setting the CSC BT2020 for all the planes in case of GLK +* While for ICL+ platforms it is set only for HDR planes 1 through 3
Quoted 13 lines
Quoted 13 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3114
Quoted 1 line
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0+* as there are issues seen with SDR planes What issues are those?
There was an issue on some of the hardcoded matrix values used in SDR planes, hence it would be good to not enable BT2020 conversion on SDR planes in ICL+ till this gets resolved. Reference WA: #220884772
"Incorrect plane CSC coefficients for sRGB to Bt2020 :
SDR planesPLANE_COLOR_CTLPlane CSC Mode 100b, RGB709 to RGB2020, uses hardcoded R-Y coefficient of 0.75 instead of 0.625, resulting in incorrect BT2020 color conversion. WA: Limit RGB709 to RGB2020 conversion to
Quoted 7 lines
Quoted 4 lines
the HDR capable planes"
That only matters for
RGB->RGBconversion, which has nothing to do with this patch.Oh yeah my bad, this is just for RGB specific conversion only, please ignore my comments.
I will drop the HDR plane check and post the updated.
Regards,
Kishore
Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
@Kishore : Please add this as comment here.
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +6
-0+*/ +if ((INTEL_GEN (dev_priv) ==10 ) ||IS_GEMINILAKE (dev_priv)) + supported_csc |=BIT (DRM_COLOR_YCBCR_BT2020 ); +else +if (icl_is_hdr_plane (dev_priv, plane_id)) + supported_csc |=
BIT(DRM_COLOR_YCBCR_BT2020);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c skl_universal_plane_create(struct drm_i915_private *dev_priv, · line 3123
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-2+ drm_plane_create_color_properties(&plane->base, - BIT(DRM_COLOR_YCBCR_BT601) | - BIT(DRM_COLOR_YCBCR_BT709), + supported_csc,
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE)|Quoted 1 line
Quoted 12 lines
BIT(DRM_COLOR_YCBCR_FULL_RANGE),Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
DRM_COLOR_YCBCR_BT709,
--
2.17.1--
Ville Syrjälä
Intel--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx