Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CHROMIUM: i915: Add DMI override to skip CRT initialization on ZGB
@ 2011-10-25 22:42 Stéphane Marchesin
  2012-01-12 20:34 ` Keith Packard
  0 siblings, 1 reply; 2+ messages in thread
From: Stéphane Marchesin @ 2011-10-25 22:42 UTC (permalink / raw)
  To: keithp; +Cc: intel-gfx, Duncan Laurie, dri-devel

From: Duncan Laurie <dlaurie@chromium.org>

This is the method used to override LVDS in intel_lvds and appears to be
an effective way to ensure that the driver does not enable VGA hotplug.

This is the same patch from 2.6.32 kernel in R12 but ported to 2.6.38,
will send upstream next.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>

BUG=chrome-os-partner:117
TEST=Check PORT_HOTPLUG_EN to see if hotplug interrupt is disabled.
Run the following command as root, specifically looking at bit 9:
mmio_read32 $[$(pci_read32 0 2 0 0x10) + 0x61110] = 0x00000000

Change-Id: Id8240f9fb31d058d8d79ee72f7b4615c43893f5a
Reviewed-on: http://gerrit.chromium.org/gerrit/1390
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Duncan Laurie <dlaurie@chromium.org>
---
 drivers/gpu/drm/i915/intel_crt.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 0979d88..c1ecbfd 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -24,6 +24,7 @@
  *	Eric Anholt <eric@anholt.net>
  */
 
+#include <linux/dmi.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
 #include "drmP.h"
@@ -544,6 +545,24 @@ static const struct drm_encoder_funcs intel_crt_enc_funcs = {
 	.destroy = intel_encoder_destroy,
 };
 
+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);
+	return 1;
+}
+
+static const struct dmi_system_id intel_no_crt[] = {
+	{
+		.callback = intel_no_crt_dmi_callback,
+		.ident = "ACER ZGB",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ACER"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
+		},
+	},
+	{ }
+};
+
 void intel_crt_init(struct drm_device *dev)
 {
 	struct drm_connector *connector;
@@ -551,6 +570,10 @@ void intel_crt_init(struct drm_device *dev)
 	struct intel_connector *intel_connector;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	/* Skip machines without VGA that falsely report hotplug events */
+	if (dmi_check_system(intel_no_crt))
+		return;
+
 	crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL);
 	if (!crt)
 		return;
-- 
1.7.5.3.367.ga9930

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

* Re: [PATCH] CHROMIUM: i915: Add DMI override to skip CRT initialization on ZGB
  2011-10-25 22:42 [PATCH] CHROMIUM: i915: Add DMI override to skip CRT initialization on ZGB Stéphane Marchesin
@ 2012-01-12 20:34 ` Keith Packard
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Packard @ 2012-01-12 20:34 UTC (permalink / raw)
  To: Stéphane Marchesin; +Cc: intel-gfx, Duncan Laurie, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 565 bytes --]

On Tue, 25 Oct 2011 15:42:21 -0700, Stéphane Marchesin <marcheu@chromium.org> wrote:
> From: Duncan Laurie <dlaurie@chromium.org>
> 
> This is the method used to override LVDS in intel_lvds and appears to be
> an effective way to ensure that the driver does not enable VGA hotplug.
> 
> This is the same patch from 2.6.32 kernel in R12 but ported to 2.6.38,
> will send upstream next.

I found this lurking in mail and applied it to drm-intel-next-fixes.
   07c1e8c..8ca4013  drm-intel-next-fixes -> drm-intel-next-fixes

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2012-01-12 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 22:42 [PATCH] CHROMIUM: i915: Add DMI override to skip CRT initialization on ZGB Stéphane Marchesin
2012-01-12 20:34 ` Keith Packard

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