提交 eb10ed9a 编写于 作者: M Michal Wajdeczko 提交者: 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: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171219114346.26308-2-michal.wajdeczko@intel.com
上级 a8c9b849
......@@ -931,7 +931,11 @@ static int i915_driver_init_early(struct drm_i915_private *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);
......
......@@ -4164,7 +4164,8 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)
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_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,
struct drm_printer *p);
......
......@@ -77,21 +77,19 @@ void intel_device_info_dump_flags(const struct intel_device_info *info,
#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",
intel_platform_name(info->platform),
info->gen,
dev_priv->drm.pdev->device,
dev_priv->drm.pdev->revision);
drm_printf(p, "pciid=0x%04x rev=0x%02x platform=%s gen=%i\n",
INTEL_DEVID(dev_priv),
INTEL_REVID(dev_priv),
intel_platform_name(info->platform),
info->gen);
if (drm_debug & DRM_UT_DRIVER) {
struct drm_printer p = drm_debug_printer("i915 device info: ");
intel_device_info_dump_flags(info, &p);
}
intel_device_info_dump_flags(info, p);
}
static void gen10_sseu_info_init(struct drm_i915_private *dev_priv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册