diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-03-23 19:29:30 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-03-29 15:35:33 +0200 |
commit | f6d39f563cf73f3e2608d0f171babe24c0394c9b (patch) | |
tree | df3a24aea06531c5efe3689e44474225500a5cba /drivers/gpu/drm/i915/display/intel_lvds.c | |
parent | drm/i915: Extract intel_edp_add_properties() (diff) | |
download | linux-f6d39f563cf73f3e2608d0f171babe24c0394c9b.tar.xz linux-f6d39f563cf73f3e2608d0f171babe24c0394c9b.zip |
drm/i915: Use intel_panel_preferred_fixed_mode() more
Use intel_panel_preferred_fixed_mode() for all the orientation
quirk setup and compute_is_dual_link_lvds()). All of these
happen after intel_panel_init() so the panel fixed_mode list
is already in place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220323182935.4701-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_lvds.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c index b57e76b4ef04..d068e0607153 100644 --- a/drivers/gpu/drm/i915/display/intel_lvds.c +++ b/drivers/gpu/drm/i915/display/intel_lvds.c @@ -778,12 +778,13 @@ bool intel_is_dual_link_lvds(struct drm_i915_private *dev_priv) return encoder && to_lvds_encoder(&encoder->base)->is_dual_link; } -static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder, - const struct drm_display_mode *fixed_mode) +static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder) { - struct drm_device *dev = lvds_encoder->base.base.dev; + struct drm_i915_private *dev_priv = to_i915(lvds_encoder->base.base.dev); + struct intel_connector *connector = lvds_encoder->attached_connector; + const struct drm_display_mode *fixed_mode = + intel_panel_preferred_fixed_mode(connector); unsigned int val; - struct drm_i915_private *dev_priv = to_i915(dev); /* use the module option value if specified */ if (dev_priv->params.lvds_channel_mode > 0) @@ -999,7 +1000,7 @@ out: intel_panel_init(intel_connector, fixed_mode, downclock_mode); intel_backlight_setup(intel_connector, INVALID_PIPE); - lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder, fixed_mode); + lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder); drm_dbg_kms(&dev_priv->drm, "detected %s-link lvds configuration\n", lvds_encoder->is_dual_link ? "dual" : "single"); |