public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Chris Clayton <chris2553@googlemail.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add limited color range readout for HDMI/DP ports on g4x/vlv/chv
Date: Fri, 12 Sep 2014 16:08:50 +0100	[thread overview]
Message-ID: <54130C82.5090605@googlemail.com> (raw)
In-Reply-To: <1410525989-25757-1-git-send-email-ville.syrjala@linux.intel.com>



On 09/12/14 13:46, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The limited color range knob is in the port registers on
> g4x and vlv/chv for HDMI, and on g4x for DP. Add the relevant code
> to read out the hardware state into pipe config. On vlv/chv the
> DP port limited color range knob is in PIPECONF for which we
> already have readout code.
> 
With the patch below applied, the warning has gone away. My thanks to Daniel and Ville.

Tested-by: Chris Clayton <chris2553@googlemail.com>

> Cc: Chris Clayton <chris2553@googlemail.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c   | 4 ++++
>  drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index d8e868a..d73b4b7 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1910,6 +1910,10 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
>  
>  	pipe_config->adjusted_mode.flags |= flags;
>  
> +	if (!HAS_PCH_SPLIT(dev) && !IS_VALLEYVIEW(dev) &&
> +	    tmp & DP_COLOR_RANGE_16_235)
> +		pipe_config->limited_color_range = true;
> +
>  	pipe_config->has_dp_encoder = true;
>  
>  	intel_dp_get_m_n(crtc, pipe_config);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index c586173..8199371 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -712,7 +712,8 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder,
>  				  struct intel_crtc_config *pipe_config)
>  {
>  	struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
> -	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
> +	struct drm_device *dev = encoder->base.dev;
> +	struct drm_i915_private *dev_priv = dev->dev_private;
>  	u32 tmp, flags = 0;
>  	int dotclock;
>  
> @@ -734,6 +735,10 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder,
>  	if (tmp & HDMI_MODE_SELECT_HDMI)
>  		pipe_config->has_audio = true;
>  
> +	if (!HAS_PCH_SPLIT(dev) &&
> +	    tmp & HDMI_COLOR_RANGE_16_235)
> +		pipe_config->limited_color_range = true;
> +
>  	pipe_config->adjusted_mode.flags |= flags;
>  
>  	if ((tmp & SDVO_COLOR_FORMAT_MASK) == HDMI_COLOR_FORMAT_12bpc)
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-09-12 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  7:49 v3.17-rc4+: DRM warning Chris Clayton
2014-09-12  8:51 ` Daniel Vetter
2014-09-12  9:24   ` Chris Clayton
2014-09-12 12:46     ` [PATCH] drm/i915: Add limited color range readout for HDMI/DP ports on g4x/vlv/chv ville.syrjala
2014-09-12 15:08       ` Chris Clayton [this message]
2014-09-15  9:21         ` Jani Nikula

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=54130C82.5090605@googlemail.com \
    --to=chris2553@googlemail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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