* [PATCH v4 1/2] drm/i915: Assume dual channel LVDS if pixel clock necessitates it
@ 2015-04-12 19:10 Lukas Wunner
2015-05-04 13:06 ` [PATCH v4 2/2] drm/i915: Add missing MacBook Pro models with dual channel LVDS Lukas Wunner
0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wunner @ 2015-04-12 19:10 UTC (permalink / raw)
To: intel-gfx
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.
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>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: stable@vger.kernel.org
---
Notes:
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
drivers/gpu/drm/i915/intel_lvds.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 5abda1d..ee621e3 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)
if (i915.lvds_channel_mode > 0)
return i915.lvds_channel_mode == 2;
+ /* single channel LVDS is limited to 112 MHz */
+ if (lvds_encoder->attached_connector->base.panel.fixed_mode->clock
+ > 112999)
+ return true;
+
if (dmi_check_system(intel_dual_link_lvds))
return true;
@@ -1111,6 +1116,8 @@ void intel_lvds_init(struct drm_device *dev)
out:
mutex_unlock(&dev->mode_config.mutex);
+ intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
+
lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
DRM_DEBUG_KMS("detected %s-link lvds configuration\n",
lvds_encoder->is_dual_link ? "dual" : "single");
@@ -1125,7 +1132,6 @@ out:
}
drm_connector_register(connector);
- intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
intel_panel_setup_backlight(connector, INVALID_PIPE);
return;
--
1.8.5.2 (Apple Git-48)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v4 2/2] drm/i915: Add missing MacBook Pro models with dual channel LVDS
2015-04-12 19:10 [PATCH v4 1/2] drm/i915: Assume dual channel LVDS if pixel clock necessitates it Lukas Wunner
@ 2015-05-04 13:06 ` Lukas Wunner
2015-05-05 14:18 ` Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wunner @ 2015-05-04 13:06 UTC (permalink / raw)
To: intel-gfx
Single channel LVDS maxes out at 112 MHz. The 15" pre-retina models
shipped with 1440x900 (106 MHz) by default or 1680x1050 (119 MHz)
as a BTO option, both versions used dual channel LVDS even though
the smaller one would have fit into a single channel.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
---
Notes:
Bug report showing that the MacBookPro8,2 with 1440x900 uses dual
channel LVDS (this lead to it being hardcoded in intel_lvds.c by
Daniel Vetter with commit 618563e3945b9d0864154bab3c607865b557cecc):
https://bugzilla.kernel.org/show_bug.cgi?id=42842
If i915.lvds_channel_mode=2 is missing even though the machine needs
it, every other vertical line is white and consequently, only the left
half of the screen is visible (verified by myself on a MacBookPro9,1).
Forum posting concerning a MacBookPro6,2 with 1440x900, author is
using i915.lvds_channel_mode=2 on the kernel command line, proving
that the machine uses dual channels:
https://bbs.archlinux.org/viewtopic.php?id=185770
Chi Mei N154C6-L04 with 1440x900 is a replacement panel for all
MacBook Pro "A1286" models, and that model number encompasses the
MacBookPro6,2 / 8,2 / 9,1. Page 17 of the panel's datasheet shows
it's driven with dual channel LVDS:
http://www.ebay.com/itm/-/400690878560
http://www.everymac.com/ultimate-mac-lookup/?search_keywords=A1286
http://www.taopanel.com/chimei/datasheet/N154C6-L04.pdf
Those three 15" models, MacBookPro6,2 / 8,2 / 9,1, are the only
ones with i915 graphics and dual channel LVDS, so that list should
be complete. And the 8,2 is already in intel_lvds.c.
Possible motivation to use dual channel LVDS even on the 1440x900
models: Reduce the number of different parts, i.e. use identical
logic boards and display cabling on both versions and the only
differing component is the panel.
drivers/gpu/drm/i915/intel_lvds.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index ee621e3..fbcc7df 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -813,12 +813,28 @@ static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
static const struct dmi_system_id intel_dual_link_lvds[] = {
{
.callback = intel_dual_link_lvds_callback,
- .ident = "Apple MacBook Pro (Core i5/i7 Series)",
+ .ident = "Apple MacBook Pro 15\" (2010)",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro6,2"),
+ },
+ },
+ {
+ .callback = intel_dual_link_lvds_callback,
+ .ident = "Apple MacBook Pro 15\" (2011)",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
},
},
+ {
+ .callback = intel_dual_link_lvds_callback,
+ .ident = "Apple MacBook Pro 15\" (2012)",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"),
+ },
+ },
{ } /* terminating entry */
};
--
1.8.5.2 (Apple Git-48)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4 2/2] drm/i915: Add missing MacBook Pro models with dual channel LVDS
2015-05-04 13:06 ` [PATCH v4 2/2] drm/i915: Add missing MacBook Pro models with dual channel LVDS Lukas Wunner
@ 2015-05-05 14:18 ` Jani Nikula
0 siblings, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2015-05-05 14:18 UTC (permalink / raw)
To: Lukas Wunner, intel-gfx
On Mon, 04 May 2015, Lukas Wunner <lukas@wunner.de> wrote:
> Single channel LVDS maxes out at 112 MHz. The 15" pre-retina models
> shipped with 1440x900 (106 MHz) by default or 1680x1050 (119 MHz)
> as a BTO option, both versions used dual channel LVDS even though
> the smaller one would have fit into a single channel.
>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Cc: stable@vger.kernel.org
Both pushed to drm-intel-fixes, with the notes moved into the commit
messages for posterity. There'll be others doing archeology on this! ;)
Thanks for the patches and review.
BR,
Jani.
> ---
>
> Notes:
> Bug report showing that the MacBookPro8,2 with 1440x900 uses dual
> channel LVDS (this lead to it being hardcoded in intel_lvds.c by
> Daniel Vetter with commit 618563e3945b9d0864154bab3c607865b557cecc):
> https://bugzilla.kernel.org/show_bug.cgi?id=42842
>
> If i915.lvds_channel_mode=2 is missing even though the machine needs
> it, every other vertical line is white and consequently, only the left
> half of the screen is visible (verified by myself on a MacBookPro9,1).
>
> Forum posting concerning a MacBookPro6,2 with 1440x900, author is
> using i915.lvds_channel_mode=2 on the kernel command line, proving
> that the machine uses dual channels:
> https://bbs.archlinux.org/viewtopic.php?id=185770
>
> Chi Mei N154C6-L04 with 1440x900 is a replacement panel for all
> MacBook Pro "A1286" models, and that model number encompasses the
> MacBookPro6,2 / 8,2 / 9,1. Page 17 of the panel's datasheet shows
> it's driven with dual channel LVDS:
> http://www.ebay.com/itm/-/400690878560
> http://www.everymac.com/ultimate-mac-lookup/?search_keywords=A1286
> http://www.taopanel.com/chimei/datasheet/N154C6-L04.pdf
>
> Those three 15" models, MacBookPro6,2 / 8,2 / 9,1, are the only
> ones with i915 graphics and dual channel LVDS, so that list should
> be complete. And the 8,2 is already in intel_lvds.c.
>
> Possible motivation to use dual channel LVDS even on the 1440x900
> models: Reduce the number of different parts, i.e. use identical
> logic boards and display cabling on both versions and the only
> differing component is the panel.
>
> drivers/gpu/drm/i915/intel_lvds.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index ee621e3..fbcc7df 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -813,12 +813,28 @@ static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
> static const struct dmi_system_id intel_dual_link_lvds[] = {
> {
> .callback = intel_dual_link_lvds_callback,
> - .ident = "Apple MacBook Pro (Core i5/i7 Series)",
> + .ident = "Apple MacBook Pro 15\" (2010)",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro6,2"),
> + },
> + },
> + {
> + .callback = intel_dual_link_lvds_callback,
> + .ident = "Apple MacBook Pro 15\" (2011)",
> .matches = {
> DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
> DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
> },
> },
> + {
> + .callback = intel_dual_link_lvds_callback,
> + .ident = "Apple MacBook Pro 15\" (2012)",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"),
> + },
> + },
> { } /* terminating entry */
> };
>
> --
> 1.8.5.2 (Apple Git-48)
>
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-05 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-12 19:10 [PATCH v4 1/2] drm/i915: Assume dual channel LVDS if pixel clock necessitates it Lukas Wunner
2015-05-04 13:06 ` [PATCH v4 2/2] drm/i915: Add missing MacBook Pro models with dual channel LVDS Lukas Wunner
2015-05-05 14:18 ` Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox