As NVL+ devices can generate PME from HPDs, introduce a flag to
keep track of such a capability and helper functions to access
this flag. This flag will be set to true from runtime pm
functions if device is capable of wakeup from HPDs. This is a
place holder for the flag and it will be used for conditional
IRQ resets and HPD polling on suspend.

Bspec: 52979, 52980, 68857, 68867, 68970
Assisted-by: GitHub_Copilot:claude-opus-5
Signed-off-by: Vinod Govindapillai <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_display_core.h |  2 ++
 drivers/gpu/drm/i915/display/intel_hotplug.c      | 10 ++++++++++
 drivers/gpu/drm/i915/display/intel_hotplug.h      |  3 +++
 3 files changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h 
b/drivers/gpu/drm/i915/display/intel_display_core.h
index 7e988b7b1fe7..30b6f2524dee 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -220,6 +220,8 @@ struct intel_hotplug {
         * cue to ignore the long HPDs and can be set / unset using debugfs.
         */
        bool ignore_long_hpd;
+
+       bool can_generate_pme;
 };
 
 struct intel_vbt_data {
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c 
b/drivers/gpu/drm/i915/display/intel_hotplug.c
index 970aa95ee344..b24c9f360e24 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
@@ -846,6 +846,16 @@ static void i915_hpd_poll_init_work(struct work_struct 
*work)
        }
 }
 
+void intel_hpd_set_pme_capable(struct intel_display *display, bool 
can_generate_pme)
+{
+       display->hotplug.can_generate_pme = can_generate_pme;
+}
+
+bool intel_hpd_can_generate_pme(struct intel_display *display)
+{
+       return display->hotplug.can_generate_pme;
+}
+
 /**
  * intel_hpd_poll_enable - enable polling for connectors with hpd
  * @display: display device instance
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.h 
b/drivers/gpu/drm/i915/display/intel_hotplug.h
index edc41c9d3d65..c57e30f8366b 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.h
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.h
@@ -35,4 +35,7 @@ void intel_hpd_enable_detection_work(struct intel_display 
*display);
 void intel_hpd_disable_detection_work(struct intel_display *display);
 bool intel_hpd_schedule_detection(struct intel_display *display);
 
+void intel_hpd_set_pme_capable(struct intel_display *display, bool 
can_generate_pme);
+bool intel_hpd_can_generate_pme(struct intel_display *display);
+
 #endif /* __INTEL_HOTPLUG_H__ */
-- 
2.43.0

Reply via email to