Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: make quirks more verbose
@ 2012-04-01 11:16 Daniel Vetter
  2012-04-01 11:16 ` [PATCH 2/2] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2 Daniel Vetter
  2012-04-01 11:19 ` [PATCH 1/2] drm/i915: make quirks more verbose Chris Wilson
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Vetter @ 2012-04-01 11:16 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

And add informational dmesg output where it does not yet exist.

In case a quirk matches too much, this information is crucial for
debugging such a bug report.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_crt.c     |    2 +-
 drivers/gpu/drm/i915/intel_display.c |    4 +++-
 drivers/gpu/drm/i915/intel_lvds.c    |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index d54d232..70b0f1a 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -545,7 +545,7 @@ static const struct drm_encoder_funcs intel_crt_enc_funcs = {
 
 static int __init intel_no_crt_dmi_callback(const struct dmi_system_id *id)
 {
-	DRM_DEBUG_KMS("Skipping CRT initialization for %s\n", id->ident);
+	DRM_INFO("Skipping CRT initialization for %s\n", id->ident);
 	return 1;
 }
 
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 09f7be6..5baa896 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9362,7 +9362,7 @@ static void quirk_pipea_force(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
 	dev_priv->quirks |= QUIRK_PIPEA_FORCE;
-	DRM_DEBUG_DRIVER("applying pipe a force quirk\n");
+	DRM_INFO("applying pipe a force quirk\n");
 }
 
 /*
@@ -9372,6 +9372,7 @@ static void quirk_ssc_force_disable(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	dev_priv->quirks |= QUIRK_LVDS_SSC_DISABLE;
+	DRM_INFO("applying lvds SSC disable quirk\n");
 }
 
 /*
@@ -9382,6 +9383,7 @@ static void quirk_invert_brightness(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	dev_priv->quirks |= QUIRK_INVERT_BRIGHTNESS;
+	DRM_INFO("applying inverted panel brightness quirk\n");
 }
 
 struct intel_quirk {
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 4f92a11..a96d9a1 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -474,7 +474,7 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
 
 static int intel_no_modeset_on_lid_dmi_callback(const struct dmi_system_id *id)
 {
-	DRM_DEBUG_KMS("Skipping forced modeset for %s\n", id->ident);
+	DRM_INFO("Skipping forced modeset for %s\n", id->ident);
 	return 1;
 }
 
@@ -622,7 +622,7 @@ static const struct drm_encoder_funcs intel_lvds_enc_funcs = {
 
 static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
 {
-	DRM_DEBUG_KMS("Skipping LVDS initialization for %s\n", id->ident);
+	DRM_INFO("Skipping LVDS initialization for %s\n", id->ident);
 	return 1;
 }
 
-- 
1.7.9.1

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

* [PATCH 2/2] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2
  2012-04-01 11:16 [PATCH 1/2] drm/i915: make quirks more verbose Daniel Vetter
@ 2012-04-01 11:16 ` Daniel Vetter
  2012-04-01 11:19   ` Chris Wilson
  2012-04-01 11:19 ` [PATCH 1/2] drm/i915: make quirks more verbose Chris Wilson
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2012-04-01 11:16 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

When booting with EFI, Apple botched this one up.

v2: Switch the quirk dmesg output to DRM_INFO.

Tested-by: Austin Lund <austin.lund@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5baa896..516e701 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -24,6 +24,7 @@
  *	Eric Anholt <eric@anholt.net>
  */
 
+#include <linux/dmi.h>
 #include <linux/cpufreq.h>
 #include <linux/module.h>
 #include <linux/input.h>
@@ -418,6 +419,24 @@ static void vlv_init_dpio(struct drm_device *dev)
 	POSTING_READ(DPIO_CTL);
 }
 
