diff options
author | Lukas Wunner <lukas@wunner.de> | 2015-04-12 15:10:35 -0400 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-05-05 10:09:44 -0400 |
commit | 6f317cfe42c9d8a7c9c1a327d2f1bcc517a3cd91 (patch) | |
tree | 37bfafd26944fbe2699eb9344084fd1d94627f04 /drivers/gpu | |
parent | 5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff) |
drm/i915: Assume dual channel LVDS if pixel clock necessitates it
Single channel LVDS maxes out at 112 MHz, anything above must be dual
channel. This avoids the need to specify i915.lvds_channel_mode=2 on
all 17" MacBook Pro models with i915 graphics since they had 1920x1200
(193 MHz), plus those 15" pre-retina models which had a resolution
of 1680x1050 (119 MHz) as a BTO option.
Source for 112 MHz limit of single channel LVDS is section 2.3 of:
https://01.org/linuxgraphics/sites/default/files/documentation/ivb_ihd_os_vol3_part4.pdf
v2: Avoid hardcoding 17" models by assuming dual channel LVDS if the
resolution necessitates it, suggested by Jani Nikula.
v3: Fix typo, thanks Joonas Lahtinen.
v4: Split commit in two, suggested by Ville Syrjälä.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Tested-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: stable@vger.kernel.org
[Jani: included spec reference into the commit message]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 5abda1d2c018..ee621e335d04 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -848,6 +848,11 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder) | |||
848 | if (i915.lvds_channel_mode > 0) | 848 | if (i915.lvds_channel_mode > 0) |
849 | return i915.lvds_channel_mode == 2; | 849 | return i915.lvds_channel_mode == 2; |
850 | 850 | ||
851 | /* single channel LVDS is limited to 112 MHz */ | ||
852 | if (lvds_encoder->attached_connector->base.panel.fixed_mode->clock | ||
853 | > 112999) | ||
854 | return true; | ||
855 | |||
851 | if (dmi_check_system(intel_dual_link_lvds)) | 856 | if (dmi_check_system(intel_dual_link_lvds)) |
852 | return true; | 857 | return true; |
853 | 858 | ||
@@ -1111,6 +1116,8 @@ void intel_lvds_init(struct drm_device *dev) | |||
1111 | out: | 1116 | out: |
1112 | mutex_unlock(&dev->mode_config.mutex); | 1117 | mutex_unlock(&dev->mode_config.mutex); |
1113 | 1118 | ||
1119 | intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode); | ||
1120 | |||
1114 | lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder); | 1121 | lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder); |
1115 | DRM_DEBUG_KMS("detected %s-link lvds configuration\n", | 1122 | DRM_DEBUG_KMS("detected %s-link lvds configuration\n", |
1116 | lvds_encoder->is_dual_link ? "dual" : "single"); | 1123 | lvds_encoder->is_dual_link ? "dual" : "single"); |
@@ -1125,7 +1132,6 @@ out: | |||
1125 | } | 1132 | } |
1126 | drm_connector_register(connector); | 1133 | drm_connector_register(connector); |
1127 | 1134 | ||
1128 | intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode); | ||
1129 | intel_panel_setup_backlight(connector, INVALID_PIPE); | 1135 | intel_panel_setup_backlight(connector, INVALID_PIPE); |
1130 | 1136 | ||
1131 | return; | 1137 | return; |