drm/i915: Move eDP scaling_mode prop setup to the proper place
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 12 Sep 2022 11:18:09 +0000 (14:18 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 26 Sep 2022 14:05:42 +0000 (17:05 +0300)
We have an eDP specific intel_edp_add_properties() so move
the eDP scaling_mode property setup there from
intel_dp_add_properties().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c

index d24a336de81f4edb5dc9332ead1167dcc63075c5..2de7773b30ee4ccf7bac8b28d0e3e089a28b354b 100644 (file)
@@ -5172,19 +5172,6 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
        if (has_gamut_metadata_dip(dev_priv, port))
                drm_connector_attach_hdr_output_metadata_property(connector);
 
-       if (intel_dp_is_edp(intel_dp)) {
-               u32 allowed_scalers;
-
-               allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
-               if (!HAS_GMCH(dev_priv))
-                       allowed_scalers |= BIT(DRM_MODE_SCALE_CENTER);
-
-               drm_connector_attach_scaling_mode_property(connector, allowed_scalers);
-
-               connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
-
-       }
-
        if (HAS_VRR(dev_priv))
                drm_connector_attach_vrr_capable_property(connector);
 }
@@ -5196,6 +5183,16 @@ intel_edp_add_properties(struct intel_dp *intel_dp)
        struct drm_i915_private *i915 = to_i915(connector->base.dev);
        const struct drm_display_mode *fixed_mode =
                intel_panel_preferred_fixed_mode(connector);
+       u32 allowed_scalers;
+
+       allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) |
+               BIT(DRM_MODE_SCALE_FULLSCREEN);
+       if (!HAS_GMCH(i915))
+               allowed_scalers |= BIT(DRM_MODE_SCALE_CENTER);
+
+       drm_connector_attach_scaling_mode_property(&connector->base, allowed_scalers);
+
+       connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
 
        if (!fixed_mode)
                return;