+static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
+{
+	DRM_DEBUG_KMS("Forcing lvds to dual link mode on %s\n", id->ident);
+	return 1;
+}
+
+static const struct dmi_system_id intel_dual_link_lvds[] = {
+	{
+		.callback = intel_dual_link_lvds_callback,
+		.ident = "Apple MacBook Pro (Core i7)",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
+		},
+	},
+	{ }	/* terminating entry */
+};
+
 static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
 			      unsigned int reg)
 {
@@ -427,6 +446,9 @@ static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
 	if (i915_lvds_channel_mode > 0)
 		return i915_lvds_channel_mode == 2;
 
+	if (dmi_check_system(intel_dual_link_lvds))
+		return true;
+
 	if (dev_priv->lvds_val)
 		val = dev_priv->lvds_val;
 	else {
-- 
1.7.9.1

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

* Re: [PATCH 1/2] drm/i915: make quirks more verbose
  2012-04-01 11:16 [PATCH 1/2] drm/i915: make quirks more verbose Daniel Vetter
  2012-04-01 11:16 ` [PATCH 2/2] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2 Daniel Vetter
@ 2012-04-01 11:19 ` Chris Wilson
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2012-04-01 11:19 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

On Sun,  1 Apr 2012 13:16:49 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> And add informational dmesg output where it does not yet exist.
> 
> In case a quirk matches too much, this information is crucial for
> debugging such a bug report.
> 
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Like.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

* Re: [PATCH 2/2] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2
  2012-04-01 11:16 ` [PATCH 2/2] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2 Daniel Vetter
@ 2012-04-01 11:19   ` Chris Wilson
  2012-04-01 11:38     ` [PATCH] " Daniel Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2012-04-01 11:19 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

On Sun,  1 Apr 2012 13:16:50 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> When booting with EFI, Apple botched this one up.
> 
> v2: Switch the quirk dmesg output to DRM_INFO.
> 
> Tested-by: Austin Lund <austin.lund@gmail.com>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

New changelog, old patch. :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

* [PATCH] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2
  2012-04-01 11:19   ` Chris Wilson
@ 2012-04-01 11:38     ` Daniel Vetter
  2012-04-01 14:08       ` Chris Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2012-04-01 11:38 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

When booting with EFI, Apple botched this one up.

v2: Switch the quirk dmesg output to DRM_INFO.
v3: Actually git add the new things ...

Tested-by: Austin Lund <austin.lund@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5baa896..3abebb5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -24,6 +24,7 @@
  *	Eric Anholt <eric@anholt.net>
  */
 
+#include <linux/dmi.h>
 #include <linux/cpufreq.h>
 #include <linux/module.h>
 #include <linux/input.h>
@@ -418,6 +419,24 @@ static void vlv_init_dpio(struct drm_device *dev)
 	POSTING_READ(DPIO_CTL);
 }
 
+static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
+{
+	DRM_INFO("Forcing lvds to dual link mode on %s\n", id->ident);
+	return 1;
+}
+
+static const struct dmi_system_id intel_dual_link_lvds[] = {
+	{
+		.callback = intel_dual_link_lvds_callback,
+		.ident = "Apple MacBook Pro (Core i5/i7 Series)",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
+		},
+	},
+	{ }	/* terminating entry */
+};
+
 static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
 			      unsigned int reg)
 {
@@ -427,6 +446,9 @@ static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
 	if (i915_lvds_channel_mode > 0)
 		return i915_lvds_channel_mode == 2;
 
+	if (dmi_check_system(intel_dual_link_lvds))
+		return true;
+
 	if (dev_priv->lvds_val)
 		val = dev_priv->lvds_val;
 	else {
-- 
1.7.9.1

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

* Re: [PATCH] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2
  2012-04-01 11:38     ` [PATCH] " Daniel Vetter
@ 2012-04-01 14:08       ` Chris Wilson
  2012-04-03 20:33         ` Daniel Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2012-04-01 14:08 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

On Sun,  1 Apr 2012 13:38:50 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> When booting with EFI, Apple botched this one up.
> 
> v2: Switch the quirk dmesg output to DRM_INFO.
> v3: Actually git add the new things ...
> 
> Tested-by: Austin Lund <austin.lund@gmail.com>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Having discussed this with Daniel on irc, MacBookPro8,2 seems to be as
much information as we have available, so
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>

Hopefully nobody gets caught out by this, but for anybody so unfortunate
we should be able to spot the regression in the logs quickly.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

* Re: [PATCH] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2
  2012-04-01 14:08       ` Chris Wilson
@ 2012-04-03 20:33         ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2012-04-03 20:33 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, Intel Graphics Development

On Sun, Apr 01, 2012 at 03:08:36PM +0100, Chris Wilson wrote:
> On Sun,  1 Apr 2012 13:38:50 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > When booting with EFI, Apple botched this one up.
> > 
> > v2: Switch the quirk dmesg output to DRM_INFO.
> > v3: Actually git add the new things ...
> > 
> > Tested-by: Austin Lund <austin.lund@gmail.com>
> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42842
> > Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Having discussed this with Daniel on irc, MacBookPro8,2 seems to be as
> much information as we have available, so
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Hopefully nobody gets caught out by this, but for anybody so unfortunate
> we should be able to spot the regression in the logs quickly.

I've picked these 2 patches up for next, thanks for suggestions and
review.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

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

end of thread, other threads:[~2012-04-03 20:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01 11:16 [PATCH 1/2] drm/i915: make quirks more verbose Daniel Vetter
2012-04-01 11:16 ` [PATCH 2/2] drm/i915: Add a dual link lvds quirk for MacBook Pro 8, 2 Daniel Vetter
2012-04-01 11:19   ` Chris Wilson
2012-04-01 11:38     ` [PATCH] " Daniel Vetter
2012-04-01 14:08       ` Chris Wilson
2012-04-03 20:33         ` Daniel Vetter
2012-04-01 11:19 ` [PATCH 1/2] drm/i915: make quirks more verbose Chris Wilson

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