From patchwork Fri Jul 20 17:43:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 1221911 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 21B20E0038 for ; Fri, 20 Jul 2012 17:44:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F87B9F3A7 for ; Fri, 20 Jul 2012 10:44:56 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 294DCA1139 for ; Fri, 20 Jul 2012 10:43:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cloud01.chad-versace.us (Postfix) with ESMTP id 934B71808E8; Fri, 20 Jul 2012 17:46:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at static.cloud-ips.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-100 required=3.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham Received: from cloud01.chad-versace.us ([127.0.0.1]) by localhost (cloud01.static.cloud-ips.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bHHM93Ual8Bc; Fri, 20 Jul 2012 17:46:23 +0000 (UTC) Received: from bolo_yeung.jf.intel.com (unknown [134.134.139.76]) by cloud01.chad-versace.us (Postfix) with ESMTPSA id 60F9818107E; Fri, 20 Jul 2012 17:46:23 +0000 (UTC) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Fri, 20 Jul 2012 10:43:30 -0700 Message-Id: <1342806210-4807-2-git-send-email-ben@bwidawsk.net> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1342806210-4807-1-git-send-email-ben@bwidawsk.net> References: <1342806210-4807-1-git-send-email-ben@bwidawsk.net> Cc: Ben Widawsky Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Add simulator's host bridge X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Add the host bridge ID used by the simulator. This was added in a previous patch for the agp layer, but wasn't preserved here. It also gives us an opportunity to let the rest of the driver know we're running as the simulator for various workarounds. We must always do this early as it's the only way we have to detect the simulator. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 72e86a7..ebaaea1 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -387,6 +387,7 @@ MODULE_DEVICE_TABLE(pci, pciidlist); #define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00 #define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00 #define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00 +#define INTEL_PCH_HAS_DEVICE_ID_TYPE 0x7000 void intel_detect_pch(struct drm_device *dev) { @@ -422,6 +423,12 @@ void intel_detect_pch(struct drm_device *dev) dev_priv->pch_type = PCH_LPT; dev_priv->num_pch_pll = 0; DRM_DEBUG_KMS("Found LynxPoint PCH\n"); + } else if (id == INTEL_PCH_HAS_DEVICE_ID_TYPE) { + /* XXX it is important to do this early */ + dev_priv->is_simulator = true; + dev_priv->pch_type = PCH_CPT; + dev_priv->num_pch_pll = 2; + DRM_DEBUG_KMS("Found HAS PCH\n"); } BUG_ON(dev_priv->num_pch_pll > I915_NUM_PLLS); }