intel-gfx.lists.freedesktop.org archive mirror
 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 08/11] drm/i915: Keep IGT PSR and frontbuffer tests functional
Date: Mon, 2 Apr 2018 11:26:54 -0700	[thread overview]
Message-ID: <20180402182654.GU2338@intel.com> (raw)
In-Reply-To: <20180330222336.5262-8-jose.souza@intel.com>

On Fri, Mar 30, 2018 at 03:23:33PM -0700, José Roberto de Souza wrote:
> 'drm/i915/dp: Exit PSR before do a aux channel transaction' cause all
> IGT PSR and frontbuffer tracking tests to not be userful.
> Those tests depend in reading the calculated CRC value of the
> frontbuffer in sink and doing a aux transaction now causes the PSR
> to exit.
> So any bug in software and hardware buffer tracking will be masked by
> this forced PSR exit.
> 
> This is a dirty workaround that makes those tests functional again
> at the risk of causing concurrent access in the aux ch registers
> while running_igt_psr_tests is set.
> 
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++++++++++-
>  drivers/gpu/drm/i915/i915_drv.h     |  2 ++
>  drivers/gpu/drm/i915/intel_dp.c     | 18 ++++++++++++++++++
>  3 files changed, 43 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 1dba2c451255..519f67598d44 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4732,6 +4732,27 @@ static int i915_drrs_ctl_set(void *data, u64 val)
>  
>  DEFINE_SIMPLE_ATTRIBUTE(i915_drrs_ctl_fops, NULL, i915_drrs_ctl_set, "%llu\n");
>  
> +static int i915_running_igt_psr_tests_get(void *data, u64 *val)
> +{
> +	struct drm_i915_private *dev_priv = data;
> +
> +	*val = dev_priv->running_igt_psr_tests;
> +	return 0;
> +}
> +
> +static int i915_running_igt_psr_tests_set(void *data, u64 val)
> +{
> +	struct drm_i915_private *dev_priv = data;
> +
> +	dev_priv->running_igt_psr_tests = !!val;
> +	return 0;
> +}
> +
> +DEFINE_SIMPLE_ATTRIBUTE(i915_running_igt_psr_tests_fops,
> +			i915_running_igt_psr_tests_get,
> +			i915_running_igt_psr_tests_set,
> +			"%llu\n");
> +
>  static const struct drm_info_list i915_debugfs_list[] = {
>  	{"i915_capabilities", i915_capabilities, 0},
>  	{"i915_gem_objects", i915_gem_object_info, 0},
> @@ -4812,7 +4833,8 @@ static const struct i915_debugfs_files {
>  	{"i915_guc_log_relay", &i915_guc_log_relay_fops},
>  	{"i915_hpd_storm_ctl", &i915_hpd_storm_ctl_fops},
>  	{"i915_ipc_status", &i915_ipc_status_fops},
> -	{"i915_drrs_ctl", &i915_drrs_ctl_fops}
> +	{"i915_drrs_ctl", &i915_drrs_ctl_fops},
> +	{"i915_running_igt_psr_tests", &i915_running_igt_psr_tests_fops}

we don't need new ops. All we want is to block the exit when running
sink_crc tests, so add the blocker wa there...

>  };
>  
>  int i915_debugfs_register(struct drm_i915_private *dev_priv)
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 41ebb144594e..9e0a5e29f48e 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2110,6 +2110,8 @@ struct drm_i915_private {
>  
>  	struct i915_pmu pmu;
>  
> +	bool running_igt_psr_tests;
> +
>  	/*
>  	 * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
>  	 * will be rejected. Instead look for a better place.
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index fedee4e7ed24..c655f6c08a02 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1071,8 +1071,20 @@ static uint32_t skl_get_aux_send_ctl(struct intel_dp *intel_dp,
>   */
>  static void intel_dp_aux_ch_get(struct intel_dp *intel_dp)
>  {
> +	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> +	struct drm_i915_private *dev_priv =
> +			to_i915(intel_dig_port->base.base.dev);
> +
>  	if (!intel_dp->exit_psr_on_aux_ch_xfer)
>  		return;
> +	/*
> +	 * HACK: This is a workaround to keep IGT PSR and frontbuffer tracking
> +	 * tests functional, otherwise when IGT request the CRC of the
> +	 * frontbuffer to sink it would cause this function to complete execute
> +	 * and exit PSR.
> +	 */
> +	if (dev_priv->running_igt_psr_tests)
> +		return;
>  
>  	intel_psr_activate_block_get(intel_dp);
>  	intel_psr_exit(intel_dp, true);
> @@ -1085,8 +1097,14 @@ static void intel_dp_aux_ch_get(struct intel_dp *intel_dp)
>   */
>  static void intel_dp_aux_ch_put(struct intel_dp *intel_dp)
>  {
> +	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> +	struct drm_i915_private *dev_priv =
> +			to_i915(intel_dig_port->base.base.dev);
> +
>  	if (!intel_dp->exit_psr_on_aux_ch_xfer)
>  		return;
> +	if (dev_priv->running_igt_psr_tests)
> +		return;
>  
>  	intel_psr_activate_block_put(intel_dp);
>  	/* Usually more than just one aux ch transaction is executed when
> -- 
> 2.16.3
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-04-02 18:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-30 22:23 [PATCH 01/11] drm/i915/psr: Move specific HSW+ WARN_ON to HSW+ function José Roberto de Souza
2018-03-30 22:23 ` [PATCH 02/11] drm/i915/psr: Move PSR exit specific code to hardware specific function José Roberto de Souza
2018-04-02 18:09   ` Rodrigo Vivi
2018-03-30 22:23 ` [PATCH 03/11] drm/i915/psr: Share code between disable and exit José Roberto de Souza
2018-04-02 18:11   ` Rodrigo Vivi
2018-04-02 21:15     ` Souza, Jose
2018-03-30 22:23 ` [PATCH 04/11] drm/i915/psr: Remove intel_crtc_state parameter from disable() José Roberto de Souza
2018-04-02 18:13   ` Rodrigo Vivi
2018-04-03 17:52   ` Ville Syrjälä
2018-03-30 22:23 ` [PATCH 05/11] drm/i915/psr: Export intel_psr_activate/exit() José Roberto de Souza
2018-04-02 18:18   ` Rodrigo Vivi
2018-03-30 22:23 ` [PATCH 06/11] drm/i915/psr: Add intel_psr_activate_block_get()/put() José Roberto de Souza
2018-04-02 18:20   ` Rodrigo Vivi
2018-04-02 22:11     ` Souza, Jose
2018-04-03 17:32       ` Rodrigo Vivi
2018-03-30 22:23 ` [PATCH 07/11] drm/i915/dp: Exit PSR before do a aux channel transaction José Roberto de Souza
2018-04-02 18:23   ` Rodrigo Vivi
2018-04-02 18:42     ` Pandiyan, Dhinakaran
2018-04-02 22:16       ` Souza, Jose
2018-04-02 23:21         ` Souza, Jose
2018-04-02 19:00     ` Pandiyan, Dhinakaran
2018-04-02 22:15       ` Souza, Jose
2018-03-30 22:23 ` [PATCH 08/11] drm/i915: Keep IGT PSR and frontbuffer tests functional José Roberto de Souza
2018-04-02 18:26   ` Rodrigo Vivi [this message]
2018-03-30 22:23 ` [PATCH 09/11] drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink José Roberto de Souza
2018-04-02 18:28   ` Rodrigo Vivi
2018-03-30 22:23 ` [PATCH 10/11] drm/i915/psr: Handle PSR RFB storage error José Roberto de Souza
2018-03-30 22:23 ` [PATCH 11/11] drm/i915/psr/bdw+: Enable CRC check in the static frame on the sink side José Roberto de Souza
2018-03-30 22:38 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/11] drm/i915/psr: Move specific HSW+ WARN_ON to HSW+ function Patchwork
2018-03-30 22:53 ` ✗ Fi.CI.BAT: " Patchwork
2018-04-02 18:06 ` [PATCH 01/11] " Rodrigo Vivi

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=20180402182654.GU2338@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;
as well as URLs for NNTP newsgroup(s).