[PATCH 5/6] drm/i915: Make sure panel fixed_mode has vrefresh populated

Ville Syrjala ville.syrjala at linux.intel.com
Thu Jun 28 19:43:00 UTC 2018


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

We want to use fixed_mode->vrefresh during mode validation, so first
make sure it's set correctly.

And we'll do the same for the downclock mode for consistency.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_panel.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 14b827ec5427..c784e772b6aa 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1932,6 +1932,15 @@ int intel_panel_init(struct intel_panel *panel,
 {
 	intel_panel_init_backlight_funcs(panel);
 
+	if (fixed_mode) {
+		fixed_mode->vrefresh = 0;
+		fixed_mode->vrefresh = drm_mode_vrefresh(fixed_mode);
+	}
+	if (downclock_mode) {
+		downclock_mode->vrefresh = 0;
+		downclock_mode->vrefresh = drm_mode_vrefresh(downclock_mode);
+	}
+
 	panel->fixed_mode = fixed_mode;
 	panel->downclock_mode = downclock_mode;
 
-- 
2.16.4



More information about the dri-devel mailing list