Commit 54b6af69 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/sdvo: Pass the requesed mode to intel_sdvo_create_preferred_input_timing()

We want to stop using connector->panel.fixed_mode directtly.
In order to look it up in the future we'll need to have the
requested mode around, so pass that in fully (instead of just
passing bits of it).
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220311172428.14685-3-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent dee54887
...@@ -783,24 +783,22 @@ static bool intel_sdvo_get_input_timing(struct intel_sdvo *intel_sdvo, ...@@ -783,24 +783,22 @@ static bool intel_sdvo_get_input_timing(struct intel_sdvo *intel_sdvo,
static bool static bool
intel_sdvo_create_preferred_input_timing(struct intel_sdvo *intel_sdvo, intel_sdvo_create_preferred_input_timing(struct intel_sdvo *intel_sdvo,
struct intel_sdvo_connector *intel_sdvo_connector, struct intel_sdvo_connector *intel_sdvo_connector,
u16 clock, const struct drm_display_mode *mode)
u16 width,
u16 height)
{ {
struct intel_sdvo_preferred_input_timing_args args; struct intel_sdvo_preferred_input_timing_args args;
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
args.clock = clock; args.clock = mode->clock / 10;
args.width = width; args.width = mode->hdisplay;
args.height = height; args.height = mode->vdisplay;
args.interlace = 0; args.interlace = 0;
if (IS_LVDS(intel_sdvo_connector)) { if (IS_LVDS(intel_sdvo_connector)) {
const struct drm_display_mode *fixed_mode = const struct drm_display_mode *fixed_mode =
intel_sdvo_connector->base.panel.fixed_mode; intel_sdvo_connector->base.panel.fixed_mode;
if (fixed_mode->hdisplay != width || if (fixed_mode->hdisplay != args.width ||
fixed_mode->vdisplay != height) fixed_mode->vdisplay != args.height)
args.scaled = 1; args.scaled = 1;
} }
...@@ -1236,9 +1234,7 @@ intel_sdvo_get_preferred_input_mode(struct intel_sdvo *intel_sdvo, ...@@ -1236,9 +1234,7 @@ intel_sdvo_get_preferred_input_mode(struct intel_sdvo *intel_sdvo,
if (!intel_sdvo_create_preferred_input_timing(intel_sdvo, if (!intel_sdvo_create_preferred_input_timing(intel_sdvo,
intel_sdvo_connector, intel_sdvo_connector,
mode->clock / 10, mode))
mode->hdisplay,
mode->vdisplay))
return false; return false;
if (!intel_sdvo_get_preferred_input_timing(intel_sdvo, if (!intel_sdvo_get_preferred_input_timing(intel_sdvo,
......
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