public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCHv2] drm/xe/display: Change HPD to polling on runtime suspend
@ 2024-08-08  7:00 Arun R Murthy
  2024-08-08  7:28 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  2024-08-09  8:09 ` [PATCHv2] " Jani Nikula
  0 siblings, 2 replies; 3+ messages in thread
From: Arun R Murthy @ 2024-08-08  7:00 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: Arun R Murthy

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.

v2: move poll_enable() to xe_display(Imre)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/xe/display/xe_display.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 78cccbe28947..989022d21052 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -315,6 +315,10 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
 
 	intel_hpd_cancel_work(xe);
 
+	/* Enable hpd polling on runtime suspend */
+	if (runtime)
+		intel_hpd_poll_enable(xe);
+
 	intel_suspend_encoders(xe);
 
 	intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ Fi.CI.BUILD: failure for drm/xe/display: Change HPD to polling on runtime suspend
  2024-08-08  7:00 [PATCHv2] drm/xe/display: Change HPD to polling on runtime suspend Arun R Murthy
@ 2024-08-08  7:28 ` Patchwork
  2024-08-09  8:09 ` [PATCHv2] " Jani Nikula
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2024-08-08  7:28 UTC (permalink / raw)
  To: Arun R Murthy; +Cc: intel-gfx

== Series Details ==

Series: drm/xe/display: Change HPD to polling on runtime suspend
URL   : https://patchwork.freedesktop.org/series/137026/
State : failure

== Summary ==

Error: patch https://patchwork.freedesktop.org/api/1.0/series/137026/revisions/1/mbox/ not applied
Applying: drm/xe/display: Change HPD to polling on runtime suspend
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/xe/display/xe_display.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/xe/display/xe_display.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/display/xe_display.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/xe/display: Change HPD to polling on runtime suspend
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] drm/xe/display: Change HPD to polling on runtime suspend
  2024-08-08  7:00 [PATCHv2] drm/xe/display: Change HPD to polling on runtime suspend Arun R Murthy
  2024-08-08  7:28 ` ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2024-08-09  8:09 ` Jani Nikula
  1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2024-08-09  8:09 UTC (permalink / raw)
  To: Arun R Murthy, intel-xe, intel-gfx; +Cc: Arun R Murthy

On Thu, 08 Aug 2024, Arun R Murthy <arun.r.murthy@intel.com> 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.
>
> v2: move poll_enable() to xe_display(Imre)
>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 78cccbe28947..989022d21052 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -315,6 +315,10 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
>  
>  	intel_hpd_cancel_work(xe);
>  
> +	/* Enable hpd polling on runtime suspend */

What information does this comment add that is not obvious from the
code?

I'm not against helpful comments, but they need to be something more
than just explaining the same code in English.

BR,
Jani.


> +	if (runtime)
> +		intel_hpd_poll_enable(xe);
> +
>  	intel_suspend_encoders(xe);
>  
>  	intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold);

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-09  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08  7:00 [PATCHv2] drm/xe/display: Change HPD to polling on runtime suspend Arun R Murthy
2024-08-08  7:28 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-08-09  8:09 ` [PATCHv2] " Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox