public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/i915: Use connector_type for printing in intel_connector_info
Date: Mon, 20 Jun 2016 18:04:59 +0300	[thread overview]
Message-ID: <20160620150459.GT4329@intel.com> (raw)
In-Reply-To: <1466431059-8919-5-git-send-email-maarten.lankhorst@linux.intel.com>

On Mon, Jun 20, 2016 at 03:57:39PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 38f2cbc19f4a..7ee24626e0a6 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2989,14 +2989,20 @@ static void intel_connector_info(struct seq_file *m,
>  		seq_printf(m, "\tCEA rev: %d\n",
>  			   connector->display_info.cea_rev);
>  	}
> -	if (intel_encoder) {
> -		if (intel_encoder->type == INTEL_OUTPUT_DISPLAYPORT ||
> -		    intel_encoder->type == INTEL_OUTPUT_EDP)
> +
> +	switch (connector->connector_type) {
> +	case DRM_MODE_CONNECTOR_DisplayPort:
> +	case DRM_MODE_CONNECTOR_eDP:
> +		if (intel_encoder->type != INTEL_OUTPUT_DP_MST)
>  			intel_dp_info(m, intel_connector);
> -		else if (intel_encoder->type == INTEL_OUTPUT_HDMI)
> -			intel_hdmi_info(m, intel_connector);
> -		else if (intel_encoder->type == INTEL_OUTPUT_LVDS)
> +		break;
> +	case DRM_MODE_CONNECTOR_LVDS:
> +		if (intel_encoder->type != INTEL_OUTPUT_SDVO)

This could blow up with DVO I think. It would be a bit more clear
(and less dangerous) to keep checking for the encoder type(s) we
want, rather than exclude types we don't want.

With that stuff fixed, the series lgtm
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  			intel_lvds_info(m, intel_connector);
> +		break;
> +	case DRM_MODE_CONNECTOR_HDMIA:
> +		if (intel_encoder->type != INTEL_OUTPUT_SDVO)
> +			intel_hdmi_info(m, intel_connector);
>  	}
>  
>  	seq_printf(m, "\tmodes:\n");
> -- 
> 2.5.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-06-20 15:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 13:57 [PATCH 0/4] Fix looking at encoder->type in debugfs Maarten Lankhorst
2016-06-20 13:57 ` [PATCH 1/4] drm/i915: Use connector->name in drrs debugfs Maarten Lankhorst
2016-06-20 13:57 ` [PATCH 2/4] drm/i915: Use connector_type instead of intel_encoder->type for DP Maarten Lankhorst
2016-06-20 13:57 ` [PATCH 3/4] drm/i915: Use atomic state and connector_type in i915_sink_src Maarten Lankhorst
2016-06-20 13:57 ` [PATCH 4/4] drm/i915: Use connector_type for printing in intel_connector_info Maarten Lankhorst
2016-06-20 15:04   ` Ville Syrjälä [this message]
2016-06-21 10:00     ` [PATCH v2 4/4] drm/i915: Use connector_type for printing in intel_connector_info, v2 Maarten Lankhorst
2016-06-20 14:17 ` ✓ Ro.CI.BAT: success for Fix looking at encoder->type in debugfs Patchwork

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=20160620150459.GT4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.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