summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/vlv_dsi.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2022-09-12 14:18:10 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2022-09-26 17:07:12 +0300
commit6ac2f04ba1c4a81ff1e205625eaeae1ead152720 (patch)
treef6a6d6e571cd352ae4d0b1dad08b09d0baefa7f7 /drivers/gpu/drm/i915/display/vlv_dsi.c
parentab6214f3c3dbabdb4409e84fe7c1c43cb79c6c56 (diff)
downloadlinux-6ac2f04ba1c4a81ff1e205625eaeae1ead152720.tar.gz
linux-6ac2f04ba1c4a81ff1e205625eaeae1ead152720.tar.bz2
linux-6ac2f04ba1c4a81ff1e205625eaeae1ead152720.zip
drm/i915: Extract intel_attach_scaling_mode_property()
Consolidate the scaling_mode property setup into a single place. The one slight complicateion here is that GMCH platforms can't do the CENTER mode except on the LVDS port. But we can deal with that by just checking the connector type. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-12-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/vlv_dsi.c')
-rw-r--r--drivers/gpu/drm/i915/display/vlv_dsi.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index b3f5ca280ef2..421ad02f8e9b 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -1659,19 +1659,10 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = {
static void vlv_dsi_add_properties(struct intel_connector *connector)
{
- struct drm_i915_private *dev_priv = 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(dev_priv))
- 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;
+ intel_attach_scaling_mode_property(&connector->base);
drm_connector_set_panel_orientation_with_quirk(&connector->base,
intel_dsi_get_panel_orientation(connector),