public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: only report hpd connector status change when it actually changed
Date: Tue, 17 Sep 2013 16:36:02 +0200	[thread overview]
Message-ID: <20130917143602.GN32145@phenom.ffwll.local> (raw)
In-Reply-To: <1379417195-18097-1-git-send-email-jani.nikula@intel.com>

On Tue, Sep 17, 2013 at 02:26:34PM +0300, Jani Nikula wrote:
> 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 <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_irq.c |   14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 13d26cf..a42f30b 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -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

>  {
>  	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;
>  }
>  
>  /*
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-09-17 14:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 11:26 [PATCH] drm/i915: only report hpd connector status change when it actually changed Jani Nikula
2013-09-17 14:36 ` Daniel Vetter [this message]
2013-09-17 14:56   ` Jani Nikula
2013-09-17 15:27     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130917143602.GN32145@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox