public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3 v2] drm/i915: Introduce new intel_output_name()
Date: Wed, 08 Jan 2014 16:38:49 +0200	[thread overview]
Message-ID: <87fvoybksm.fsf@intel.com> (raw)
In-Reply-To: <1389190703-2978-1-git-send-email-damien.lespiau@intel.com>

On Wed, 08 Jan 2014, Damien Lespiau <damien.lespiau@intel.com> wrote:
> That we can use for debugging purposes.
>
> v2: Use designated initializers for the 'names' array (Paulo Zanoni,
>     Jani Nikula).
>     Add a check in case the array has a hole (which can now remain
>     unnoticed with designated initializers) (Jani Nikula)
>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> (for v1)
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++++++++++
>  drivers/gpu/drm/i915/intel_drv.h     |  1 +
>  2 files changed, 23 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index ba9d62e..40a6247 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -10261,6 +10261,28 @@ static bool has_edp_a(struct drm_device *dev)
>  	return true;
>  }
>  
> +const char *intel_output_name(int output)
> +{
> +	static const char *names[] = {
> +		[INTEL_OUTPUT_UNUSED] = "Unused",
> +		[INTEL_OUTPUT_ANALOG] = "Analog",
> +		[INTEL_OUTPUT_DVO] = "DVO",
> +		[INTEL_OUTPUT_SDVO] = "SDVO",
> +		[INTEL_OUTPUT_LVDS] = "LVDS",
> +		[INTEL_OUTPUT_TVOUT] = "TV",
> +		[INTEL_OUTPUT_HDMI] = "HDMI",
> +		[INTEL_OUTPUT_DISPLAYPORT] = "DisplayPort",
> +		[INTEL_OUTPUT_EDP] = "eDP",
> +		[INTEL_OUTPUT_DSI] = "DSI",
> +		[INTEL_OUTPUT_UNKNOWN] = "Unknown",
> +	};
> +
> +	if (output < 0 || output >= ARRAY_SIZE(names) || !names[output])
> +		return "Invalid";
> +
> +	return names[output];
> +}
> +
>  static void intel_setup_outputs(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 46aea6c..25bbbb5 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -625,6 +625,7 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
>  
>  
>  /* intel_display.c */
> +const char *intel_output_name(int output);
>  int intel_pch_rawclk(struct drm_device *dev);
>  void intel_mark_busy(struct drm_device *dev);
>  void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
> -- 
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2014-01-08 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 16:55 [PATCH 1/3] drm/i915: don't set modes for 2 connectors on the same encoder Paulo Zanoni
2014-01-07 16:55 ` [PATCH 2/3] drm/i915: Introduce new intel_output_name() Paulo Zanoni
2014-01-08  9:51   ` Jani Nikula
2014-01-08 14:18     ` [PATCH 2/3 v2] " Damien Lespiau
2014-01-08 14:38       ` Jani Nikula [this message]
2014-01-07 16:55 ` [PATCH 3/3] drm/i915: Set the digital port encoder personality during modeset Paulo Zanoni
2014-01-10 18:13   ` Damien Lespiau
2014-01-13 18:03     ` [PATCH 3/3 v4] " Damien Lespiau
2014-01-14  9:02       ` Daniel Vetter
2014-01-10 16:17 ` [PATCH 1/3] drm/i915: don't set modes for 2 connectors on the same encoder Damien Lespiau

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=87fvoybksm.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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