From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH] drm/i915: dump the device info
Date: Wed, 8 Aug 2012 18:11:13 +0200 [thread overview]
Message-ID: <1344442273-31700-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
Handy for lazy people like me, or when people forget to add the output
of lspci -nn.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_dma.c | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index d57ea16..dfa2ab2 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1428,6 +1428,42 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv)
kfree(ap);
}
+static void i915_dump_device_info(struct drm_i915_private *dev_priv)
+{
+ const struct intel_device_info *info = dev_priv->info;
+
+#define DEV_FLAG_STR(name) info->name ? #name "," : ""
+ DRM_DEBUG_DRIVER("i915 device info: gen=%i, pciid=0x%04x flags="
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+ info->gen,
+ dev_priv->dev->pdev->device,
+ DEV_FLAG_STR(is_mobile),
+ DEV_FLAG_STR(is_i85x),
+ DEV_FLAG_STR(is_i915g),
+ DEV_FLAG_STR(is_i945gm),
+ DEV_FLAG_STR(is_g33),
+ DEV_FLAG_STR(need_gfx_hws),
+ DEV_FLAG_STR(is_g4x),
+ DEV_FLAG_STR(is_pineview),
+ DEV_FLAG_STR(is_broadwater),
+ DEV_FLAG_STR(is_crestline),
+ DEV_FLAG_STR(is_ivybridge),
+ DEV_FLAG_STR(is_valleyview),
+ DEV_FLAG_STR(is_haswell),
+ DEV_FLAG_STR(has_force_wake),
+ DEV_FLAG_STR(has_fbc),
+ DEV_FLAG_STR(has_pipe_cxsr),
+ DEV_FLAG_STR(has_hotplug),
+ DEV_FLAG_STR(cursor_needs_physical),
+ DEV_FLAG_STR(has_overlay),
+ DEV_FLAG_STR(overlay_needs_physical),
+ DEV_FLAG_STR(supports_tv),
+ DEV_FLAG_STR(has_bsd_ring),
+ DEV_FLAG_STR(has_blt_ring),
+ DEV_FLAG_STR(has_llc));
+#undef DEV_FLAG_STR
+}
+
/**
* i915_driver_load - setup chip and create an initial config
* @dev: DRM device
@@ -1452,7 +1488,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (info->gen >= 6 && !drm_core_check_feature(dev, DRIVER_MODESET))
return -ENODEV;
-
/* i915 has 4 more counters */
dev->counters += 4;
dev->types[6] = _DRM_STAT_IRQ;
@@ -1468,6 +1503,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
dev_priv->dev = dev;
dev_priv->info = info;
+ i915_dump_device_info(dev_priv);
+
if (i915_get_bridge_dev(dev)) {
ret = -EIO;
goto free_priv;
--
1.7.10.4
next reply other threads:[~2012-08-08 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-08 16:11 Daniel Vetter [this message]
2012-08-08 18:29 ` [PATCH] drm/i915: dump the device info Chris Wilson
2012-08-08 20:01 ` Daniel Vetter
2012-08-08 21:41 ` Chris Wilson
2012-08-09 16:29 ` Daniel Vetter
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=1344442273-31700-1-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.