All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kahola, Mika" <mika.kahola@intel.com>
To: "Souza, Jose" <jose.souza@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Hogander, Jouni" <jouni.hogander@intel.com>,
	"Sripada, Radhakrishna" <radhakrishna.sripada@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/display: Add warn_on in intel_psr_pause()
Date: Wed, 20 Oct 2021 11:28:40 +0000	[thread overview]
Message-ID: <4fc7f6074d764db5b3b8787c71de6d9e@intel.com> (raw)
In-Reply-To: <20211020003558.222198-2-jose.souza@intel.com>



> -----Original Message-----
> From: Souza, Jose <jose.souza@intel.com>
> Sent: Wednesday, October 20, 2021 3:36 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Kahola, Mika <mika.kahola@intel.com>; Hogander, Jouni
> <jouni.hogander@intel.com>; Sripada, Radhakrishna
> <radhakrishna.sripada@intel.com>; Souza, Jose <jose.souza@intel.com>
> Subject: [PATCH 2/2] drm/i915/display: Add warn_on in intel_psr_pause()
> 
> Right now the only user of psr_pause/resume is intel_cdclk but additional users
> will be added in the future and we may need do reference counting for PSR
> pause and resume, for now only adding a warn_on so this cases do not go
> unnoticed.
> 
> Cc: Mika Kahola <mika.kahola@intel.com>
> Cc: Jouni Hogander <jouni.hogander@intel.com>
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

For the time being, the warn_on seems a valid addition to remind us about these cases.

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 7a205fd5023bb..49c2dfbd40554 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1346,6 +1346,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,
>   */
>  void intel_psr_pause(struct intel_dp *intel_dp)  {
> +	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
>  	struct intel_psr *psr = &intel_dp->psr;
> 
>  	if (!CAN_PSR(intel_dp))
> @@ -1358,6 +1359,9 @@ void intel_psr_pause(struct intel_dp *intel_dp)
>  		return;
>  	}
> 
> +	/* If we ever hit this, we will need to add refcount to pause/resume */
> +	drm_WARN_ON(&dev_priv->drm, psr->paused);
> +
>  	intel_psr_exit(intel_dp);
>  	intel_psr_wait_exit_locked(intel_dp);
>  	psr->paused = true;
> --
> 2.33.1


  reply	other threads:[~2021-10-20 11:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  0:35 [Intel-gfx] [PATCH 1/2] drm/i915/display: Rename POWER_DOMAIN_DPLL_DC_OFF to POWER_DOMAIN_DC_OFF José Roberto de Souza
2021-10-20  0:35 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Add warn_on in intel_psr_pause() José Roberto de Souza
2021-10-20 11:28   ` Kahola, Mika [this message]
2021-10-20 15:15   ` Yokoyama, Caz
2021-10-20  1:13 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/display: Rename POWER_DOMAIN_DPLL_DC_OFF to POWER_DOMAIN_DC_OFF Patchwork
2021-10-20  1:43 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-20  5:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-20 20:30   ` Souza, Jose
2021-10-20 15:09 ` [Intel-gfx] [PATCH 1/2] " Yokoyama, Caz

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=4fc7f6074d764db5b3b8787c71de6d9e@intel.com \
    --to=mika.kahola@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --cc=jouni.hogander@intel.com \
    --cc=radhakrishna.sripada@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.