public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Use the first mode if there is no preferred mode in the EDID
@ 2014-05-13 15:07 Chris Wilson
  2014-05-13 15:50 ` Chris Wilson
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2014-05-13 15:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson, stable

This matches the algorithm used by earlier kernels when selecting the
mode for the fbcon. And only if there is no modes at all, do we fall
back to using the BIOS configuration. Seamless transition is still
preserved (from the BIOS configuration to ours) so long as the BIOS has
also chosen what we hope is the native configuration.

Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78655
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/i915/intel_fbdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 1d3f0a9cce31..05beec4badd5 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -397,6 +397,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
 							  height);
 		}
 
+		/* No preferred mode marked by the EDID? Are there any modes? */
+		if (!modes[i] && !list_empty(&connector->modes)) {
+			DRM_DEBUG_KMS("using first mode listed on connector %s\n",
+				      drm_get_connector_name(connector));
+			modes[i] = list_first_entry(struct drm_display_mode,
+						    &connector->modes, head);
+		}
+
 		/* last resort: use current mode */
 		if (!modes[i]) {
 			/*
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-19 21:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 15:07 [PATCH] drm/i915: Use the first mode if there is no preferred mode in the EDID Chris Wilson
2014-05-13 15:50 ` Chris Wilson
2014-05-13 20:24   ` Jesse Barnes
2014-05-14  5:35     ` Knut Petersen
2014-05-15  8:13       ` Jani Nikula
2014-05-15  8:19         ` Chris Wilson
2014-05-19 17:20           ` Knut Petersen
2014-05-19 21:58             ` Daniel Vetter
2014-05-15  8:57       ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox