drm/i915/display: Attach content type property for LSPCON
authorUma Shankar <uma.shankar@intel.com>
Mon, 30 Nov 2020 20:47:29 +0000 (02:17 +0530)
committerUma Shankar <uma.shankar@intel.com>
Tue, 1 Dec 2020 19:52:31 +0000 (01:22 +0530)
Content type is supported on HDMI sink devices. Attached the
property for the same for LSPCON based devices.

v2: Added the content type programming when we are attaching
the property to connector, as suggested by Ville.

v3: Need to attach content type on intel_dp_add_properties
as creating of new properties is not possible at late_register.

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

index 5aaa06d7360984cfd7953b6207cb80a18999b157..69de163be776c5b0843263560760642be9869aa8 100644 (file)
@@ -7195,6 +7195,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
 
        intel_attach_colorspace_property(connector);
 
+       if (intel_bios_is_lspcon_present(dev_priv, port))
+               drm_connector_attach_content_type_property(connector);
+
        if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) >= 11)
                drm_object_attach_property(&connector->base,
                                           connector->dev->mode_config.hdr_output_metadata_property,
index 9552dfc55e207cf8bf0fc84c18ea3f9bb6333f34..0a4c05d671088d2eb720b72a452ec4002e91ddea 100644 (file)
@@ -539,6 +539,8 @@ void lspcon_set_infoframes(struct intel_encoder *encoder,
                frame.avi.ycc_quantization_range = HDMI_YCC_QUANTIZATION_RANGE_LIMITED;
        }
 
+       drm_hdmi_avi_infoframe_content_type(&frame.avi, conn_state);
+
        ret = hdmi_infoframe_pack(&frame, buf, sizeof(buf));
        if (ret < 0) {
                DRM_ERROR("Failed to pack AVI IF\n");