Commit eb10ed9a authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

drm/i915: Convert intel_device_info_dump into pretty printer

Convert intel_device_info_dump into pretty printer to be
consistent with the rest of the driver code.
Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171219114346.26308-2-michal.wajdeczko@intel.com
parent a8c9b849
...@@ -931,7 +931,11 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv, ...@@ -931,7 +931,11 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,
intel_display_crc_init(dev_priv); intel_display_crc_init(dev_priv);
intel_device_info_dump(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); intel_detect_preproduction_hw(dev_priv);
......
...@@ -4164,7 +4164,8 @@ mkwrite_device_info(struct drm_i915_private *dev_priv) ...@@ -4164,7 +4164,8 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)
const char *intel_platform_name(enum intel_platform platform); const char *intel_platform_name(enum intel_platform platform);
void intel_device_info_runtime_init(struct drm_i915_private *dev_priv); void intel_device_info_runtime_init(struct drm_i915_private *dev_priv);
void intel_device_info_dump(struct drm_i915_private *dev_priv); void intel_device_info_dump(const struct intel_device_info *info,
struct drm_printer *p);
void intel_device_info_dump_flags(const struct intel_device_info *info, void intel_device_info_dump_flags(const struct intel_device_info *info,
struct drm_printer *p); struct drm_printer *p);
......
...@@ -77,21 +77,19 @@ void intel_device_info_dump_flags(const struct intel_device_info *info, ...@@ -77,21 +77,19 @@ void intel_device_info_dump_flags(const struct intel_device_info *info,
#undef PRINT_FLAG #undef PRINT_FLAG
} }
void intel_device_info_dump(struct drm_i915_private *dev_priv) void intel_device_info_dump(const struct intel_device_info *info,
struct drm_printer *p)
{ {
const struct intel_device_info *info = &dev_priv->info; struct drm_i915_private *dev_priv =
container_of(info, struct drm_i915_private, info);
DRM_DEBUG_DRIVER("i915 device info: platform=%s gen=%i pciid=0x%04x rev=0x%02x", drm_printf(p, "pciid=0x%04x rev=0x%02x platform=%s gen=%i\n",
intel_platform_name(info->platform), INTEL_DEVID(dev_priv),
info->gen, INTEL_REVID(dev_priv),
dev_priv->drm.pdev->device, intel_platform_name(info->platform),
dev_priv->drm.pdev->revision); info->gen);
if (drm_debug & DRM_UT_DRIVER) { intel_device_info_dump_flags(info, p);
struct drm_printer p = drm_debug_printer("i915 device info: ");
intel_device_info_dump_flags(info, &p);
}
} }
static void gen10_sseu_info_init(struct drm_i915_private *dev_priv) static void gen10_sseu_info_init(struct drm_i915_private *dev_priv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment