[PATCH v2 09/17] drm/i915: CLRC only affects YUV
Ville Syrjala
ville.syrjala at linux.intel.com
Tue Sep 10 16:08:11 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Don't poke at the sprite color correction registers on VLV/CHV when
scanning out RGB. Turns out RGB data bypasses the color correction
unit (as it does the CSC and gamma units as well).
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_sprite.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index e415b0ad4a42..ef18649e15a0 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -796,8 +796,11 @@ vlv_update_clrc(const struct intel_plane_state *plane_state)
enum plane_id plane_id = plane->id;
int contrast, brightness, sh_scale, sh_sin, sh_cos;
- if (fb->format->is_yuv &&
- plane_state->base.color_range == DRM_COLOR_YCBCR_LIMITED_RANGE) {
+ /* Seems RGB data bypasses the CLRC always */
+ if (!fb->format->is_yuv)
+ return;
+
+ if (plane_state->base.color_range == DRM_COLOR_YCBCR_LIMITED_RANGE) {
/*
* Expand limited range to full range:
* Contrast is applied first and is used to expand Y range.
--
2.21.0
More information about the Intel-gfx-trybot
mailing list