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: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20171219114346.26308-2-michal.wajdeczko@intel.com
This commit is contained in:
parent
a8c9b84969
commit
eb10ed9a9e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue