drm/i915: Disable DRRS on IVB/HSW port != A
authorjsg <jsg@openbsd.org>
Thu, 7 Apr 2022 07:48:23 +0000 (07:48 +0000)
committerjsg <jsg@openbsd.org>
Thu, 7 Apr 2022 07:48:23 +0000 (07:48 +0000)
From Ville Syrjala
5c66161cceaabc68912950893394e04c164ef7ad in linux 5.15.y/5.15.27
ee59792c97176f12c1da31f29fc4c2aab187f06e in mainline linux

sys/dev/pci/drm/i915/display/intel_drrs.c

index 7bee3e4..ed26c02 100644 (file)
@@ -445,6 +445,7 @@ intel_dp_drrs_init(struct intel_connector *connector,
                   struct drm_display_mode *fixed_mode)
 {
        struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+       struct intel_encoder *encoder = connector->encoder;
        struct drm_display_mode *downclock_mode = NULL;
 
        INIT_DELAYED_WORK(&dev_priv->drrs.work, intel_edp_drrs_downclock_work);
@@ -456,6 +457,13 @@ intel_dp_drrs_init(struct intel_connector *connector,
                return NULL;
        }
 
+       if ((DISPLAY_VER(dev_priv) < 8 && !HAS_GMCH(dev_priv)) &&
+           encoder->port != PORT_A) {
+               drm_dbg_kms(&dev_priv->drm,
+                           "DRRS only supported on eDP port A\n");
+               return NULL;
+       }
+
        if (dev_priv->vbt.drrs_type != SEAMLESS_DRRS_SUPPORT) {
                drm_dbg_kms(&dev_priv->drm, "VBT doesn't support DRRS\n");
                return NULL;