lkml.org 
[lkml]   [2010]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] i915: Skip wrong TV outputs on HP laptop
A new HP laptop with GM45 seems detecting wrongly TV outputs
occasionally. Most of time it detects the TV output as disconnected,
but spontaneously it detects NTSC 480i although the laptop has no TV
output at all.

A simple (but ad hoc) fix is to add a DMI check as below.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/gpu/drm/i915/intel_tv.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 552ec11..e848a28 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -37,6 +37,7 @@
#include "intel_drv.h"
#include "i915_drm.h"
#include "i915_drv.h"
+#include <linux/dmi.h>

enum tv_margin {
TV_MARGIN_LEFT, TV_MARGIN_TOP,
@@ -1735,6 +1736,18 @@ static int tv_is_present_in_vbt(struct drm_device *dev)
return ret;
}

+static struct dmi_system_id intel_bad_tv[] = {
+ {
+ .ident = "HP Compaq 420",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP 420"),
+ },
+ },
+
+ { } /* terminating entry */
+};
+
void
intel_tv_init(struct drm_device *dev)
{
@@ -1757,6 +1770,10 @@ intel_tv_init(struct drm_device *dev)
if (!dev_priv->int_tv_support)
return;

+ /* wrongly detected TV outputs */
+ if (dmi_check_system(intel_bad_tv))
+ return;
+
/*
* Sanity check the TV output by checking to see if the
* DAC register holds a value
--
1.7.0.4


\
 
 \ /
  Last update: 2010-04-20 14:53    [W:0.475 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site