Skip to contentSkip to conversation

drm/xe/display: Change HPD to polling on runtime suspend

PATCH Superseded Arun R Murthy 3 participants 4 messages Aug 8, 2024 – Aug 9, 2024

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/xe/display: Change HPD to polling on runtime suspend

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)

---
 drivers/gpu/drm/xe/display/xe_display.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/xe/display/xe_display.c +4 -0
index 78cccbe28947..989022d21052 100644
@@ -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);
Signature · 1 line
2.25.1
#1 lore raw

✗ Fi.CI.BUILD: failure for drm/xe/display: Change HPD to polling on runtime suspend

== Series Details ==

== 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

#2 lore raw

✗ CI.Patch_applied: failure for drm/xe/display: Change HPD to polling on runtime suspend

In reply to Arun R Murthy
== Series Details ==

== Series Details ==

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

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 4f5d551409fb drm-tip: 2024y-08m-07d-12h-38m-22s UTC integration manifest === git am output follows ===
error: patch failed: drivers/gpu/drm/xe/display/xe_display.c:315
error: drivers/gpu/drm/xe/display/xe_display.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Applying: drm/xe/display: Change HPD to polling on runtime suspend Patch failed at 0001 drm/xe/display: Change HPD to polling on runtime suspend

maintainer
#3 lore raw
In reply to Arun R Murthy
Quoted 17 lines · 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)

---
 drivers/gpu/drm/xe/display/xe_display.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/xe/display/xe_display.c +0 -0
index 78cccbe28947..989022d21052 100644

drivers/gpu/drm/xe/display/xe_display.c void xe_display_pm_suspend(struct xe_device *xe, bool runtime) · line 318

Quoted 4 lines
drivers/gpu/drm/xe/display/xe_display.c +1 -0
@@ -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.

Quoted 6 lines
drivers/gpu/drm/xe/display/xe_display.c +3 -0
+	if (runtime)
+		intel_hpd_poll_enable(xe);
+
 	intel_suspend_encoders(xe);
 
 	intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold);
Signature · 1 line
Jani Nikula, Intel