drm/i915/display_power: use struct drm_device based logging
Convert all the DRM_* logging macros to the struct drm_device based macros to provide device specific logging. No functional changes. Generated using the following semantic patch, originally written by Wambui Karuga <wambui.karugax@gmail.com>, with manual fixups on top: @@ identifier fn, T; @@ fn(...,struct drm_i915_private *T,...) { <+... ( -DRM_INFO( +drm_info(&T->drm, ...) | -DRM_NOTE( +drm_notice(&T->drm, ...) | -DRM_ERROR( +drm_err(&T->drm, ...) | -DRM_WARN( +drm_warn(&T->drm, ...) | -DRM_DEBUG_DRIVER( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_KMS( +drm_dbg_kms(&T->drm, ...) | -DRM_DEBUG_ATOMIC( +drm_dbg_atomic(&T->drm, ...) ) ...+> } @@ identifier fn, T; @@ fn(...) { ... struct drm_i915_private *T = ...; <+... ( -DRM_INFO( +drm_info(&T->drm, ...) | -DRM_NOTE( +drm_notice(&T->drm, ...) | -DRM_ERROR( +drm_err(&T->drm, ...) | -DRM_WARN( +drm_warn(&T->drm, ...) | -DRM_DEBUG_DRIVER( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_KMS( +drm_dbg_kms(&T->drm, ...) | -DRM_DEBUG_ATOMIC( +drm_dbg_atomic(&T->drm, ...) ) ...+> } Cc: Wambui Karuga <wambui.karugax@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/25e56d1b7df3b1e91024eb969fb839fdcbdcb35e.1584714939.git.jani.nikula@intel.com
This commit is contained in:
parent
47bdb1caba
commit
3c4e3870fa
|
@ -1873,20 +1873,27 @@ __async_put_domains_state_ok(struct i915_power_domains *power_domains)
|
|||
static void print_power_domains(struct i915_power_domains *power_domains,
|
||||
const char *prefix, u64 mask)
|
||||
{
|
||||
struct drm_i915_private *i915 = container_of(power_domains,
|
||||
struct drm_i915_private,
|
||||
power_domains);
|
||||
enum intel_display_power_domain domain;
|
||||
|
||||
DRM_DEBUG_DRIVER("%s (%lu):\n", prefix, hweight64(mask));
|
||||
drm_dbg(&i915->drm, "%s (%lu):\n", prefix, hweight64(mask));
|
||||
for_each_power_domain(domain, mask)
|
||||
DRM_DEBUG_DRIVER("%s use_count %d\n",
|
||||
intel_display_power_domain_str(domain),
|
||||
power_domains->domain_use_count[domain]);
|
||||
drm_dbg(&i915->drm, "%s use_count %d\n",
|
||||
intel_display_power_domain_str(domain),
|
||||
power_domains->domain_use_count[domain]);
|
||||
}
|
||||
|
||||
static void
|
||||
print_async_put_domains_state(struct i915_power_domains *power_domains)
|
||||
{
|
||||
DRM_DEBUG_DRIVER("async_put_wakeref %u\n",
|
||||
power_domains->async_put_wakeref);
|
||||
struct drm_i915_private *i915 = container_of(power_domains,
|
||||
struct drm_i915_private,
|
||||
power_domains);
|
||||
|
||||
drm_dbg(&i915->drm, "async_put_wakeref %u\n",
|
||||
power_domains->async_put_wakeref);
|
||||
|
||||
print_power_domains(power_domains, "async_put_domains[0]",
|
||||
power_domains->async_put_domains[0]);
|
||||
|
@ -4480,7 +4487,8 @@ void icl_dbuf_slices_update(struct drm_i915_private *dev_priv,
|
|||
drm_WARN(&dev_priv->drm, hweight8(req_slices) > max_slices,
|
||||
"Invalid number of dbuf slices requested\n");
|
||||
|
||||
DRM_DEBUG_KMS("Updating dbuf slices to 0x%x\n", req_slices);
|
||||
drm_dbg_kms(&dev_priv->drm, "Updating dbuf slices to 0x%x\n",
|
||||
req_slices);
|
||||
|
||||
/*
|
||||
* Might be running this in parallel to gen9_dc_off_power_well_enable
|
||||
|
|
Loading…
Reference in New Issue