From patchwork Wed Apr 21 08:01:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 93831 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3L84QWv009126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 21 Apr 2010 08:05:02 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1O4Use-0000Mw-30; Wed, 21 Apr 2010 08:01:56 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1O4Usd-0000Mr-LC for dri-devel@lists.sourceforge.net; Wed, 21 Apr 2010 08:01:55 +0000 X-ACL-Warn: Received: from mga07.intel.com ([143.182.124.22] helo=azsmga101.ch.intel.com) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1O4Usc-00078t-63 for dri-devel@lists.sourceforge.net; Wed, 21 Apr 2010 08:01:55 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 21 Apr 2010 01:01:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.52,249,1270450800"; d="asc'?scan'208";a="268271427" Received: from zhen-devel.sh.intel.com (HELO zhen-devel) ([10.239.13.159]) by azsmga001.ch.intel.com with ESMTP; 21 Apr 2010 01:01:46 -0700 Date: Wed, 21 Apr 2010 16:01:46 +0800 From: Zhenyu Wang To: Eric Anholt Subject: Re: [PATCH] i915: Skip wrong TV outputs on HP laptop Message-ID: <20100421080146.GA30452@zhen-devel.sh.intel.com> Mail-Followup-To: Eric Anholt , Takashi Iwai , David Airlie , dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Jesse Barnes References: <87sk6q82tr.fsf@pollan.anholt.net> MIME-Version: 1.0 In-Reply-To: <87sk6q82tr.fsf@pollan.anholt.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1O4Usc-00078t-63 Cc: Takashi Iwai , David Airlie , dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Jesse Barnes X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: Zhenyu Wang List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 21 Apr 2010 08:05:03 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 081cb90..a96a14f 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -1612,6 +1612,71 @@ static int tv_is_present_in_vbt(struct drm_device *dev) return ret; } +struct intel_tv_quirk { + int pci_device; + int subsys_vendor; + int subsys_device; +}; + +struct intel_tv_quirk intel_tv_quirk_list[] = { + /* Clevo M720R has no tv output */ + { 0x2a02, 0x1558, 0x0721 }, + /* Dell Latitude X1 */ + { 0x2592, 0x1028, 0x01a3 }, + /* Dell Latitude X1 / D630 (LP: #197740) */ + { 0x2592, 0x1028, 0x01f9 }, + /* Dell XPS 1330 */ + { 0x2a02, 0x1028, 0x0209 }, + /* Dell Inspiron 1535 */ + { 0x2a02, 0x1028, 0x0254 }, + /* Dell Inspiron 1735 */ + { 0x2a02, 0x1028, 0x0256 }, + /* Dell Inspiron 1318 */ + { 0x2a02, 0x1028, 0x0286 }, + /* Dell Vostro A840 (LP: #235155) */ + { 0x2a02, 0x1028, 0x0298 }, + /* Lenovo 3000 v200 */ + { 0x2a02, 0x17aa, 0x3c18 }, + /* Panasonic Toughbook CF-Y4 has no TV output */ + { 0x2592, 0x10f7, 0x8338 }, + /* Panasonic Toughbook CF-Y7 has no TV output */ + { 0x2a02, 0x10f7, 0x8338 }, + /* Toshiba Satellite U300 has no TV output */ + { 0x2a02, 0x1179, 0xff50 }, + /* Samsung Q35 has no TV output */ + { 0x27a2, 0x144d, 0xc504 }, + /* Samsung Q45 has no TV output */ + { 0x2a02, 0x144d, 0xc510 }, + /* HP Compaq nx6110 has no TV output */ + { 0x2592, 0x103c, 0x099c }, + /* HP Compaq nx6310 has no TV output */ + { 0x27a2, 0x103c, 0x30aa }, + /* HP Compaq 6730s has no TV output */ + { 0x2a42, 0x103c, 0x30e8 }, + /* Ordi Enduro UW31 (See LP: #152416) */ + { 0x27a2, 0x1584, 0x9900 }, + /* Littlebit Sepia X35 (rebranded Asus Z37E) (See LP: #201257) */ + { 0x2a02, 0x1043, 0x8265 }, + /* end mark */ + { 0, 0, 0 } +}; + +static bool +intel_tv_check(struct drm_device *dev) +{ + struct pci_dev *pdev = dev->pdev; + struct intel_tv_quirk *q = intel_tv_quirk_list; + + while (q && q->pci_device) { + if (q->pci_device == dev->pci_device && + q->subsys_vendor == pdev->subsystem_vendor && + q->subsys_device == pdev->subsystem_device) + return true; + ++q; + } + return false; +} + void intel_tv_init(struct drm_device *dev) { @@ -1635,6 +1700,10 @@ intel_tv_init(struct drm_device *dev) if (!dev_priv->int_tv_support) return; + /* No real TV output quirks */ + if (intel_tv_check(dev)) + return; + /* * Sanity check the TV output by checking to see if the * DAC register holds a value