intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [v2 6/6] drm/i915/fec: Disable FEC state.
Date: Thu, 18 Oct 2018 16:16:11 -0700	[thread overview]
Message-ID: <20181018231611.GM8224@intel.com> (raw)
In-Reply-To: <20181015215037.13901-7-anusha.srivatsa@intel.com>

Hi Anusha,

Find my comments below:

On Mon, Oct 15, 2018 at 02:50:37PM -0700, Anusha Srivatsa wrote:
> Set the suitable bits in DP_TP_CTL to stop
> bit correction when DSC is disabled.
> 

> - rebased.
> - Add additional check for compression state. (Gaurav)
> 
> v3: rebased.
> 
> Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c |  2 ++
>  drivers/gpu/drm/i915/intel_dp.c  | 18 ++++++++++++++++++
>  drivers/gpu/drm/i915/intel_drv.h |  2 ++
>  3 files changed, 22 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 67c013ea4d39..fefa92070b2d 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -3245,6 +3245,8 @@ static void intel_disable_ddi_dp(struct intel_encoder *encoder,
>  	/* Disable the decompression in DP Sink */
>  	intel_dp_sink_set_decompression_state(intel_dp, old_crtc_state,
>  					      ~DP_DECOMPRESSION_EN);
> +	/* Disable FEC in DP Sink */
> +	intel_dp_disable_fec_state(intel_dp, old_crtc_state);
>  }
>  
>  static void intel_disable_ddi_hdmi(struct intel_encoder *encoder,
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index b9f85502d9ff..1db1a738c85f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3044,6 +3044,24 @@ void intel_dp_enable_fec_state(struct intel_dp *intel_dp,
>  		DRM_ERROR("Timed out waiting for FEC Enable Status\n");
>  }
>  
> +void intel_dp_disable_fec_state(struct intel_dp *intel_dp,
> +				const struct intel_crtc_state *crtc_state)
> +{
> +	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> +	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> +	enum port port = intel_dig_port->base.port;
> +	u32 val;
> +
> +	if (crtc_state->dsc_params.compression_enable)
> +		DRM_DEBUG_KMS("Compression still enabled\n");

This check is wrong. The crtc_state->dsc_params.compression_enable only indicates
that compression enable is allowed in atomic check. This does not indicate whether
it is enabled or disabled in source/sink

Infact this function shd return if !crtc_state->dsc_params.compression_enable, see
what intel_dp_sink_set_decompression_state does.

After that to make sure DSC is disabled, you can read DP_DSC_ENABLE DPCD register and check
DP_DECOMPRESSION_EN bit before proceeding to disabling FEC.

Manasi

> +		return;
> +
> +	val = I915_READ(DP_TP_CTL(port));
> +	val &= ~DP_TP_CTL_FEC_ENABLE;
> +	I915_WRITE(DP_TP_CTL(port), val);
> +	POSTING_READ(DP_TP_CTL(port));
> +}
> +
>  /* If the sink supports it, try to set the power state appropriately */
>  void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
>  {
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index e51d612a9f42..0c2429f7cc35 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1713,6 +1713,8 @@ void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp,
>  				 int state);
>  void intel_dp_enable_fec_state(struct intel_dp *intel_dp,
>  			       const struct intel_crtc_state *crtc_state);
> +void intel_dp_disable_fec_state(struct intel_dp *intel_dp,
> +				const struct intel_crtc_state *crtc_state);
>  void intel_dp_encoder_reset(struct drm_encoder *encoder);
>  void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder);
>  void intel_dp_encoder_destroy(struct drm_encoder *encoder);
> -- 
> 2.17.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-18 23:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 21:50 [v2 0/6] Forward Error Correction Anusha Srivatsa
2018-10-15 21:50 ` [v2 1/6] i915/dp/fec: Cache the FEC_CAPABLE DPCD register Anusha Srivatsa
2018-10-15 22:05   ` Manasi Navare
2018-10-16  7:43     ` Jani Nikula
2018-10-15 21:50 ` [v2 2/6] drm/dp/fec: DRM helper for Forward Error Correction Anusha Srivatsa
2018-10-15 21:50 ` [v2 3/6] i915/dp/fec: Check for FEC Support Anusha Srivatsa
2018-10-18 22:45   ` Manasi Navare
2018-10-15 21:50 ` [v2 4/6] drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION Anusha Srivatsa
2018-10-18 22:59   ` Manasi Navare
2018-10-15 21:50 ` [v2 5/6] i915/dp/fec: Configure the Forward Error Correction bits Anusha Srivatsa
2018-10-18 23:08   ` Manasi Navare
2018-10-19 18:39   ` Ville Syrjälä
2018-10-19 19:24     ` Manasi Navare
2018-10-19 19:58       ` Ville Syrjälä
2018-10-19 20:29         ` Manasi Navare
2018-10-19 20:46           ` Srivatsa, Anusha
2018-10-19 23:11           ` Ville Syrjälä
2018-10-22 18:04             ` Srivatsa, Anusha
2018-10-22 18:26               ` Ville Syrjälä
2018-10-22 18:37                 ` Srivatsa, Anusha
2018-10-23 23:59                 ` Manasi Navare
2018-10-22 18:27               ` Manasi Navare
2018-10-15 21:50 ` [v2 6/6] drm/i915/fec: Disable FEC state Anusha Srivatsa
2018-10-18 23:16   ` Manasi Navare [this message]
2018-10-19 18:13     ` Srivatsa, Anusha
2018-10-19 18:41   ` Ville Syrjälä
2018-10-15 22:16 ` ✗ Fi.CI.BAT: failure for Forward Error Correction (rev2) 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=20181018231611.GM8224@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=anusha.srivatsa@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;
as well as URLs for NNTP newsgroup(s).