intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 2/2] drm/i915: Add simulator's host bridge
Date: Fri, 20 Jul 2012 10:43:30 -0700	[thread overview]
Message-ID: <1342806210-4807-2-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1342806210-4807-1-git-send-email-ben@bwidawsk.net>

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 <ben@bwidawsk.net>
---
 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);
 		}
-- 
1.7.11.2

  reply	other threads:[~2012-07-20 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 17:43 [PATCH 1/2] drm/i915: Give simulator a way to skip forcewake Ben Widawsky
2012-07-20 17:43 ` Ben Widawsky [this message]
2012-07-21  9:42   ` [PATCH 2/2] drm/i915: Add simulator's host bridge Chris Wilson
2012-07-21 14:52     ` Ben Widawsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342806210-4807-2-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).