Commit 50203b94 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Change SDVO fixed mode handling

SDVO is the only connector type currently returning the VBT
fixed mode directly from .get_modes(), everyone else just
adds it to the fixed_modes list and then returns that from
.get_modes(). Adjust SDVO to follow the common behaviour.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220323182935.4701-10-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 7a36980c
...@@ -2291,27 +2291,12 @@ static int intel_sdvo_get_lvds_modes(struct drm_connector *connector) ...@@ -2291,27 +2291,12 @@ static int intel_sdvo_get_lvds_modes(struct drm_connector *connector)
{ {
struct intel_sdvo *intel_sdvo = intel_attached_sdvo(to_intel_connector(connector)); struct intel_sdvo *intel_sdvo = intel_attached_sdvo(to_intel_connector(connector));
struct drm_i915_private *dev_priv = to_i915(connector->dev); struct drm_i915_private *dev_priv = to_i915(connector->dev);
struct drm_display_mode *newmode;
int num_modes = 0; int num_modes = 0;
drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]\n", drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]\n",
connector->base.id, connector->name); connector->base.id, connector->name);
/* num_modes += intel_panel_get_modes(to_intel_connector(connector));
* Fetch modes from VBT. For SDVO prefer the VBT mode since some
* SDVO->LVDS transcoders can't cope with the EDID mode.
*/
newmode = intel_panel_vbt_sdvo_fixed_mode(to_intel_connector(connector));
if (newmode) {
drm_mode_probed_add(connector, newmode);
num_modes++;
}
/*
* Attempt to get the mode list from DDC.
* Assume that the preferred modes are
* arranged in priority order.
*/
num_modes += intel_ddc_get_modes(connector, &intel_sdvo->ddc); num_modes += intel_ddc_get_modes(connector, &intel_sdvo->ddc);
return num_modes; return num_modes;
...@@ -2915,9 +2900,15 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device) ...@@ -2915,9 +2900,15 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector)) if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
goto err; goto err;
intel_sdvo_get_lvds_modes(connector); /*
* Fetch modes from VBT. For SDVO prefer the VBT mode since some
* SDVO->LVDS transcoders can't cope with the EDID mode.
*/
fixed_mode = intel_panel_vbt_sdvo_fixed_mode(intel_connector);
if (!fixed_mode) {
intel_ddc_get_modes(connector, &intel_sdvo->ddc);
fixed_mode = intel_panel_edid_fixed_mode(intel_connector); fixed_mode = intel_panel_edid_fixed_mode(intel_connector);
}
intel_panel_init(intel_connector, fixed_mode, NULL); intel_panel_init(intel_connector, fixed_mode, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment