From patchwork Wed Aug 8 16:11:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1296651 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 505323FC23 for ; Wed, 8 Aug 2012 16:12:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CECE4A0A40 for ; Wed, 8 Aug 2012 09:12:08 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CEF3A0A4B for ; Wed, 8 Aug 2012 09:10:56 -0700 (PDT) Received: by weyr3 with SMTP id r3so662230wey.36 for ; Wed, 08 Aug 2012 09:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer; bh=SwhsCivRJVNM+vr6U0gquN+i1qozw5wXWDMoooqbMXI=; b=CEjm3ovPq0osQnBxtjIuAuPNfpEKOBUILKHxyhNQa3atuDCbkMXCW8QEXXEQiAzWO8 AbDwq+Vd9GQLbhi0wy/zu9UBXelg3Em+YA1Do99rnzkg1uX28pnfAM1zXKqIQh2CiM2K XVlAycWD/Va4O5E0jdO0XIyLIs2KvVicKS1KY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=SwhsCivRJVNM+vr6U0gquN+i1qozw5wXWDMoooqbMXI=; b=QxYk4ocqVfZF9p4rRlFYAwuIoI1zqIzr8gsF3D+XbnmKf8Cdt1RcsFd+KClSE684zH GQqLNGOQLew2Gg9/ohbAR+fj7/GqKGJTppB+hMuwpLlAdKZTtOkjfYqTicAaP/AYvw/L 4CFktxcoBV9m44aO2Z3uBb/GClMu10ZIKpEoX0L/qFRcZ11kjInhzBA1nQVAATzthpPU HRoyIZKcACo7xfxcg2wJNJFleYmyqY75jVa8K6LIQxVbg1WpYrHF8j3MmwjEBNXxIMoU 7Y4ZgirnDKL7XXPRxlJeEZb/4fI75bhbZk9lz0YWrNwcaZFvIdo7ax+xVL+qEvITHm+5 Ak+Q== Received: by 10.180.73.180 with SMTP id m20mr1326649wiv.19.1344442256155; Wed, 08 Aug 2012 09:10:56 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id cl8sm5807067wib.10.2012.08.08.09.10.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 09:10:55 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 8 Aug 2012 18:11:13 +0200 Message-Id: <1344442273-31700-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmdhhsLCkA1oMY/+M7joq0TBvf2ROsG7v8fNjwCAHR5S55wmO8Lc/MnxrX9uU4289KFGKav Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: dump the device info 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 Handy for lazy people like me, or when people forget to add the output of lspci -nn. Signed-off-by: Daniel Vetter --- 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;