When HDMI output is other than RGB, we have to load the
corresponding colorspace of output mode. This patch fills
the colorspace of AVI infoframe as per the HDMI output mode.

V2: Rebase
V3: Rebase
V4: Rebase
V5: Added r-b from Ander

Cc: Ville Syrjala <ville.syrj...@linux.intel.com>
Cc: Ander Conselvan de Oliveira <conselv...@gmail.com>

Reviewed-by: Ander Conselvan de Oliveira <conselv...@gmail.com>
Signed-off-by: Shashank Sharma <shashank.sha...@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c 
b/drivers/gpu/drm/i915/intel_hdmi.c
index 948cbce..ba1559e 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -472,6 +472,14 @@ static void intel_hdmi_set_avi_infoframe(struct 
drm_encoder *encoder,
                return;
        }
 
+       ret = drm_hdmi_avi_infoframe_set_colorspace(&frame.avi,
+                                                   adjusted_mode,
+                                                   crtc_state->hdmi_output);
+       if (ret < 0) {
+               DRM_ERROR("couldn't fill AVI colorspace\n");
+               return;
+       }
+
        drm_hdmi_avi_infoframe_quant_range(&frame.avi, adjusted_mode,
                                           crtc_state->limited_color_range ?
                                           HDMI_QUANTIZATION_RANGE_LIMITED :
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to