From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: "Mika Kahola" <mika.kahola@intel.com>,
"Jouni Hogander" <jouni.hogander@intel.com>,
"Radhakrishna Sripada" <radhakrishna.sripada@intel.com>,
"José Roberto de Souza" <jose.souza@intel.com>
Subject: [Intel-gfx] [PATCH 2/2] drm/i915/display: Add warn_on in intel_psr_pause()
Date: Tue, 19 Oct 2021 17:35:58 -0700 [thread overview]
Message-ID: <20211020003558.222198-2-jose.souza@intel.com> (raw)
In-Reply-To: <20211020003558.222198-1-jose.souza@intel.com>
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>
---
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
next prev parent reply other threads:[~2021-10-20 0:29 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 ` José Roberto de Souza [this message]
2021-10-20 11:28 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Add warn_on in intel_psr_pause() Kahola, Mika
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=20211020003558.222198-2-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@intel.com \
--cc=mika.kahola@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox