drm/i915: only report hpd connector status change when it actually changed
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +10 -4
@@ -665,7 +665,8 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, 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;
@@ -673,11 +674,16 @@ static int intel_hpd_irq_event(struct drm_device *dev, struct drm_connector *con old_status = connector->status; 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,drm_get_connector_name (connector), - old_status, connector->status); -return (old_status != connector->status); +drm_get_connector_status_name (old_status), +drm_get_connector_status_name (connector->status)); + +return true; }/*
Signature · 1 line
1.7.9.5
Quoted 16 lines · Jani Nikula
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 Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_irq.c +0
-0
drivers/gpu/drm/i915/i915_irq.c static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, · line 669
Quoted 6 lines
drivers/gpu/drm/i915/i915_irq.c +2
-1@@ -665,7 +665,8 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, 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)
You change the return value to a bool here, but no users. Missing follow-up patch?
-Daniel
Quoted 30 lines
drivers/gpu/drm/i915/i915_irq.c +8
-3{enum drm_connector_status old_status;@@ -673,11 +674,16 @@ static int intel_hpd_irq_event(struct drm_device *dev, struct drm_connector *con old_status = connector->status; 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,drm_get_connector_name (connector), - old_status, connector->status); -return (old_status != connector->status); +drm_get_connector_status_name (old_status), +drm_get_connector_status_name (connector->status)); + +return true; }/* Signature · 6 lines
1.7.9.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 20 lines · Daniel Vetter
Quoted 19 lines · Jani Nikula
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 Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_irq.c +0
-0@@ -665,7 +665,8 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, crtc); }
Quoted 6 lines
drivers/gpu/drm/i915/i915_irq.c static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, · line 669
Quoted 3 lines
drivers/gpu/drm/i915/i915_irq.c +2
-1-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)You change the return value to a bool here, but no users. Missing follow-up patch?
Nope, the only call site in i915_hotplug_work_func() already treats it as a bool.
Jani.
Quoted 37 lines
-Daniel
Quoted 30 lines
drivers/gpu/drm/i915/i915_irq.c +8
-3{enum drm_connector_status old_status;@@ -673,11 +674,16 @@ static int intel_hpd_irq_event(struct drm_device *dev, struct drm_connector *con old_status = connector->status; 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,drm_get_connector_name (connector), - old_status, connector->status); -return (old_status != connector->status); +drm_get_connector_status_name (old_status), +drm_get_connector_status_name (connector->status)); + +return true; }/* Signature · 6 lines
1.7.9.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 28 lines · Jani Nikula
Quoted 20 lines · Daniel Vetter
Quoted 19 lines · Jani Nikula
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 Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_irq.c +0
-0@@ -665,7 +665,8 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, crtc); }Quoted 6 lines
drivers/gpu/drm/i915/i915_irq.c static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, · line 669
Quoted 3 lines
drivers/gpu/drm/i915/i915_irq.c +2
-1-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)You change the return value to a bool here, but no users. Missing follow-up patch?
Quoted 2 lines
Nope, the only call site in
i915_hotplug_work_func()already treats it as a bool.
Somehow I've thought it started out with a void and you switched to bool. Thanks for removing my blinders, patch merged ;-)
Cheers, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch