diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-03-23 20:29:32 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-03-29 16:35:33 +0300 |
commit | 14daee248f0102359898e21706f570c274c11948 (patch) | |
tree | 51cce12604eb2b2db463f9279a9130cbc997851e /drivers/gpu/drm/i915/display/intel_sdvo.c | |
parent | 688a9bbccb9034952c40b442f0f03a6a0c07d36f (diff) | |
download | linux-14daee248f0102359898e21706f570c274c11948.tar.gz linux-14daee248f0102359898e21706f570c274c11948.tar.bz2 linux-14daee248f0102359898e21706f570c274c11948.zip |
drm/i915: Extract intel_panel_vbt_sdvo_fixed_mode()
We have a function for duplicating the VBT LFP mode. Add the same
for the VBT SDVO mode.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220323182935.4701-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_sdvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_sdvo.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index a2061b132107..27b3d3a79989 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -2301,16 +2301,10 @@ static int intel_sdvo_get_lvds_modes(struct drm_connector *connector) * Fetch modes from VBT. For SDVO prefer the VBT mode since some * SDVO->LVDS transcoders can't cope with the EDID mode. */ - if (dev_priv->vbt.sdvo_lvds_vbt_mode != NULL) { - newmode = drm_mode_duplicate(connector->dev, - dev_priv->vbt.sdvo_lvds_vbt_mode); - if (newmode != NULL) { - /* Guarantee the mode is preferred */ - newmode->type = (DRM_MODE_TYPE_PREFERRED | - DRM_MODE_TYPE_DRIVER); - drm_mode_probed_add(connector, newmode); - num_modes++; - } + newmode = intel_panel_vbt_sdvo_fixed_mode(to_intel_connector(connector)); + if (newmode) { + drm_mode_probed_add(connector, newmode); + num_modes++; } /* |