Commit 1084f5c8 authored by Wambui Karuga's avatar Wambui Karuga Committed by Jani Nikula

drm/i915/hotplug: convert to drm_device based logging.

Converts various instances of the printk based drm logging macros to the
struct drm_device based logging macros in i915/display/intel_hotplug.c.
In some cases, this involves extracting the drm_i915_private pointer from
the drm_device struct to be used in the logging macros.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3dfda89ab4a234f299ada77abd14163cef3f8bd4.1583766715.git.jani.nikula@intel.com
parent 6a9cc4bf
...@@ -170,10 +170,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv, ...@@ -170,10 +170,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,
hpd->stats[pin].count += increment; hpd->stats[pin].count += increment;
if (hpd->stats[pin].count > threshold) { if (hpd->stats[pin].count > threshold) {
hpd->stats[pin].state = HPD_MARK_DISABLED; hpd->stats[pin].state = HPD_MARK_DISABLED;
DRM_DEBUG_KMS("HPD interrupt storm detected on PIN %d\n", pin); drm_dbg_kms(&dev_priv->drm,
"HPD interrupt storm detected on PIN %d\n", pin);
storm = true; storm = true;
} else { } else {
DRM_DEBUG_KMS("Received HPD interrupt on PIN %d - cnt: %d\n", pin, drm_dbg_kms(&dev_priv->drm,
"Received HPD interrupt on PIN %d - cnt: %d\n",
pin,
hpd->stats[pin].count); hpd->stats[pin].count);
} }
...@@ -202,7 +205,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv) ...@@ -202,7 +205,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
dev_priv->hotplug.stats[pin].state != HPD_MARK_DISABLED) dev_priv->hotplug.stats[pin].state != HPD_MARK_DISABLED)
continue; continue;
DRM_INFO("HPD interrupt storm detected on connector %s: " drm_info(&dev_priv->drm,
"HPD interrupt storm detected on connector %s: "
"switching from hotplug detection to polling\n", "switching from hotplug detection to polling\n",
connector->base.name); connector->base.name);
...@@ -244,7 +248,8 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work) ...@@ -244,7 +248,8 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)
continue; continue;
if (connector->base.polled != connector->polled) if (connector->base.polled != connector->polled)
DRM_DEBUG_DRIVER("Reenabling HPD on connector %s\n", drm_dbg(&dev_priv->drm,
"Reenabling HPD on connector %s\n",
connector->base.name); connector->base.name);
connector->base.polled = connector->polled; connector->base.polled = connector->polled;
} }
...@@ -280,7 +285,8 @@ intel_encoder_hotplug(struct intel_encoder *encoder, ...@@ -280,7 +285,8 @@ intel_encoder_hotplug(struct intel_encoder *encoder,
if (old_status == connector->base.status) if (old_status == connector->base.status)
return INTEL_HOTPLUG_UNCHANGED; return INTEL_HOTPLUG_UNCHANGED;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n", drm_dbg_kms(&to_i915(dev)->drm,
"[CONNECTOR:%d:%s] status updated from %s to %s\n",
connector->base.base.id, connector->base.base.id,
connector->base.name, connector->base.name,
drm_get_connector_status_name(old_status), drm_get_connector_status_name(old_status),
...@@ -358,7 +364,7 @@ static void i915_hotplug_work_func(struct work_struct *work) ...@@ -358,7 +364,7 @@ static void i915_hotplug_work_func(struct work_struct *work)
u32 hpd_retry_bits; u32 hpd_retry_bits;
mutex_lock(&dev->mode_config.mutex); mutex_lock(&dev->mode_config.mutex);
DRM_DEBUG_KMS("running encoder hotplug functions\n"); drm_dbg_kms(&dev_priv->drm, "running encoder hotplug functions\n");
spin_lock_irq(&dev_priv->irq_lock); spin_lock_irq(&dev_priv->irq_lock);
...@@ -386,7 +392,8 @@ static void i915_hotplug_work_func(struct work_struct *work) ...@@ -386,7 +392,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
struct intel_encoder *encoder = struct intel_encoder *encoder =
intel_attached_encoder(connector); intel_attached_encoder(connector);
DRM_DEBUG_KMS("Connector %s (pin %i) received hotplug event.\n", drm_dbg_kms(&dev_priv->drm,
"Connector %s (pin %i) received hotplug event.\n",
connector->base.name, pin); connector->base.name, pin);
switch (encoder->hotplug(encoder, connector, switch (encoder->hotplug(encoder, connector,
...@@ -472,7 +479,8 @@ void intel_hpd_irq_handler(struct drm_i915_private *dev_priv, ...@@ -472,7 +479,8 @@ void intel_hpd_irq_handler(struct drm_i915_private *dev_priv,
long_hpd = long_mask & BIT(pin); long_hpd = long_mask & BIT(pin);
DRM_DEBUG_DRIVER("digital hpd on [ENCODER:%d:%s] - %s\n", drm_dbg(&dev_priv->drm,
"digital hpd on [ENCODER:%d:%s] - %s\n",
encoder->base.base.id, encoder->base.name, encoder->base.base.id, encoder->base.name,
long_hpd ? "long" : "short"); long_hpd ? "long" : "short");
queue_dig = true; queue_dig = true;
......
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