]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/i915/icl: Fix Y pre-offset for Full Range YCbCr
authorUma Shankar <uma.shankar@intel.com>
Fri, 28 Jun 2019 08:02:29 +0000 (13:32 +0530)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 10 Jul 2019 12:32:53 +0000 (15:32 +0300)
Fixed Y Pre-offset in case of Full Range YCbCr.

v2: Rebase

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628080230.27492-3-uma.shankar@intel.com
drivers/gpu/drm/i915/display/intel_sprite.c

index aeeeffbe4683afd56c7f99f10e3a6f3a70e19343..57b0d70f4d7bd597fdb2420210e0ebe5aa1f9bd0 100644 (file)
@@ -516,8 +516,11 @@ icl_program_input_csc(struct intel_plane *plane,
 
        I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 0),
                      PREOFF_YUV_TO_RGB_HI);
-       I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1),
-                     PREOFF_YUV_TO_RGB_ME);
+       if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
+               I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1), 0);
+       else
+               I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1),
+                             PREOFF_YUV_TO_RGB_ME);
        I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 2),
                      PREOFF_YUV_TO_RGB_LO);
        I915_WRITE_FW(PLANE_INPUT_CSC_POSTOFF(pipe, plane_id, 0), 0x0);