All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Arun R Murthy <arun.r.murthy@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/pm: Change HPD to polling on runtime suspend
Date: Tue, 6 Aug 2024 19:41:01 +0300	[thread overview]
Message-ID: <ZrJSHdb7bu90VnJr@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20240806085513.3051107-1-arun.r.murthy@intel.com>

On Tue, Aug 06, 2024 at 02:25:13PM +0530, Arun R Murthy wrote:
> HPD is interrupt based and on runtime suspend change it to polling as
> HPD is not a wakeup event. A worker thread is scheduled for doing this
> polling and it keeps polling for HPD live status on an internval of 10s.
> On runtime resume disable polling and fallback to interrupt mechanism.
> 
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_pm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index 9f3c14fd9f33..d952b06ebfb4 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -22,6 +22,7 @@
>  #include "xe_pcode.h"
>  #include "xe_trace.h"
>  #include "xe_wa.h"
> +#include "intel_hotplug.h"
>  
>  /**
>   * DOC: Xe Power Management
> @@ -378,6 +379,8 @@ int xe_pm_runtime_suspend(struct xe_device *xe)
>  		if (err)
>  			goto out;
>  	}
> +	/* Enable hpd polling on runtime suspend */
> +	intel_hpd_poll_enable(xe);
>  
>  	xe_irq_suspend(xe);
>  
> @@ -427,6 +430,9 @@ int xe_pm_runtime_resume(struct xe_device *xe)
>  
>  	xe_irq_resume(xe);
>  
> +	/* Disable hpd polling on runtime resume */
> +	intel_hpd_poll_disable(xe);

This should be handled in xe_display_pm_resume() (likewise enabling
polling in xe_display_pm_suspend()), in fact it's already called there.
Also this is missing the xe->info.enable_display check and polling
shouldn't be enabled when system (vs. runtime) suspending.

Not sure why the display is suspended/resumed only if d3cold is allowed,
for many of the display s/r steps at least it doesn't make sense to me.
For now moving the d3cold check within
xe_display_pm_suspend()/resume() and enabling/disabling polling
regardless of that flag would be the simplest imo.

> +
>  	for_each_gt(gt, xe, id)
>  		xe_gt_resume(gt);
>  
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2024-08-06 16:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06  8:55 [PATCH] drm/xe/pm: Change HPD to polling on runtime suspend Arun R Murthy
2024-08-06  9:11 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-06  9:11 ` ✓ CI.checkpatch: " Patchwork
2024-08-06  9:12 ` ✗ CI.KUnit: failure " Patchwork
2024-08-06  9:31 ` ✓ Fi.CI.BAT: success " Patchwork
2024-08-06 10:38 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-06 16:17 ` [PATCH] " kernel test robot
2024-08-06 16:41 ` Imre Deak [this message]
2024-08-07  9:15   ` Murthy, Arun R
2024-08-07 14:14     ` Imre Deak
2024-08-08  8:40       ` Jani Nikula
2024-08-08  5:56 ` [v2PATCH] drm/xe/display: " Arun R Murthy
2024-08-08  6:28 ` ✗ Fi.CI.BUILD: failure for drm/xe/pm: Change HPD to polling on runtime suspend (rev2) Patchwork
2024-08-08  6:58 ` ✗ CI.Patch_applied: " 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=ZrJSHdb7bu90VnJr@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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.