Skip to content

Commit 6f317cf

Browse files
l1kjnikula
authored andcommitted
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>
1 parent 5ebe6af commit 6f317cf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/gpu/drm/i915/intel_lvds.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,11 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)
848848
if (i915.lvds_channel_mode > 0)
849849
return i915.lvds_channel_mode == 2;
850850

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+
851856
if (dmi_check_system(intel_dual_link_lvds))
852857
return true;
853858

@@ -1111,6 +1116,8 @@ void intel_lvds_init(struct drm_device *dev)
11111116
out:
11121117
mutex_unlock(&dev->mode_config.mutex);
11131118

1119+
intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
1120+
11141121
lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
11151122
DRM_DEBUG_KMS("detected %s-link lvds configuration\n",
11161123
lvds_encoder->is_dual_link ? "dual" : "single");
@@ -1125,7 +1132,6 @@ void intel_lvds_init(struct drm_device *dev)
11251132
}
11261133
drm_connector_register(connector);
11271134

1128-
intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
11291135
intel_panel_setup_backlight(connector, INVALID_PIPE);
11301136

11311137
return;

0 commit comments

Comments
 (0)