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.

Cc: Ville Syrjala <[email protected]>
Cc: Ander Conselvan De Oliveira <[email protected]>
Signed-off-by: Shashank Sharma <[email protected]>
---
 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 f0826a5..6999f63 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

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to