提交 67c347ff 编写于 作者: J Jani Nikula 提交者: Daniel Vetter

drm/i915: only report hpd connector status change when it actually changed

This reduces dmesg noise when there's a glitch on the hpd line, or there
are more than one connectors on the same hpd line and only one of them
changes.

While at it, switch to use the friendly status names instead of numbers.
Signed-off-by: NJani Nikula <jani.nikula@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 46a5ae9f
...@@ -665,7 +665,8 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, ...@@ -665,7 +665,8 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe,
crtc); crtc);
} }
static int intel_hpd_irq_event(struct drm_device *dev, struct drm_connector *connector) static bool intel_hpd_irq_event(struct drm_device *dev,
struct drm_connector *connector)
{ {
enum drm_connector_status old_status; enum drm_connector_status old_status;
...@@ -673,11 +674,16 @@ static int intel_hpd_irq_event(struct drm_device *dev, struct drm_connector *con ...@@ -673,11 +674,16 @@ static int intel_hpd_irq_event(struct drm_device *dev, struct drm_connector *con
old_status = connector->status; old_status = connector->status;
connector->status = connector->funcs->detect(connector, false); connector->status = connector->funcs->detect(connector, false);
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n", if (old_status == connector->status)
return false;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n",
connector->base.id, connector->base.id,
drm_get_connector_name(connector), drm_get_connector_name(connector),
old_status, connector->status); drm_get_connector_status_name(old_status),
return (old_status != connector->status); drm_get_connector_status_name(connector->status));
return true;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册