Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: Re: [PATCH v4 6/9] drm/i915: Disable PSR2 while getting pipe CRC
Date: Mon, 4 Mar 2019 10:39:33 -0800	[thread overview]
Message-ID: <20190304183933.GE10303@intel.com> (raw)
In-Reply-To: <20190302013456.24138-6-jose.souza@intel.com>

On Fri, Mar 01, 2019 at 05:34:53PM -0800, José Roberto de Souza wrote:
> When PSR2 is active aka after the number of frames programmed in
> PSR2_CTL 'Frames Before SU Entry' hardware stops to generate CRC
> interruptions causing IGT tests to fail due timeout.
> 
> This same behavior don't happen with PSR1, as soon as pipe CRC is
> enabled it blocks PSR1 activation so CRC calculation continues to
> happens normaly.
> 
> This patch also set mode_changed as true when PSR is available to
> force atomic check functions to compute new PSR state, otherwise PSR2
> would not be disabled.

Oh, this part was confusing... I was about to ask has_psr2 below,
and then I read the commit message again to understand it.

it probably deserved a separated patch...
or at least a comment on the code...

but, up to you, makes sense now

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>


> 
> v4: Only setting mode_changed if has_psr is set(Dhinakaran)
> 
> v3: Reusing intel_crtc_crc_prepare() and crc_enabled, only setting
> mode_changed if it can do PSR.
> 
> v2: Changed commit description to describe that PSR2 inhibit CRC
> calculations.
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pipe_crc.c | 1 +
>  drivers/gpu/drm/i915/intel_psr.c      | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
> index af64597c5c6e..c17f02b88453 100644
> --- a/drivers/gpu/drm/i915/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
> @@ -307,6 +307,7 @@ intel_crtc_crc_setup_workarounds(struct intel_crtc *crtc, bool enable)
>  		goto put_state;
>  	}
>  
> +	pipe_config->base.mode_changed = pipe_config->has_psr;
>  	pipe_config->crc_enabled = enable;
>  
>  	if (IS_HASWELL(dev_priv) && crtc->pipe == PIPE_A) {
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 2d9f64c362e2..73453d89a841 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -572,6 +572,9 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
>  		return false;
>  	}
>  
> +	if (crtc_state->crc_enabled)
> +		return false;
> +
>  	return true;
>  }
>  
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-04 18:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  1:34 [PATCH v4 1/9] drm/i915/psr: Remove PSR2 FIXME José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 2/9] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 3/9] drm/i915: Compute and commit color features in fastsets José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 4/9] drm/i915/psr: Drop test for EDP in CRTC when forcing commit José Roberto de Souza
2019-03-04 18:28   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 5/9] drm/i915/crc: Make IPS workaround generic José Roberto de Souza
2019-03-04 18:34   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 6/9] drm/i915: Disable PSR2 while getting pipe CRC José Roberto de Souza
2019-03-04 18:39   ` Rodrigo Vivi [this message]
2019-03-02  1:34 ` [PATCH v4 7/9] drm/i915: Drop redundant checks to update PSR state José Roberto de Souza
2019-03-04 18:42   ` Rodrigo Vivi
2019-03-04 18:54     ` Dhinakaran Pandiyan
2019-03-04 20:45       ` Souza, Jose
2019-03-02  1:34 ` [PATCH v4 8/9] drm/i915/psr: Set idle frames to maximum while getting pipe CRC José Roberto de Souza
2019-03-04 18:31   ` Dhinakaran Pandiyan
2019-03-04 18:40     ` Souza, Jose
2019-03-04 19:00       ` Dhinakaran Pandiyan
2019-03-04 20:56         ` Souza, Jose
2019-03-02  1:34 ` [PATCH v4 9/9] drm/i915: Enable PSR2 by default José Roberto de Souza
2019-03-04 18:43   ` Rodrigo Vivi
2019-03-02  2:34 ` ✗ Fi.CI.SPARSE: warning for series starting with [v4,1/9] drm/i915/psr: Remove PSR2 FIXME Patchwork
2019-03-02  2:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-02 13:38 ` ✓ Fi.CI.IGT: " 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=20190304183933.GE10303@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@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