diff options
author | Chris Wilson <[email protected]> | 2014-05-13 16:07:37 +0100 |
---|---|---|
committer | Jani Nikula <[email protected]> | 2014-05-15 11:32:35 +0300 |
commit | afba0b5a221c0dacbbdf3a778d539fbc90fc6191 (patch) | |
tree | 4eb376198cdb3e5272762c504ae5688f342a8cf1 | |
parent | f4cdbc21444a45d207a8dc175f44d2facfbd0845 (diff) |
drm/i915: Use the first mode if there is no preferred mode in the EDID
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 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78655
Reviewed-by: Jesse Barnes <[email protected]>
Tested-by: Knut Petersen <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
[Jani: applied Chris' "Please imagine that I wrote this correctly."]
Signed-off-by: Jani Nikula <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_fbdev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index fce4a0d93c0b..f73ba5e6b7a8 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -387,6 +387,15 @@ 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(&connector->modes, + struct drm_display_mode, + head); + } + /* last resort: use current mode */ if (!modes[i]) { /* |