All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Konduru, Chandra" <chandra.konduru@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 7/9] drm/i915: Check infoframe state more	diligently.
Date: Mon, 1 Jun 2015 22:57:32 +0000	[thread overview]
Message-ID: <76A9B330A4D78C4D99CB292C4CC06C0E36FEEEF8@fmsmsx101.amr.corp.intel.com> (raw)
In-Reply-To: <1430834787-10255-8-git-send-email-ville.syrjala@linux.intel.com>



> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of
> ville.syrjala@linux.intel.com
> Sent: Tuesday, May 05, 2015 7:06 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 7/9] drm/i915: Check infoframe state more
> diligently.
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Check that the DIP is enabled on the right port on IBX and VLV/CHV as
> we're doing on g4x, and also check for all the infoframe enable bits on
> all platforms.
> 
> Eventually we should track each infoframe type independently, and also
> their contents. This is a small step in that direction as .infoframe_enabled()
> return value could be easily turned into a bitmask.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 44 ++++++++++++++++++++++++++++------
> -----
>  1 file changed, 32 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> b/drivers/gpu/drm/i915/intel_hdmi.c
> index 03b4759..ce595c3 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -174,10 +174,14 @@ static bool g4x_infoframe_enabled(struct
> drm_encoder *encoder)
>  	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
>  	u32 val = I915_READ(VIDEO_DIP_CTL);
> 
> -	if (VIDEO_DIP_PORT(intel_dig_port->port) == (val &
> VIDEO_DIP_PORT_MASK))
> -		return val & VIDEO_DIP_ENABLE;
> +	if ((val & VIDEO_DIP_ENABLE) == 0)
> +		return false;
> 
> -	return false;
> +	if ((val & VIDEO_DIP_PORT_MASK) != VIDEO_DIP_PORT(intel_dig_port-
> >port))
> +		return false;
> +
> +	return val & (VIDEO_DIP_ENABLE_AVI |
> +		      VIDEO_DIP_ENABLE_VENDOR | VIDEO_DIP_ENABLE_SPD);
>  }
> 
>  static void ibx_write_infoframe(struct drm_encoder *encoder,
> @@ -227,10 +231,15 @@ static bool ibx_infoframe_enabled(struct
> drm_encoder *encoder)
>  	int reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
>  	u32 val = I915_READ(reg);
> 
> -	if (VIDEO_DIP_PORT(intel_dig_port->port) == (val &
> VIDEO_DIP_PORT_MASK))
> -		return val & VIDEO_DIP_ENABLE;
> +	if ((val & VIDEO_DIP_ENABLE) == 0)
> +		return false;
> 
> -	return false;
> +	if ((val & VIDEO_DIP_PORT_MASK) != VIDEO_DIP_PORT(intel_dig_port-
> >port))
> +		return false;
> +
> +	return val & (VIDEO_DIP_ENABLE_AVI |
> +		      VIDEO_DIP_ENABLE_VENDOR |
> VIDEO_DIP_ENABLE_GAMUT |
> +		      VIDEO_DIP_ENABLE_SPD | VIDEO_DIP_ENABLE_GCP);
>  }
> 
>  static void cpt_write_infoframe(struct drm_encoder *encoder,
> @@ -282,7 +291,12 @@ static bool cpt_infoframe_enabled(struct drm_encoder
> *encoder)
>  	int reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
>  	u32 val = I915_READ(reg);
> 
> -	return val & VIDEO_DIP_ENABLE;
> +	if ((val & VIDEO_DIP_ENABLE) == 0)
> +		return false;
> +
> +	return val & (VIDEO_DIP_ENABLE_AVI |
> +		      VIDEO_DIP_ENABLE_VENDOR |
> VIDEO_DIP_ENABLE_GAMUT |
> +		      VIDEO_DIP_ENABLE_SPD | VIDEO_DIP_ENABLE_GCP);
>  }
> 
>  static void vlv_write_infoframe(struct drm_encoder *encoder,
> @@ -332,10 +346,15 @@ static bool vlv_infoframe_enabled(struct
> drm_encoder *encoder)
>  	int reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
>  	u32 val = I915_READ(reg);
> 
> -	if (VIDEO_DIP_PORT(intel_dig_port->port) == (val &
> VIDEO_DIP_PORT_MASK))
> -		return val & VIDEO_DIP_ENABLE;
> +	if ((val & VIDEO_DIP_ENABLE) == 0)
> +		return false;
> 
> -	return false;
> +	if ((val & VIDEO_DIP_PORT_MASK) != VIDEO_DIP_PORT(intel_dig_port-
> >port))
> +		return false;
> +
> +	return val & (VIDEO_DIP_ENABLE_AVI |
> +		      VIDEO_DIP_ENABLE_VENDOR |
> VIDEO_DIP_ENABLE_GAMUT |
> +		      VIDEO_DIP_ENABLE_SPD | VIDEO_DIP_ENABLE_GCP);
>  }
> 
>  static void hsw_write_infoframe(struct drm_encoder *encoder,
> @@ -383,8 +402,9 @@ static bool hsw_infoframe_enabled(struct drm_encoder
> *encoder)
>  	u32 ctl_reg = HSW_TVIDEO_DIP_CTL(intel_crtc->config-
> >cpu_transcoder);
>  	u32 val = I915_READ(ctl_reg);
> 
> -	return val & (VIDEO_DIP_ENABLE_AVI_HSW |
> VIDEO_DIP_ENABLE_SPD_HSW |
> -		      VIDEO_DIP_ENABLE_VS_HSW);
> +	return val & (VIDEO_DIP_ENABLE_VSC_HSW |
> VIDEO_DIP_ENABLE_AVI_HSW |
> +		      VIDEO_DIP_ENABLE_GCP_HSW |
> VIDEO_DIP_ENABLE_VS_HSW |
> +		      VIDEO_DIP_ENABLE_GMP_HSW |
> VIDEO_DIP_ENABLE_SPD_HSW);
>  }
> 
Reviewed-by: Chandra Konduru <Chandra.konduru@intel.com>

>  /*
> --
> 2.0.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-01 22:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 14:06 [PATCH 0/9] drm/i915: HDMI 12bpc fixes ville.syrjala
2015-05-05 14:06 ` [PATCH v2 1/9] drm/i915: Implement WaEnableHDMI8bpcBefore12bpc:snb, ivb ville.syrjala
2015-05-05 14:24   ` Jani Nikula
2015-05-25 11:39   ` Ander Conselvan De Oliveira
2015-06-01 21:49   ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH v2 2/9] drm/i915: Send GCP infoframes for deep color HDMI sinks ville.syrjala
2015-05-25 12:32   ` Ander Conselvan De Oliveira
2015-05-25 12:44     ` Ville Syrjälä
2015-05-25 13:09       ` Ander Conselvan De Oliveira
2015-05-25 13:14         ` Ville Syrjälä
2015-06-01 21:49   ` Konduru, Chandra
2015-06-02 12:58     ` Ville Syrjälä
2015-06-02 19:07       ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH v2 3/9] drm/i915: Enable default_phase in GCP when possible ville.syrjala
2015-06-01 21:49   ` Konduru, Chandra
2015-06-02 11:46     ` Ville Syrjälä
2015-06-02 18:21       ` Konduru, Chandra
2015-06-03  9:34         ` Ville Syrjälä
2015-06-03 20:38           ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH v2 4/9] drm/i915: Fix HDMI 12bpc TRANSCONF bpc value ville.syrjala
2015-06-01 21:48   ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH v2 5/9] drm/i915: Fix 12bpc HDMI enable for IBX ville.syrjala
2015-06-03 20:52   ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH v2 6/9] drm/i915: Disable all infoframes when turning off the HDMI port ville.syrjala
2015-06-01 22:48   ` Konduru, Chandra
2015-06-02 11:11     ` Ville Syrjälä
2015-06-02 18:18       ` Konduru, Chandra
2015-06-03  9:21         ` Ville Syrjälä
2015-06-03 23:24           ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH 7/9] drm/i915: Check infoframe state more diligently ville.syrjala
2015-06-01 22:57   ` Konduru, Chandra [this message]
2015-05-05 14:06 ` [PATCH 8/9] drm/i915: Fix hdmi clock readout with pixel repeat ville.syrjala
2015-06-01 22:59   ` Konduru, Chandra
2015-05-05 14:06 ` [PATCH 9/9] drm/i915: Double the port clock when using double clocked modes with 12bpc ville.syrjala
2015-05-21 11:20   ` Ville Syrjälä
2015-06-01 23:23   ` Konduru, Chandra
2015-06-01 19:04 ` [PATCH 0/9] drm/i915: HDMI 12bpc fixes Konduru, Chandra
2015-06-15  9:37   ` 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=76A9B330A4D78C4D99CB292C4CC06C0E36FEEEF8@fmsmsx101.amr.corp.intel.com \
    --to=chandra.konduru@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.