mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
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>
This commit is contained in:
parent
688a9bbccb
commit
14daee248f
|
|
@ -272,6 +272,26 @@ intel_panel_vbt_lfp_fixed_mode(struct intel_connector *connector)
|
|||
return fixed_mode;
|
||||
}
|
||||
|
||||
struct drm_display_mode *
|
||||
intel_panel_vbt_sdvo_fixed_mode(struct intel_connector *connector)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(connector->base.dev);
|
||||
struct drm_display_mode *fixed_mode;
|
||||
|
||||
if (!i915->vbt.sdvo_lvds_vbt_mode)
|
||||
return NULL;
|
||||
|
||||
fixed_mode = drm_mode_duplicate(&i915->drm,
|
||||
i915->vbt.sdvo_lvds_vbt_mode);
|
||||
if (!fixed_mode)
|
||||
return NULL;
|
||||
|
||||
/* Guarantee the mode is preferred */
|
||||
fixed_mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER;
|
||||
|
||||
return fixed_mode;
|
||||
}
|
||||
|
||||
/* adjusted_mode has been preset to be the panel's fixed mode */
|
||||
static int pch_panel_fitting(struct intel_crtc_state *crtc_state,
|
||||
const struct drm_connector_state *conn_state)
|
||||
|
|
|
|||
|
|
@ -48,5 +48,7 @@ struct drm_display_mode *
|
|||
intel_panel_edid_fixed_mode(struct intel_connector *connector);
|
||||
struct drm_display_mode *
|
||||
intel_panel_vbt_lfp_fixed_mode(struct intel_connector *connector);
|
||||
struct drm_display_mode *
|
||||
intel_panel_vbt_sdvo_fixed_mode(struct intel_connector *connector);
|
||||
|
||||
#endif /* __INTEL_PANEL_H__ */
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user