summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_panel.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2021-09-27 21:52:07 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2021-09-30 11:20:13 +0300
commitcff4c2c645cbb3e95d7aec9afb1a803dd2668ec7 (patch)
tree4cccece5124cd497760cc21b954aa6ba8796cf05 /drivers/gpu/drm/i915/display/intel_panel.c
parent00fc3787d277299c39a7c35290e79375c6de9f24 (diff)
downloadlinux-cff4c2c645cbb3e95d7aec9afb1a803dd2668ec7.tar.gz
linux-cff4c2c645cbb3e95d7aec9afb1a803dd2668ec7.tar.bz2
linux-cff4c2c645cbb3e95d7aec9afb1a803dd2668ec7.zip
drm/i915: Introduce intel_panel_compute_config()
Let's introduce a compute_config() helper for fixed mode panels. For now all it does is the fixed_mode->adjusted_mode copy. Note that with sDVO we have to ask the external encoder chip to spit out our actual display timings for us, so the fixed_mode to adjusted_mode copy done by intel_panel_compute_config() is redundant, but we still want to use it to do other checks for us later. We'll be fine so long as we only call it before intel_sdvo_get_preferred_input_mode() overwrites adjusted_mode with the timings from the encoder. v2: Use intel_panel_compute_config() with sDVO Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210927185207.13620-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_panel.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_panel.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index b2ad0f065218..77c1ca387de0 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -45,12 +45,19 @@ bool intel_panel_use_ssc(struct drm_i915_private *i915)
&& !(i915->quirks & QUIRK_LVDS_SSC_DISABLE);
}
-void intel_panel_fixed_mode(const struct drm_display_mode *fixed_mode,
- struct drm_display_mode *adjusted_mode)
+int intel_panel_compute_config(struct intel_connector *connector,
+ struct drm_display_mode *adjusted_mode)
{
+ const struct drm_display_mode *fixed_mode = connector->panel.fixed_mode;
+
+ if (!fixed_mode)
+ return 0;
+
drm_mode_copy(adjusted_mode, fixed_mode);
drm_mode_set_crtcinfo(adjusted_mode, 0);
+
+ return 0;
}
static bool is_downclock_mode(const struct drm_display_mode *downclock_mode,