From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH v2 7/7] drm/i915: Dump device info at once
Date: Thu, 21 Dec 2017 18:53:34 +0000 [thread overview]
Message-ID: <20171221185334.17396-8-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20171221185334.17396-1-michal.wajdeczko@intel.com>
We are dumping device info separately for sw_only and runtime part
but to simplify the code we can also do it from one place once
we complete driver load.
v2: use dedicated welcome function (Chris)
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.c | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 5bf4f58..6c8da9d 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -931,12 +931,6 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,
intel_display_crc_init(dev_priv);
- if (drm_debug & DRM_UT_DRIVER) {
- struct drm_printer p = drm_debug_printer("i915 device info:");
-
- intel_device_info_dump(&dev_priv->info, &p);
- }
-
intel_detect_preproduction_hw(dev_priv);
return 0;
@@ -1089,11 +1083,6 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
return -ENODEV;
intel_device_info_runtime_init(mkwrite_device_info(dev_priv));
- if (drm_debug & DRM_UT_DRIVER) {
- struct drm_printer p = drm_debug_printer("i915 device info:");
-
- intel_device_info_dump_runtime(&dev_priv->info, &p);
- }
intel_sanitize_options(dev_priv);
@@ -1303,6 +1292,21 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
i915_gem_shrinker_unregister(dev_priv);
}
+static void i915_welcome_messages(struct drm_i915_private *dev_priv)
+{
+ if (drm_debug & DRM_UT_DRIVER) {
+ struct drm_printer p = drm_debug_printer("i915 device info:");
+
+ intel_device_info_dump(&dev_priv->info, &p);
+ intel_device_info_dump_runtime(&dev_priv->info, &p);
+ }
+
+ if (IS_ENABLED(CONFIG_DRM_I915_DEBUG))
+ DRM_INFO("DRM_I915_DEBUG enabled\n");
+ if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
+ DRM_INFO("DRM_I915_DEBUG_GEM enabled\n");
+}
+
/**
* i915_driver_load - setup chip and create an initial config
* @pdev: PCI device
@@ -1388,13 +1392,10 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
intel_init_ipc(dev_priv);
- if (IS_ENABLED(CONFIG_DRM_I915_DEBUG))
- DRM_INFO("DRM_I915_DEBUG enabled\n");
- if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
- DRM_INFO("DRM_I915_DEBUG_GEM enabled\n");
-
intel_runtime_pm_put(dev_priv);
+ i915_welcome_messages(dev_priv);
+
return 0;
out_cleanup_hw:
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-12-21 18:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 18:53 [PATCH 0/8] Misc i915_drv.h cleanups Michal Wajdeczko
2017-12-21 18:53 ` [PATCH v2 1/7] drm/i915: Move some utility functions to i915_util.h Michal Wajdeczko
2017-12-21 18:53 ` [PATCH v2 2/7] drm/i915: Move display related definitions to dedicated header Michal Wajdeczko
2017-12-21 18:53 ` [PATCH v2 3/7] drm/i915: Move opregion definitions to dedicated intel_opregion.h Michal Wajdeczko
2017-12-21 18:53 ` [PATCH v2 4/7] drm/i915: Move intel_device_info definitions to its own header Michal Wajdeczko
2017-12-21 18:53 ` [PATCH v2 5/7] drm/i915: Update intel_device_info_runtime_init() parameter Michal Wajdeczko
2017-12-21 18:53 ` [PATCH v2 6/7] drm/i915: Add pretty printer for runtime part of intel_device_info Michal Wajdeczko
2017-12-21 21:37 ` Chris Wilson
2017-12-21 18:53 ` Michal Wajdeczko [this message]
2017-12-21 21:36 ` [PATCH v2 7/7] drm/i915: Dump device info at once Chris Wilson
2017-12-21 19:16 ` ✓ Fi.CI.BAT: success for Misc i915_drv.h cleanups (rev2) Patchwork
2017-12-21 21:36 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-22 12:27 ` Chris Wilson
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=20171221185334.17396-8-michal.wajdeczko@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/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.