From: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Hogander, Jouni" <jouni.hogander@intel.com>
Subject: Re: [Intel-xe] [PATCH 1/4] Revert "FIXME: drm/i915: runtime pm changes"
Date: Mon, 18 Sep 2023 21:20:15 +0000 [thread overview]
Message-ID: <a72f92505c3b7367520f4d4245fe40c027ff2381.camel@intel.com> (raw)
In-Reply-To: <20230918070100.1387082-2-jouni.hogander@intel.com>
On Mon, 2023-09-18 at 10:00 +0300, Jouni Högander wrote:
> This reverts commit 742e449ddca435897eec6d9c21d4d2573b77242d.
>
> This change is not needed anymore as next patch is changing this to
> use pm_runtime_suspended() instead of custom suspended boolean.
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> .../drm/i915/display/intel_display_power.c | 23 ++++++++++---------
> 1 file changed, 12 insertions(+), 11 deletions(-)
Looks good,
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c
> b/drivers/gpu/drm/i915/display/intel_display_power.c
> index c257542d269d..068dc223653d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -216,10 +216,8 @@ bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
> struct i915_power_well *power_well;
> bool is_enabled;
>
> -#ifdef I915
> if (dev_priv->runtime_pm.suspended)
> return false;
> -#endif
>
> is_enabled = true;
>
> @@ -638,6 +636,7 @@ release_async_put_domains(struct i915_power_domains *power_domains,
> struct drm_i915_private *dev_priv =
> container_of(power_domains, struct drm_i915_private,
> display.power.domains);
> + struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;
> enum intel_display_power_domain domain;
> intel_wakeref_t wakeref;
>
> @@ -646,8 +645,8 @@ release_async_put_domains(struct i915_power_domains *power_domains,
> * wakeref to make the state checker happy about the HW access during
> * power well disabling.
> */
> - assert_rpm_raw_wakeref_held(&dev_priv->runtime_pm);
> - wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
> + assert_rpm_raw_wakeref_held(rpm);
> + wakeref = intel_runtime_pm_get(rpm);
>
> for_each_power_domain(domain, mask) {
> /* Clear before put, so put's sanity check is happy. */
> @@ -655,7 +654,7 @@ release_async_put_domains(struct i915_power_domains *power_domains,
> __intel_display_power_put_domain(dev_priv, domain);
> }
>
> - intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref);
> + intel_runtime_pm_put(rpm, wakeref);
> }
>
> static void
> @@ -665,7 +664,8 @@ intel_display_power_put_async_work(struct work_struct *work)
> container_of(work, struct drm_i915_private,
> display.power.domains.async_put_work.work);
> struct i915_power_domains *power_domains = &dev_priv->display.power.domains;
> - intel_wakeref_t new_work_wakeref = intel_runtime_pm_get_raw(&dev_priv->runtime_pm);
> + struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;
> + intel_wakeref_t new_work_wakeref = intel_runtime_pm_get_raw(rpm);
> intel_wakeref_t old_work_wakeref = 0;
>
> mutex_lock(&power_domains->lock);
> @@ -706,9 +706,9 @@ intel_display_power_put_async_work(struct work_struct *work)
> mutex_unlock(&power_domains->lock);
>
> if (old_work_wakeref)
> - intel_runtime_pm_put_raw(&dev_priv->runtime_pm, old_work_wakeref);
> + intel_runtime_pm_put_raw(rpm, old_work_wakeref);
> if (new_work_wakeref)
> - intel_runtime_pm_put_raw(&dev_priv->runtime_pm, new_work_wakeref);
> + intel_runtime_pm_put_raw(rpm, new_work_wakeref);
> }
>
> /**
> @@ -730,7 +730,8 @@ void __intel_display_power_put_async(struct drm_i915_private *i915,
> int delay_ms)
> {
> struct i915_power_domains *power_domains = &i915->display.power.domains;
> - intel_wakeref_t work_wakeref = intel_runtime_pm_get_raw(&i915->runtime_pm);
> + struct intel_runtime_pm *rpm = &i915->runtime_pm;
> + intel_wakeref_t work_wakeref = intel_runtime_pm_get_raw(rpm);
>
> delay_ms = delay_ms >= 0 ? delay_ms : 100;
>
> @@ -762,9 +763,9 @@ void __intel_display_power_put_async(struct drm_i915_private *i915,
> mutex_unlock(&power_domains->lock);
>
> if (work_wakeref)
> - intel_runtime_pm_put_raw(&i915->runtime_pm, work_wakeref);
> + intel_runtime_pm_put_raw(rpm, work_wakeref);
>
> - intel_runtime_pm_put(&i915->runtime_pm, wakeref);
> + intel_runtime_pm_put(rpm, wakeref);
> }
>
> /**
next prev parent reply other threads:[~2023-09-18 21:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 7:00 [Intel-xe] [PATCH 0/4] Xe runtime pm refactoring Jouni Högander
2023-09-18 7:00 ` [Intel-xe] [PATCH 1/4] Revert "FIXME: drm/i915: runtime pm changes" Jouni Högander
2023-09-18 21:20 ` Govindapillai, Vinod [this message]
2023-09-18 7:00 ` [Intel-xe] [PATCH 2/4] drm/i915: Remove runtime suspended boolean from intel_runtime_pm struct Jouni Högander
2023-09-18 21:21 ` Govindapillai, Vinod
2023-09-18 7:00 ` [Intel-xe] [PATCH 3/4] fixup! drm/xe: Introduce a new DRM driver for Intel GPUs Jouni Högander
2023-09-18 21:22 ` Govindapillai, Vinod
2023-09-20 20:02 ` Rodrigo Vivi
2023-09-21 11:15 ` Hogander, Jouni
2023-09-18 7:01 ` [Intel-xe] [PATCH 4/4] fixup! drm/xe/display: Implement display support Jouni Högander
2023-09-18 21:22 ` Govindapillai, Vinod
2023-09-18 7:27 ` [Intel-xe] ✓ CI.Patch_applied: success for Xe runtime pm refactoring Patchwork
2023-09-18 7:28 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-18 7:29 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-18 7:36 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-18 7:36 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-09-18 7:38 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-09-18 8:10 ` [Intel-xe] ✓ CI.BAT: success " 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=a72f92505c3b7367520f4d4245fe40c027ff2381.camel@intel.com \
--to=vinod.govindapillai@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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