<div dir="ltr">patch merged to dinq. thanks for patch and review.<br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 4, 2017 at 3:48 PM Jim Bride <<a href="mailto:jim.bride@linux.intel.com">jim.bride@linux.intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Jan 02, 2017 at 05:00:55PM +0530, vathsala nagaraju wrote:<br class="gmail_msg">
> Function hsw_psr_setup handles vsc header setup for psr1 and<br class="gmail_msg">
> skl_psr_setup_vsc handles vsc header setup for psr2.<br class="gmail_msg">
><br class="gmail_msg">
> Setup VSC header in function skl_psr_setup_vsc for psr2 support,<br class="gmail_msg">
> as per edp 1.4 spec, table 6-11:VSC SDP HEADER Extension for psr2<br class="gmail_msg">
> operation.<br class="gmail_msg">
><br class="gmail_msg">
> v2: (Jani)<br class="gmail_msg">
> - Initialize variables to 0<br class="gmail_msg">
> - intel_dp_get_y_cord_status and intel_dp_get_y_cord_status made static<br class="gmail_msg">
> - Correct indentation for continuation lines<br class="gmail_msg">
> - Change DP_PSR_Y_COORDINATE to DP_PSR2_SU_Y_COORDINATE_REQUIRED<br class="gmail_msg">
> - Change DPRX_FEATURE_ENUMERATION_LIST to DP_DPRX_*<br class="gmail_msg">
> - Change VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED to DP_VSC_*<br class="gmail_msg">
><br class="gmail_msg">
> Cc: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com" class="gmail_msg" target="_blank">rodrigo.vivi@intel.com</a>><br class="gmail_msg">
> Cc: Jim Bride <<a href="mailto:jim.bride@linux.intel.com" class="gmail_msg" target="_blank">jim.bride@linux.intel.com</a>><br class="gmail_msg">
> Signed-off-by: Vathsala Nagaraju <<a href="mailto:vathsala.nagaraju@intel.com" class="gmail_msg" target="_blank">vathsala.nagaraju@intel.com</a>><br class="gmail_msg">
> Signed-off-by: Patil Deepti <<a href="mailto:deepti.patil@intel.com" class="gmail_msg" target="_blank">deepti.patil@intel.com</a>><br class="gmail_msg">
<br class="gmail_msg">
Reviewed-by: Jim Bride <<a href="mailto:jim.bride@linux.intel.com" class="gmail_msg" target="_blank">jim.bride@linux.intel.com</a>><br class="gmail_msg">
<br class="gmail_msg">
> ---<br class="gmail_msg">
> drivers/gpu/drm/i915/i915_drv.h | 2 ++<br class="gmail_msg">
> drivers/gpu/drm/i915/intel_dp.c | 26 ++++++++++++++++++++++++++<br class="gmail_msg">
> drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++--<br class="gmail_msg">
> 3 files changed, 43 insertions(+), 2 deletions(-)<br class="gmail_msg">
><br class="gmail_msg">
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h<br class="gmail_msg">
> index 22d3f61..36dc835 100644<br class="gmail_msg">
> --- a/drivers/gpu/drm/i915/i915_drv.h<br class="gmail_msg">
> +++ b/drivers/gpu/drm/i915/i915_drv.h<br class="gmail_msg">
> @@ -1164,6 +1164,8 @@ struct i915_psr {<br class="gmail_msg">
> bool psr2_support;<br class="gmail_msg">
> bool aux_frame_sync;<br class="gmail_msg">
> bool link_standby;<br class="gmail_msg">
> + bool y_cord_support;<br class="gmail_msg">
> + bool colorimetry_support;<br class="gmail_msg">
> };<br class="gmail_msg">
><br class="gmail_msg">
> enum intel_pch {<br class="gmail_msg">
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c<br class="gmail_msg">
> index fb12896..da577c9 100644<br class="gmail_msg">
> --- a/drivers/gpu/drm/i915/intel_dp.c<br class="gmail_msg">
> +++ b/drivers/gpu/drm/i915/intel_dp.c<br class="gmail_msg">
> @@ -3042,6 +3042,24 @@ static void chv_dp_post_pll_disable(struct intel_encoder *encoder,<br class="gmail_msg">
> DP_LINK_STATUS_SIZE) == DP_LINK_STATUS_SIZE;<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
> +static bool intel_dp_get_y_cord_status(struct intel_dp *intel_dp)<br class="gmail_msg">
> +{<br class="gmail_msg">
> + uint8_t psr_caps = 0;<br class="gmail_msg">
> +<br class="gmail_msg">
> + drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_CAPS, &psr_caps);<br class="gmail_msg">
> + return psr_caps & DP_PSR2_SU_Y_COORDINATE_REQUIRED;<br class="gmail_msg">
> +}<br class="gmail_msg">
> +<br class="gmail_msg">
> +static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)<br class="gmail_msg">
> +{<br class="gmail_msg">
> + uint8_t dprx = 0;<br class="gmail_msg">
> +<br class="gmail_msg">
> + drm_dp_dpcd_readb(&intel_dp->aux,<br class="gmail_msg">
> + DP_DPRX_FEATURE_ENUMERATION_LIST,<br class="gmail_msg">
> + &dprx);<br class="gmail_msg">
> + return dprx & DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED;<br class="gmail_msg">
> +}<br class="gmail_msg">
> +<br class="gmail_msg">
> /* These are source-specific values. */<br class="gmail_msg">
> uint8_t<br class="gmail_msg">
> intel_dp_voltage_max(struct intel_dp *intel_dp)<br class="gmail_msg">
> @@ -3620,6 +3638,14 @@ void intel_dp_set_idle_link_train(struct intel_dp *intel_dp)<br class="gmail_msg">
> dev_priv->psr.psr2_support = dev_priv->psr.aux_frame_sync;<br class="gmail_msg">
> DRM_DEBUG_KMS("PSR2 %s on sink",<br class="gmail_msg">
> dev_priv->psr.psr2_support ? "supported" : "not supported");<br class="gmail_msg">
> +<br class="gmail_msg">
> + if (dev_priv->psr.psr2_support) {<br class="gmail_msg">
> + dev_priv->psr.y_cord_support =<br class="gmail_msg">
> + intel_dp_get_y_cord_status(intel_dp);<br class="gmail_msg">
> + dev_priv->psr.colorimetry_support =<br class="gmail_msg">
> + intel_dp_get_colorimetry_status(intel_dp);<br class="gmail_msg">
> + }<br class="gmail_msg">
> +<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
> /* Read the eDP Display control capabilities registers */<br class="gmail_msg">
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c<br class="gmail_msg">
> index 6aca8ff..c3aa649 100644<br class="gmail_msg">
> --- a/drivers/gpu/drm/i915/intel_psr.c<br class="gmail_msg">
> +++ b/drivers/gpu/drm/i915/intel_psr.c<br class="gmail_msg">
> @@ -122,13 +122,26 @@ static void vlv_psr_setup_vsc(struct intel_dp *intel_dp)<br class="gmail_msg">
> static void skl_psr_setup_su_vsc(struct intel_dp *intel_dp)<br class="gmail_msg">
> {<br class="gmail_msg">
> struct edp_vsc_psr psr_vsc;<br class="gmail_msg">
> + struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);<br class="gmail_msg">
> + struct drm_device *dev = intel_dig_port->base.base.dev;<br class="gmail_msg">
> + struct drm_i915_private *dev_priv = to_i915(dev);<br class="gmail_msg">
><br class="gmail_msg">
> /* Prepare VSC Header for SU as per EDP 1.4 spec, Table 6.11 */<br class="gmail_msg">
> memset(&psr_vsc, 0, sizeof(psr_vsc));<br class="gmail_msg">
> psr_vsc.sdp_header.HB0 = 0;<br class="gmail_msg">
> psr_vsc.sdp_header.HB1 = 0x7;<br class="gmail_msg">
> - psr_vsc.sdp_header.HB2 = 0x3;<br class="gmail_msg">
> - psr_vsc.sdp_header.HB3 = 0xb;<br class="gmail_msg">
> + if (dev_priv->psr.colorimetry_support &&<br class="gmail_msg">
> + dev_priv->psr.y_cord_support) {<br class="gmail_msg">
> + psr_vsc.sdp_header.HB2 = 0x5;<br class="gmail_msg">
> + psr_vsc.sdp_header.HB3 = 0x13;<br class="gmail_msg">
> + } else if (dev_priv->psr.y_cord_support) {<br class="gmail_msg">
> + psr_vsc.sdp_header.HB2 = 0x4;<br class="gmail_msg">
> + psr_vsc.sdp_header.HB3 = 0xe;<br class="gmail_msg">
> + } else {<br class="gmail_msg">
> + psr_vsc.sdp_header.HB2 = 0x3;<br class="gmail_msg">
> + psr_vsc.sdp_header.HB3 = 0xc;<br class="gmail_msg">
> + }<br class="gmail_msg">
> +<br class="gmail_msg">
> intel_psr_write_vsc(intel_dp, &psr_vsc);<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
> --<br class="gmail_msg">
> 1.9.1<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Intel-gfx mailing list<br class="gmail_msg">
<a href="mailto:Intel-gfx@lists.freedesktop.org" class="gmail_msg" target="_blank">Intel-gfx@lists.freedesktop.org</a><br class="gmail_msg">
<a href="https://lists.freedesktop.org/mailman/listinfo/intel-gfx" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br class="gmail_msg">
</blockquote></div>