提交 00fc3787 编写于 作者: V Ville Syrjälä

drm/i915: Reject modes that don't match fixed_mode vrefresh

When using a fixed mode we won't change the refresh rate ever.
So filter out all modes that don't match the fixed_mode's refresh
rate.

I'm going to declare the "rounded to nearest Hz refresh
rates must match" approach good enough for now.

Note that we could start supporting multiple refresh rates
with panels that can do it, but that would mean replacing
the single fixed mode concept with a list of fixed modes.
Then we could look for the closest match to the user's
requested refresh rate and use that. But all of that would
be a fair bit of work so we'll leave it for later.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/2939
References: https://gitlab.freedesktop.org/drm/intel/-/issues/3969Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210923200109.4459-4-ville.syrjala@linux.intel.comReviewed-by: NJani Nikula <jani.nikula@intel.com>
上级 8a567b11
......@@ -497,6 +497,9 @@ intel_panel_mode_valid(struct intel_connector *connector,
if (mode->vdisplay != fixed_mode->vdisplay)
return MODE_PANEL;
if (drm_mode_vrefresh(mode) != drm_mode_vrefresh(fixed_mode))
return MODE_PANEL;
return MODE_OK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册