drm/i915: Fix the i915_dsc_fec_support debugfs file for DP MST connectors
authorImre Deak <imre.deak@intel.com>
Tue, 9 Jun 2020 18:41:40 +0000 (21:41 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 11 Jun 2020 10:36:38 +0000 (13:36 +0300)
DSC is not supported on DP MST streams so just don't add this entry for
MST connectors.

This also fixes an OOPS, caused by the encoder->digport cast, which is
not valid for MST encoders.

v2:
- Check encoder, which is unset for an MST connector, before it gets
  enabled.
v3:
- Just don't add this debugfs file for MST connectors. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200609184140.4937-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display_debugfs.c

index 3d9dc27478b334d024b2cd5b569d1cd4dfaf811a..852f64946b96bf6ac6be1346274c11c0d6982b13 100644 (file)
@@ -2224,7 +2224,8 @@ int intel_connector_debugfs_add(struct drm_connector *connector)
        }
 
        if (INTEL_GEN(dev_priv) >= 10 &&
-           (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
+           ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
+             !to_intel_connector(connector)->mst_port) ||
             connector->connector_type == DRM_MODE_CONNECTOR_eDP))
                debugfs_create_file("i915_dsc_fec_support", S_IRUGO, root,
                                    connector, &i915_dsc_fec_support_fops);